OSDN Git Service

plug another leak in LLParser::PerFunctionState::SetInstName()
authorNuno Lopes <nunoplopes@sapo.pt>
Wed, 2 Sep 2009 15:02:57 +0000 (15:02 +0000)
committerNuno Lopes <nunoplopes@sapo.pt>
Wed, 2 Sep 2009 15:02:57 +0000 (15:02 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@80792 91177308-0d34-0410-b5e6-96231b3b80d8

lib/AsmParser/LLParser.cpp

index 3d2e312..3ef4aaf 100644 (file)
@@ -1686,6 +1686,7 @@ bool LLParser::PerFunctionState::SetInstName(int NameID,
         return P.Error(NameLoc, "instruction forward referenced with type '" + 
                        FI->second.first->getType()->getDescription() + "'");
       FI->second.first->replaceAllUsesWith(Inst);
+      delete FI->second.first;
       ForwardRefValIDs.erase(FI);
     }