1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 03:33:20 +01:00

add an assertion to make it clear that PHI nodes are not allowed.

llvm-svn: 67210
This commit is contained in:
Chris Lattner 2009-03-18 16:23:56 +00:00
parent 4e5f2198ff
commit e4f0e25d07

View File

@ -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