summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2002-09-08 21:19:29 +0000
committerChris Lattner <sabre@nondot.org>2002-09-08 21:19:29 +0000
commit74946507fcc363889c3c9fb35589b135237008e2 (patch)
tree83e8c8ee22369137291ea1dd7c7ff6211c2dda81 /llvm/lib/CodeGen
parent16d4c60600456ea6aa507003fe081e6590e83e7e (diff)
downloadbcm5719-llvm-74946507fcc363889c3c9fb35589b135237008e2.tar.gz
bcm5719-llvm-74946507fcc363889c3c9fb35589b135237008e2.zip
Make sure the leakdetector is told about temporary Phi nodes also, so it doesn't
erroneously report them as leaks llvm-svn: 3624
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
index a6e5a77d0ea..28bfb74666d 100644
--- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
+++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
@@ -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) {
OpenPOWER on IntegriCloud