allow declaratoin of varying arrays in global scope. seems to work autmatically. needs more testing
This commit is contained in:
@@ -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.");
|
||||||
|
|||||||
Reference in New Issue
Block a user