[PATCH] D37745: [dwarfdump] Rename Brief to Verbose in DIDumpOptions
    Jonas Devlieghere via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Tue Sep 12 07:50:20 PDT 2017
    
    
  
JDevlieghere created this revision.
This patches renames "brief" to "verbose" in de DIDumpOptions and
inverts the logic to match the new behavior where brief is the default.
As suggested by @rnk in https://reviews.llvm.org/D37717
Repository:
  rL LLVM
https://reviews.llvm.org/D37745
Files:
  include/llvm/DebugInfo/DIContext.h
  lib/DebugInfo/DWARF/DWARFDie.cpp
  lib/DebugInfo/DWARF/DWARFFormValue.cpp
  tools/llvm-dwarfdump/llvm-dwarfdump.cpp
Index: tools/llvm-dwarfdump/llvm-dwarfdump.cpp
===================================================================
--- tools/llvm-dwarfdump/llvm-dwarfdump.cpp
+++ tools/llvm-dwarfdump/llvm-dwarfdump.cpp
@@ -82,7 +82,7 @@
   DIDumpOptions DumpOpts;
   DumpOpts.DumpType = DumpType;
   DumpOpts.SummarizeTypes = SummarizeTypes;
-  DumpOpts.Brief = !Verbose;
+  DumpOpts.Verbose = Verbose;
   DICtx->dump(outs(), DumpOpts);
 }
 
Index: lib/DebugInfo/DWARF/DWARFFormValue.cpp
===================================================================
--- lib/DebugInfo/DWARF/DWARFFormValue.cpp
+++ lib/DebugInfo/DWARF/DWARFFormValue.cpp
@@ -481,7 +481,7 @@
     OS << Value.uval;
     break;
   case DW_FORM_strp:
-    if (!DumpOpts.Brief)
+    if (DumpOpts.Verbose)
       OS << format(" .debug_str[0x%8.8x] = ", (uint32_t)UValue);
     dumpString(OS);
     break;
@@ -541,7 +541,7 @@
     break;
   }
 
-  if (CURelativeOffset && !DumpOpts.Brief) {
+  if (CURelativeOffset && DumpOpts.Verbose) {
     OS << " => {";
     WithColor(OS, syntax::Address).get()
         << format("0x%8.8" PRIx64, UValue + (U ? U->getOffset() : 0));
Index: lib/DebugInfo/DWARF/DWARFDie.cpp
===================================================================
--- lib/DebugInfo/DWARF/DWARFDie.cpp
+++ lib/DebugInfo/DWARF/DWARFDie.cpp
@@ -59,7 +59,7 @@
                        unsigned AddressSize, unsigned Indent,
                        const DIDumpOptions &DumpOpts) {
   ArrayRef<SectionName> SectionNames;
-  if (!DumpOpts.Brief)
+  if (DumpOpts.Verbose)
     SectionNames = Obj.getSectionNames();
 
   for (size_t I = 0; I < Ranges.size(); ++I) {
@@ -138,7 +138,7 @@
   else
     WithColor(OS, syntax::Attribute).get() << format("DW_AT_Unknown_%x", Attr);
 
-  if (!DumpOpts.Brief) {
+  if (DumpOpts.Verbose) {
     auto formString = FormEncodingString(Form);
     if (!formString.empty())
       OS << " [" << formString << ']';
@@ -388,7 +388,7 @@
           WithColor(OS, syntax::Tag).get().indent(Indent)
           << format("DW_TAG_Unknown_%x", getTag());
 
-        if (!DumpOpts.Brief)
+        if (DumpOpts.Verbose)
           OS << format(" [%u] %c", abbrCode,
                        AbbrevDecl->hasChildren() ? '*' : ' ');
         OS << '\n';
Index: include/llvm/DebugInfo/DIContext.h
===================================================================
--- include/llvm/DebugInfo/DIContext.h
+++ include/llvm/DebugInfo/DIContext.h
@@ -139,7 +139,7 @@
     uint64_t DumpType = DIDT_All;
     bool DumpEH = false;
     bool SummarizeTypes = false;
-    bool Brief = false;
+    bool Verbose = false;
 };
 
 class DIContext {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37745.114841.patch
Type: text/x-patch
Size: 2611 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170912/7112038a/attachment.bin>
    
    
More information about the llvm-commits
mailing list