forked from OSchip/llvm-project
Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks llvm-svn: 3624
This commit is contained in:
parent
16d4c60600
commit
74946507fc
|
@ -173,7 +173,12 @@ InstructionSelection::InsertCodeForPhis(Function &F)
|
|||
PHINode *PN = dyn_cast<PHINode>(&*IIt); ++IIt) {
|
||||
// FIXME: This is probably wrong...
|
||||
Value *PhiCpRes = new PHINode(PN->getType(), "PhiCp:");
|
||||
|
||||
|
||||
// The leak detector shouldn't track these nodes. They are not garbage,
|
||||
// even though their parent field is never filled in.
|
||||
//
|
||||
LeakDetector::removeGarbageObject(PhiCpRes);
|
||||
|
||||
// for each incoming value of the phi, insert phi elimination
|
||||
//
|
||||
for (unsigned i = 0; i < PN->getNumIncomingValues(); ++i) {
|
||||
|
|
Loading…
Reference in New Issue