forked from OSchip/llvm-project
emit a return at the end of the function. Run the llvm verifier.
llvm-svn: 39534
This commit is contained in:
parent
5269c0377c
commit
dc6e3feade
|
@ -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));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -3,6 +3,6 @@ CPPFLAGS += -I$(PROJ_SRC_DIR)/../include
|
|||
CXXFLAGS = -fno-rtti
|
||||
|
||||
TOOLNAME = clang
|
||||
USEDLIBS = LLVMCore.a clangCodeGen.a clangSEMA.a clangAST.a clangParse.a clangLex.a clangBasic.a LLVMSupport.a LLVMSystem.a
|
||||
USEDLIBS = clangCodeGen.a clangSEMA.a clangAST.a clangParse.a clangLex.a clangBasic.a LLVMCore.a LLVMSupport.a LLVMSystem.a
|
||||
|
||||
include $(LEVEL)/Makefile.common
|
||||
|
|
Loading…
Reference in New Issue