summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2010-02-11 02:19:13 +0000
committerTed Kremenek <kremenek@apple.com>2010-02-11 02:19:13 +0000
commitc162e8e1935ea4a779d1a71a5409dc60fa85b0fb (patch)
treebab1330ab378f0a5f870270d406c35ef6655bb13 /clang/lib/CodeGen/CodeGenModule.cpp
parent531ea566a6b01cae6214ab64ce9e9d117056ea6d (diff)
downloadbcm5719-llvm-c162e8e1935ea4a779d1a71a5409dc60fa85b0fb.tar.gz
bcm5719-llvm-c162e8e1935ea4a779d1a71a5409dc60fa85b0fb.zip
Clean up ownership of 'AttributeList' objects in Parser. Apparently
we would just leak them all over the place, with no clear ownership of these objects at all. AttributeList objects would get leaked on both error and non-error paths. Note: I introduced the usage of llvm::OwningPtr<AttributeList> to manage these objects, which is particularly useful for methods with multiple return sites. In at least one method I used them even when they weren't strictly necessary because it clarified the ownership semantics and made the code easier to read. Should the excessive 'take()' and 'reset()' calls become a performance issue we can always re-evaluate. Note+1: I believe I have not introduced any double-frees, but it would be nice for someone to review this. This fixes <rdar://problem/7635046>. llvm-svn: 95847
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud