[llvm-commits] [llvm] r67210 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Chris Lattner
sabre at nondot.org
Wed Mar 18 09:23:56 PDT 2009
Author: lattner
Date: Wed Mar 18 11:23:56 2009
New Revision: 67210
URL: http://llvm.org/viewvc/llvm-project?rev=67210&view=rev
Log:
add an assertion to make it clear that PHI nodes are not allowed.
Modified:
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=67210&r1=67209&r2=67210&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Wed Mar 18 11:23:56 2009
@@ -802,8 +802,11 @@
"Return type changed, but not into a void. The old return type"
" must have been a struct!");
Instruction *InsertPt = Call;
- if (InvokeInst *II = dyn_cast<InvokeInst>(Call))
+ if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) {
InsertPt = II->getNormalDest()->begin();
+ assert(!isa<PHINode>(InsertPt) &&
+ "Can't have a use of the invoke value if the edge is critical");
+ }
// We used to return a struct. Instead of doing smart stuff with all the
// uses of this struct, we will just rebuild it using
More information about the llvm-commits
mailing list