1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

revise debug output to avoid dangling pointer

llvm-svn: 162256
This commit is contained in:
Michael Liao 2012-08-21 05:55:22 +00:00
parent 4403f82dbf
commit e900b34138

View File

@ -220,6 +220,7 @@ bool CodeGenPrepare::EliminateFallThrough(Function &F) {
BranchInst *Term = dyn_cast<BranchInst>(SinglePred->getTerminator());
if (Term && !Term->isConditional()) {
Changed = true;
DEBUG(dbgs() << "To merge:\n"<< *SinglePred << "\n\n\n");
// Remember if SinglePred was the entry block of the function.
// If so, we will need to move BB back to the entry position.
bool isEntry = SinglePred == &SinglePred->getParent()->getEntryBlock();
@ -230,7 +231,6 @@ bool CodeGenPrepare::EliminateFallThrough(Function &F) {
// We have erased a block. Update the iterator.
I = BB;
DEBUG(dbgs() << "Merged:\n"<< *SinglePred << "\n\n\n");
}
}
return Changed;