On Aug 8, 2011, at 9:05 PM, NAKAMURA Takumi wrote: > It seems BasicBlock::replaceSuccessorsPhiUsesWith() might not handle > incomplete successors properly on msvc. > > In a case I saw, the successor has no instructions. > > John, would it be a possible case for CGCleanup to pass incomplete > Entry Block to llvm?
Well, the block being replaced shouldn't be empty, and the block it's being replaced with shouldn't be empty, but it is possible for there to be empty blocks in the CFG somewhere. I think your patch to LLVM is a good idea; replaceAllUsesWith should not be assuming a fully-formed AST. As a slight optimization, I would suggest doing this instead: if (Succ->empty()) continue; Jay, does that seem reasonable? That aside, I'll go ahead and patch clang; SimplifyCleanupEntry is really just a case of me being too clever by half. John. _______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
