[cfe-commits] r39534 - in /cfe/cfe/trunk: CodeGen/CodeGenFunction.cpp Driver/Makefile

clattner at cs.uiuc.edu clattner at cs.uiuc.edu
Wed Jul 11 09:45:21 PDT 2007


Author: clattner
Date: Wed Jul 11 11:45:21 2007
New Revision: 39534

URL: http://llvm.org/viewvc/llvm-project?rev=39534&view=rev
Log:
emit a return at the end of the function.  Run the llvm verifier.

Modified:
    cfe/cfe/trunk/CodeGen/CodeGenFunction.cpp
    cfe/cfe/trunk/Driver/Makefile

Modified: cfe/cfe/trunk/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/CodeGen/CodeGenFunction.cpp?rev=39534&r1=39533&r2=39534&view=diff

==============================================================================
--- cfe/cfe/trunk/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/cfe/trunk/CodeGen/CodeGenFunction.cpp Wed Jul 11 11:45:21 2007
@@ -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 @@
   Builder.SetInsertPoint(EntryBB);
   
   EmitStmt(FD->getBody());
+  
+  // Emit a simple return for now.
+  Builder.CreateRetVoid();
+  
+  
+  // Verify that the function is well formed.
+  assert(!verifyFunction(*CurFn));
 }
 
 

Modified: cfe/cfe/trunk/Driver/Makefile
URL: http://llvm.org/viewvc/llvm-project/cfe/cfe/trunk/Driver/Makefile?rev=39534&r1=39533&r2=39534&view=diff

==============================================================================
--- cfe/cfe/trunk/Driver/Makefile (original)
+++ cfe/cfe/trunk/Driver/Makefile Wed Jul 11 11:45:21 2007
@@ -3,6 +3,6 @@
 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





More information about the cfe-commits mailing list