diff options
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r-- | clang/CodeGen/CodeGenFunction.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/CodeGen/CodeGenFunction.cpp b/clang/CodeGen/CodeGenFunction.cpp index ec1aad8b71f..73553da0b1b 100644 --- a/clang/CodeGen/CodeGenFunction.cpp +++ b/clang/CodeGen/CodeGenFunction.cpp @@ -18,6 +18,7 @@ #include "llvm/Constants.h" #include "llvm/DerivedTypes.h" #include "llvm/Function.h" +#include "llvm/Analysis/Verifier.h" using namespace llvm; using namespace clang; using namespace CodeGen; @@ -125,6 +126,13 @@ void CodeGenFunction::GenerateCode(const FunctionDecl *FD) { Builder.SetInsertPoint(EntryBB); EmitStmt(FD->getBody()); + + // Emit a simple return for now. + Builder.CreateRetVoid(); + + + // Verify that the function is well formed. + assert(!verifyFunction(*CurFn)); } |