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

@@ -427,7 +427,7 @@ Function::emitCode(FunctionEmitContext *ctx, llvm::Function *function,
// issue a warning. Also need to warn if it's the entry block for
// the function (in which case it will not have predeccesors but is
// still reachable.)
if (Type::Equal(type->GetReturnType(), AtomicType::Void) == false &&
if (type->GetReturnType()->IsVoidType() == false &&
(pred_begin(ec.bblock) != pred_end(ec.bblock) || (ec.bblock == entryBBlock)))
Warning(sym->pos, "Missing return statement in function returning \"%s\".",
type->rType->GetString().c_str());