allow declaratoin of varying arrays in global scope. seems to work autmatically. needs more testing

This commit is contained in:
Evghenii
2014-01-08 13:39:31 +01:00
parent de4d66c56f
commit f98a8cc22f

View File

@@ -422,12 +422,14 @@ Module::AddGlobalVariable(const std::string &name, const Type *type, Expr *initE
return; return;
} }
#if 0
if (g->target->getISA() == Target::NVPTX && if (g->target->getISA() == Target::NVPTX &&
type->IsVaryingType()) type->IsVaryingType())
{ {
Error(pos, "Global \"varying\" variables are not yet supported in \"nvptx\" target."); Error(pos, "Global \"varying\" variables are not yet supported in \"nvptx\" target.");
return; return;
} }
#endif
if (Type::Equal(type, AtomicType::Void)) { if (Type::Equal(type, AtomicType::Void)) {
Error(pos, "\"void\" type global variable is illegal."); Error(pos, "\"void\" type global variable is illegal.");