[PATCH] D20876: [PDB] Print section contributions and section map
Rui Ueyama via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 1 14:57:55 PDT 2016
ruiu added inline comments.
================
Comment at: tools/llvm-pdbdump/llvm-pdbdump.cpp:142
@@ -145,1 +141,3 @@
cl::cat(NativeOptions));
+cl::opt<bool> DumpSectionContrs("raw-section-contrs",
+ cl::desc("dump section contributions"),
----------------
section-contribs?
================
Comment at: tools/llvm-pdbdump/llvm-pdbdump.cpp:509
@@ -507,1 +508,3 @@
+static Error dumpSectionContrs(ScopedPrinter &P, PDBFile &File) {
+ if (!opts::DumpSectionContrs)
----------------
I'd do s/contr/contrib/g to all files in this patch.
================
Comment at: tools/llvm-pdbdump/llvm-pdbdump.cpp:518
@@ +517,3 @@
+ ListScope L(P, "Section Contributions");
+ class Visitor : public ISectionContribVisitor {
+ public:
----------------
Define this class outside of this function.
Also this class definition made me think of the visitor design choice. Currently visitor's callback is a class with visit() member function. But it can be just a std::function, no? We can create a lambda here and pass it to visitSectionContributions function.
================
Comment at: tools/llvm-pdbdump/llvm-pdbdump.cpp:539
@@ +538,3 @@
+ P.printNumber("Reloc CRC", SC.RelocCrc);
+ P.flush();
+ }
----------------
Why do you have to call flush?
http://reviews.llvm.org/D20876
More information about the llvm-commits
mailing list