adding const to Atomic::Void type

This commit is contained in:
Ilia Filippov
2014-03-17 14:42:55 +04:00
parent 11f17ce0cd
commit 02d55f24f6
7 changed files with 36 additions and 35 deletions

View File

@@ -426,7 +426,7 @@ Module::AddGlobalVariable(const std::string &name, const Type *type, Expr *initE
return;
}
if (Type::Equal(type, AtomicType::Void)) {
if (type->IsVoidType()) {
Error(pos, "\"void\" type global variable is illegal.");
return;
}
@@ -818,7 +818,7 @@ Module::AddFunctionDeclaration(const std::string &name,
"exported function \"%s\"", name.c_str());
if (functionType->isTask &&
Type::Equal(functionType->GetReturnType(), AtomicType::Void) == false)
functionType->GetReturnType()->IsVoidType() == false)
Error(pos, "Task-qualified functions must have void return type.");
if (functionType->isExported || functionType->isExternC)