added Error when varying variable is defined in global scope with nvptx target

This commit is contained in:
Evghenii
2014-01-08 11:46:36 +01:00
parent 8347c766f0
commit f011b3cb22

View File

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