[llvm-commits] [gcc-plugin] r81371 - /gcc-plugin/trunk/llvm-convert.cpp
Duncan Sands
baldrick at free.fr
Wed Sep 9 12:33:33 PDT 2009
Author: baldrick
Date: Wed Sep 9 14:33:33 2009
New Revision: 81371
URL: http://llvm.org/viewvc/llvm-project?rev=81371&view=rev
Log:
Incoming phi values may have been defined in the entry block,
so don't forget to associate our entry block with GCC's. With
this change the plugin can compile sqlite3.c from the testsuite.
Modified:
gcc-plugin/trunk/llvm-convert.cpp
Modified: gcc-plugin/trunk/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/gcc-plugin/trunk/llvm-convert.cpp?rev=81371&r1=81370&r2=81371&view=diff
==============================================================================
--- gcc-plugin/trunk/llvm-convert.cpp (original)
+++ gcc-plugin/trunk/llvm-convert.cpp Wed Sep 9 14:33:33 2009
@@ -531,7 +531,9 @@
Fn->setDoesNotThrow();
// Create a new basic block for the function.
- Builder.SetInsertPoint(BasicBlock::Create(Context, "entry", Fn));
+ BasicBlock *EntryBlock = BasicBlock::Create(Context, "entry", Fn);
+ BasicBlocks[ENTRY_BLOCK_PTR] = EntryBlock;
+ Builder.SetInsertPoint(EntryBlock);
if (TheDebugInfo)
TheDebugInfo->EmitFunctionStart(FnDecl, Fn, Builder.GetInsertBlock());
More information about the llvm-commits
mailing list