[PATCH] D74205: [llvm-dwarfdump] Add the --show-sections-sizes option
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 11 09:37:19 PDT 2020
aprantl added a comment.
I think we're almost there!
================
Comment at: llvm/tools/llvm-dwarfdump/SectionSizes.cpp:14
+size_t getMaxSectionNameWidth(const SectionSizes &Sizes) {
+ // The minimum column length should be the size of "SECTION" plus 2.
+ size_t MaxWidth = 9;
----------------
compute this as a constexpr?
================
Comment at: llvm/tools/llvm-dwarfdump/SectionSizes.cpp:55
+
+bool isDebugSection(StringRef SectionName) {
+ return SectionName.startswith(".debug") ||
----------------
Shouldn't this be in libObject instead?
================
Comment at: llvm/tools/llvm-dwarfdump/SectionSizes.h:1
+//===- SectionSizes.h -----------------------------------------------------===//
+//
----------------
`-*- C++ -*-`
this is a header file.
================
Comment at: llvm/tools/llvm-dwarfdump/SectionSizes.h:22
+
+using SectionSizeMap = std::map<StringRef, uint64_t>;
+
----------------
Is the StringRef the section name? These are so small that we could use an llvm::StringMap instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D74205/new/
https://reviews.llvm.org/D74205
More information about the llvm-commits
mailing list