[llvm-commits] [PATCH] [DebugInfo] Generate address ranges for compile units even if .debug_aranges is present.
Benjamin Kramer
benny.kra at gmail.com
Thu Nov 15 09:17:16 PST 2012
Patch looks good to me, only a minor nit below. This also needs test cases, maybe use a mach-o object file if relocations are acting up again?
================
Comment at: lib/DebugInfo/DWARFDebugAranges.cpp:97
@@ +96,3 @@
+ uint32_t CUOffset = cu->getOffset();
+ if (ParsedCUOffsets.count(CUOffset) == 0) {
+ cu->buildAddressRangeTable(this, true);
----------------
Nit: You can avoid looking up the value in the set twice with
##if (!ParsedOffsets.insert(CUOffset).second)##
================
Comment at: lib/DebugInfo/DWARFDebugAranges.cpp:99
@@ +98,3 @@
+ cu->buildAddressRangeTable(this, true);
+ ParsedCUOffsets.insert(CUOffset);
+ }
----------------
And drop this line.
http://llvm-reviews.chandlerc.com/D116
BRANCH
svn
ARCANIST PROJECT
llvm
More information about the llvm-commits
mailing list