[PATCH] D20707: pdbdump: Add -raw-all to enable all -raw-* flags.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Thu May 26 15:50:47 PDT 2016


ruiu created this revision.
ruiu added a reviewer: zturner.
ruiu added a subscriber: llvm-commits.

Add a convenient option to turn on all the flags.

http://reviews.llvm.org/D20707

Files:
  test/DebugInfo/PDB/pdbdump-headers.test
  tools/llvm-pdbdump/llvm-pdbdump.cpp

Index: tools/llvm-pdbdump/llvm-pdbdump.cpp
===================================================================
--- tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -147,6 +147,10 @@
     DumpSymRecordBytes("raw-sym-record-bytes",
                        cl::desc("dump CodeView symbol record raw bytes"),
                        cl::cat(NativeOtions));
+cl::opt<bool>
+    RawAll("raw-all",
+           cl::desc("Implies all other options in 'Native Options' category"),
+           cl::cat(NativeOtions));
 
 cl::list<std::string>
     ExcludeTypes("exclude-types",
@@ -823,6 +827,21 @@
     opts::Lines = true;
   }
 
+  if (opts::RawAll) {
+    opts::DumpHeaders = true;
+    opts::DumpModules = true;
+    opts::DumpModuleFiles = true;
+    opts::DumpModuleSyms = true;
+    opts::DumpPublics = true;
+    opts::DumpStreamSummary = true;
+    opts::DumpStreamBlocks = true;
+    opts::DumpSymRecordBytes = true;
+    opts::DumpTpiRecordBytes = true;
+    opts::DumpTpiRecords = true;
+    opts::DumpIpiRecords = true;
+    opts::DumpIpiRecordBytes = true;
+  }
+
   // When adding filters for excluded compilands and types, we need to remember
   // that these are regexes.  So special characters such as * and \ need to be
   // escaped in the regex.  In the case of a literal \, this means it needs to
Index: test/DebugInfo/PDB/pdbdump-headers.test
===================================================================
--- test/DebugInfo/PDB/pdbdump-headers.test
+++ test/DebugInfo/PDB/pdbdump-headers.test
@@ -2,6 +2,7 @@
 ; RUN:              -raw-sym-record-bytes -raw-publics -raw-module-files -raw-stream-name=/names \
 ; RUN:              -raw-stream-summary -raw-ipi-records -raw-ipi-record-bytes %p/Inputs/empty.pdb \
 ; RUN:              | FileCheck -check-prefix=EMPTY %s
+; RUN: llvm-pdbdump -raw-all %p/Inputs/empty.pdb | FileCheck -check-prefix=EMPTY %s
 ; RUN: llvm-pdbdump -raw-headers -raw-stream-name=/names -raw-modules -raw-module-files \
 ; RUN:              %p/Inputs/big-read.pdb | FileCheck -check-prefix=BIG %s
 ; RUN: llvm-pdbdump -raw-headers %p/Inputs/bad-block-size.pdb | FileCheck -check-prefix=BAD-BLOCK-SIZE %s


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20707.58708.patch
Type: text/x-patch
Size: 2175 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160526/68ee20d7/attachment.bin>


More information about the llvm-commits mailing list