summaryrefslogtreecommitdiffstats
path: root/clang/CodeGen/CodeGenFunction.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-05-30 22:55:31 +0000
committerChris Lattner <sabre@nondot.org>2007-05-30 22:55:31 +0000
commitdc6e3feadeeaec27cd80c818d5e4cc52d76f83ca (patch)
treeb05e3da54f17dab5f5cd9ba2a5654fc79dbb9725 /clang/CodeGen/CodeGenFunction.cpp
parent5269c0377ca53c365341b5e0e5c5c2e7eca84c12 (diff)
downloadbcm5719-llvm-dc6e3feadeeaec27cd80c818d5e4cc52d76f83ca.tar.gz
bcm5719-llvm-dc6e3feadeeaec27cd80c818d5e4cc52d76f83ca.zip
emit a return at the end of the function. Run the llvm verifier.
llvm-svn: 39534
Diffstat (limited to 'clang/CodeGen/CodeGenFunction.cpp')
-rw-r--r--clang/CodeGen/CodeGenFunction.cpp8
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));
}
OpenPOWER on IntegriCloud