diff options
author | Chris Lattner <sabre@nondot.org> | 2009-03-18 16:23:56 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2009-03-18 16:23:56 +0000 |
commit | f023b54bcd817a7dea1a7f02f1db6f69eae3f0d6 (patch) | |
tree | 1531f7713e3293337f664ae37fc6488348162308 /lib/Transforms/IPO | |
parent | b0c4199a55d72fb9560f00b84a92a062fb8e79ea (diff) | |
download | external_llvm-f023b54bcd817a7dea1a7f02f1db6f69eae3f0d6.zip external_llvm-f023b54bcd817a7dea1a7f02f1db6f69eae3f0d6.tar.gz external_llvm-f023b54bcd817a7dea1a7f02f1db6f69eae3f0d6.tar.bz2 |
add an assertion to make it clear that PHI nodes are not allowed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/IPO')
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 9f2b2a7..ab8df69 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -802,8 +802,11 @@ bool DAE::RemoveDeadStuffFromFunction(Function *F) { "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 |