]> granicus.if.org Git - llvm/commit
DebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Apr 2015 18:01:58 +0000 (18:01 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Fri, 10 Apr 2015 18:01:58 +0000 (18:01 +0000)
commit139eb5f5122e89d6e5f9febb880f4997ee7da330
tree3a459fb77420857c2f1ed66ae2a75198ece54171
parentf52cd1c1a313fc6163f625d1fa20091b4ab26deb
DebugInfo: Stop leaking temporaries in DIBuilder::createCompileUnit()

Stop leaking temporary nodes from `DIBuilder::createCompileUnit()`.
`replaceAllUsesWith()` doesn't delete the nodes, so we need to delete
them "manually" (well, `TempMDTuple` does that for us).

Similarly, stop leaking the temporary nodes used for variables of
subprograms.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234617 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/IR/DIBuilder.h
lib/IR/DIBuilder.cpp