summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2013-07-27 11:23:08 +0000
committerChandler Carruth <chandlerc@gmail.com>2013-07-27 11:23:08 +0000
commit1c82d3310ec7e0e326fd56391e1920625dc5c277 (patch)
tree306c887e590222828b1b3f12a979922a55836441 /llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
parent2a1c0d2c0317d3dc2419d0f39a3f9e672c1f6558 (diff)
downloadbcm5719-llvm-1c82d3310ec7e0e326fd56391e1920625dc5c277.tar.gz
bcm5719-llvm-1c82d3310ec7e0e326fd56391e1920625dc5c277.zip
Fix yet another memory leak found by the vg-leak bot. Folks (including
me) should start watching this bot more as its catching lots of bugs. The fix here is to not construct the global if we aren't going to need it. That's cheaper anyways, and globals have highly predictable types in practice. I've added an assert to catch skew between our manual testing of the type and the actual type just for paranoia's sake. Note that this pattern is actually fine in most globals because when you build a global with a module it automatically is moved to be owned by that module. But here, we're in isel and don't really want to do that. The solution of not creating a global is simpler anyways. llvm-svn: 187302
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud