[llvm-commits] CVS: llvm/lib/Transforms/Utils/InlineFunction.cpp
Chris Lattner
lattner at cs.uiuc.edu
Sun Sep 14 21:11:01 PDT 2003
Changes in directory llvm/lib/Transforms/Utils:
InlineFunction.cpp updated: 1.7 -> 1.8
---
Log message:
Fix bug: Inline/2003-09-14-InlineValue.ll
---
Diffs of the changes:
Index: llvm/lib/Transforms/Utils/InlineFunction.cpp
diff -u llvm/lib/Transforms/Utils/InlineFunction.cpp:1.7 llvm/lib/Transforms/Utils/InlineFunction.cpp:1.8
--- llvm/lib/Transforms/Utils/InlineFunction.cpp:1.7 Mon Sep 8 14:44:25 2003
+++ llvm/lib/Transforms/Utils/InlineFunction.cpp Sun Sep 14 21:10:16 2003
@@ -191,10 +191,14 @@
// Next, create the new invoke instruction, inserting it at the end
// of the old basic block.
- new InvokeInst(CI->getCalledValue(), Split, InvokeDest,
- std::vector<Value*>(CI->op_begin()+1, CI->op_end()),
- CI->getName(), BB->getTerminator());
-
+ InvokeInst *II =
+ new InvokeInst(CI->getCalledValue(), Split, InvokeDest,
+ std::vector<Value*>(CI->op_begin()+1, CI->op_end()),
+ CI->getName(), BB->getTerminator());
+
+ // Make sure that anything using the call now uses the invoke!
+ CI->replaceAllUsesWith(II);
+
// Delete the unconditional branch inserted by splitBasicBlock
BB->getInstList().pop_back();
Split->getInstList().pop_front(); // Delete the original call
More information about the llvm-commits
mailing list