[PATCH] D36740: [llvm-dwarfdump] - Refactor section name/uniqueness gathering.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 08:41:05 PDT 2017
grimar added inline comments.
================
Comment at: lib/DebugInfo/DWARF/DWARFContext.cpp:1188-1191
+
+ for (SectionInfo &Info : Sections)
+ if (SectionAmountMap[Info.Name] > 1)
+ Info.IsNameUnique = false;
----------------
dblaikie wrote:
> Reckon it might be worth doing this lazily (inside getSectionNames)? So it's not computed if it's not needed?
>
> I guess if we're already walking all the sections and getting their names, this is probably cheap enough to do unconditionally.
I tried both ways when wrote this patch. Non-lazy way was a bit shorter and does not have problem
with calling non-const methods for const object, that is why I posted it initially.
I changed to lazy one if you prefer it.
https://reviews.llvm.org/D36740
More information about the llvm-commits
mailing list