silence a bogus gcc warning.

llvm-svn: 39824
This commit is contained in:
Chris Lattner 2007-07-13 20:07:11 +00:00
parent 80f9f077e3
commit a5ba0cb772
1 changed files with 2 additions and 0 deletions

View File

@ -247,6 +247,8 @@ void CodeGenFunction::EmitReturnStmt(const ReturnStmt &S) {
const Expr *RV = S.getRetValue();
if (RV)
RetVal = EmitExpr(RV);
else // Silence a bogus GCC warning.
RetVal = RValue::get(0);
QualType FnRetTy = CurFuncDecl->getType().getCanonicalType();
FnRetTy = cast<FunctionType>(FnRetTy)->getResultType();