]> granicus.if.org Git - clang/commit
Fix a temporary MDNode leak.
authorFrederic Riss <friss@apple.com>
Wed, 19 Nov 2014 18:53:46 +0000 (18:53 +0000)
committerFrederic Riss <friss@apple.com>
Wed, 19 Nov 2014 18:53:46 +0000 (18:53 +0000)
commit76817eaa413398b702a63c5f51fe4e8d645865d5
tree206ef9c5b5d4c0d2ed613c33e0ea964ecb13dba5
parent6dceebb5a9ae3942297a4a2ec22516461a5fbb22
Fix a temporary MDNode leak.

While emitting debug information for function forward decalrations, we
create DISubprogram objects that aran't stored in the AllSubprograms
list, and thus won't get finalized by the DIBuilder. During the DIBuilder
finalize(), the temporary MDNode allocated for the DISubprogram
Variables field gets RAUWd with a non temporary DIArray. For the forward
declarations, simply delete that temporary node before we delete the
parent node, so that it doesn't leak.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@222373 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/CGDebugInfo.cpp