[llvm] r313207 - llvm-dwarfdump: automatically dump both regular and .dwo variant of sections

Yung, Douglas via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 18:11:08 PDT 2017


Hi Adrian,

Your commit seems to be causing the PS4 bots (both Windows and Linux) to fail on the test DebugInfo\Generic\empty.ll with output similar to this:

******************** TEST 'LLVM :: DebugInfo/Generic/empty.ll' FAILED ********************
Script:
--
/home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/llc < /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/DebugInfo/Generic/empty.ll -filetype=obj | /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/llvm-dwarfdump -v - | /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/FileCheck /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/DebugInfo/Generic/empty.ll
/home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/llc -split-dwarf-file=foo.dwo < /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/DebugInfo/Generic/empty.ll -filetype=obj | /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/llvm-dwarfdump -v - | /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.obj/./bin/FileCheck --check-prefix=FISSION /home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/DebugInfo/Generic/empty.ll
--
Exit Code: 1

Command Output (stderr):
--
/home/buildslave/buildslave1a/llvm-clang-lld-x86_64-scei-ps4-ubuntu-fast/llvm.src/test/DebugInfo/Generic/empty.ll:15:10: error: expected string not found in input
; CHECK: .debug_pubnames contents:
         ^
<stdin>:40:2: note: scanning from here
 version: 2
 ^
<stdin>:61:1: note: possible intended match here
.debug_str contents:
^

Can you take a look?



> -----Original Message-----
> From: llvm-commits [mailto:llvm-commits-bounces at lists.llvm.org] On Behalf Of
> Adrian Prantl via llvm-commits
> Sent: Wednesday, September 13, 2017 15:09
> To: llvm-commits at lists.llvm.org
> Subject: [llvm] r313207 - llvm-dwarfdump: automatically dump both regular and
> .dwo variant of sections
> 
> Author: adrian
> Date: Wed Sep 13 15:09:01 2017
> New Revision: 313207
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=313207&view=rev
> Log:
> llvm-dwarfdump: automatically dump both regular and .dwo variant of sections
> 
> Since users typically don't really care about the .dwo / non.dwo distinction,
> this patch makes it so dwarfdump --debug-<info,...> dumps .debug_info and (if
> available) also .debug_info.dwo. This simplifies the command line interface
> (I've removed all dwo-specific dump
> options) and makes the tool friendlier to use.
> 
> Differential Revision: https://reviews.llvm.org/D37771
> 
> Modified:
>     llvm/trunk/include/llvm/BinaryFormat/Dwarf.def
>     llvm/trunk/include/llvm/DebugInfo/DIContext.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
>     llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
>     llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
>     llvm/trunk/test/DebugInfo/Inputs/gmlt.ll
>     llvm/trunk/test/DebugInfo/X86/fission-inline.ll
>     llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll
>     llvm/trunk/test/DebugInfo/X86/fission-ranges.ll
>     llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
>     llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll
>     llvm/trunk/test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll
>     llvm/trunk/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll
>     llvm/trunk/test/DebugInfo/X86/split-dwarf-omit-empty.ll
>     llvm/trunk/test/DebugInfo/dwarfdump-dump-flags.test
>     llvm/trunk/test/DebugInfo/dwarfdump-dwp.test
>     llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
>     llvm/trunk/test/MC/ARM/dwarf-asm-no-code.s
>     llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s
>     llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s
>     llvm/trunk/test/tools/dsymutil/X86/basic-linking-x86.test
>     llvm/trunk/test/tools/llvm-dwp/X86/empty.test
>     llvm/trunk/test/tools/llvm-dwp/X86/simple.test
>     llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
> 
> Modified: llvm/trunk/include/llvm/BinaryFormat/Dwarf.def
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/BinaryFormat/Dwarf.def?rev=313207&r1=313206&r2
> =313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/BinaryFormat/Dwarf.def (original)
> +++ llvm/trunk/include/llvm/BinaryFormat/Dwarf.def Wed Sep 13 15:09:01
> +++ 2017
> @@ -823,21 +823,16 @@ HANDLE_DW_UT(0x04, skeleton)  HANDLE_DW_UT(0x05,
> split_compile)  HANDLE_DW_UT(0x06, split_type)
> 
> -// DWARF section types. (enum name, ELF name, cmdline name)
> +// DWARF section types. (enum name, ELF name, ELF DWO name, cmdline
> +name)
>  // Note that these IDs don't mean anything.
>  // TODO: Add Mach-O and COFF names.
>  // Official DWARF sections.
>  HANDLE_DWARF_SECTION(DebugAbbrev, ".debug_abbrev", "debug-abbrev") -
> HANDLE_DWARF_SECTION(DebugAbbrevDwo, ".debug_abbrev.dwo", "debug-abbrev-dwo")
> HANDLE_DWARF_SECTION(DebugAranges, ".debug_aranges", "debug-aranges")
> HANDLE_DWARF_SECTION(DebugInfo, ".debug_info", "debug-info") -
> HANDLE_DWARF_SECTION(DebugInfoDwo, ".debug_info.dwo", "debug-info-dwo")
> HANDLE_DWARF_SECTION(DebugTypes, ".debug_types", "debug-types") -
> HANDLE_DWARF_SECTION(DebugTypesDwo, ".debug_types.dwo", "debug-types-dwo")
> HANDLE_DWARF_SECTION(DebugLine, ".debug_line", "debug-line") -
> HANDLE_DWARF_SECTION(DebugLineDwo, ".debug_line.dwo", "debug-line-dwo")
> HANDLE_DWARF_SECTION(DebugLoc, ".debug_loc", "debug-loc") -
> HANDLE_DWARF_SECTION(DebugLocDwo, ".debug_loc.dwo", "debug-loc-dwo")
> HANDLE_DWARF_SECTION(DebugFrames, ".debug_frames", "debug-frames")
> HANDLE_DWARF_SECTION(DebugMacro, ".debug_macro", "debug-macro")
> HANDLE_DWARF_SECTION(DebugRanges, ".debug_ranges", "debug-ranges") @@ -847,8
> +842,6 @@ HANDLE_DWARF_SECTION(DebugGnuPubnames, "
>  HANDLE_DWARF_SECTION(DebugGnuPubtypes, ".debug_gnu_pubtypes", "debug-gnu-
> pubtypes")  HANDLE_DWARF_SECTION(DebugStr, ".debug_str", "debug-str")
> HANDLE_DWARF_SECTION(DebugStrOffsets, ".debug_str_offsets", "debug-str-
> offsets") -HANDLE_DWARF_SECTION(DebugStrDwo, ".debug_str.dwo", "debug-str-
> dwo") -HANDLE_DWARF_SECTION(DebugStrOffsetsDwo, ".debug_str_offsets.dwo",
> "debug-str-offsets-dwo")  HANDLE_DWARF_SECTION(DebugCUIndex,
> ".debug_cu_index", "debug-cu-index")  HANDLE_DWARF_SECTION(DebugTUIndex,
> ".debug_tu_index", "debug-tu-index")  // Vendor extensions.
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DIContext.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DIContext.h?rev=313207&r1=313206&r2=
> 313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DIContext.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DIContext.h Wed Sep 13 15:09:01
> +++ 2017
> @@ -122,14 +122,14 @@ enum DIDumpTypeCounter {
>    DIDT_ID_UUID,
>    DIDT_ID_Count
>  };
> -static_assert(DIDT_ID_Count <= 64, "section types overflow storage");
> +static_assert(DIDT_ID_Count <= 32, "section types overflow storage");
> 
>  /// Selects which debug sections get dumped.
> -enum DIDumpType : uint64_t {
> +enum DIDumpType : unsigned {
>    DIDT_Null,
> -  DIDT_All             = ~0ULL,
> +  DIDT_All             = ~0U,
>  #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME) \
> -  DIDT_##ENUM_NAME = 1 << (DIDT_ID_##ENUM_NAME - 1),
> +  DIDT_##ENUM_NAME = 1U << (DIDT_ID_##ENUM_NAME - 1),
>  #include "llvm/BinaryFormat/Dwarf.def"
>  #undef HANDLE_DWARF_SECTION
>    DIDT_UUID = 1 << (DIDT_ID_UUID - 1),
> @@ -138,7 +138,7 @@ enum DIDumpType : uint64_t {  /// Container for dump
> options that control which debug information will be  /// dumped.
>  struct DIDumpOptions {
> -    uint64_t DumpType = DIDT_All;
> +    unsigned DumpType = DIDT_All;
>      bool DumpEH = false;
>      bool SummarizeTypes = false;
>      bool Verbose = false;
> @@ -158,7 +158,7 @@ public:
> 
>    virtual void dump(raw_ostream &OS, DIDumpOptions DumpOpts) = 0;
> 
> -  virtual bool verify(raw_ostream &OS, uint64_t DumpType = DIDT_All,
> +  virtual bool verify(raw_ostream &OS, unsigned DumpType = DIDT_All,
>                        DIDumpOptions DumpOpts = {}) {
>      // No verifier? Just say things went well.
>      return true;
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h?rev=313207&r1=3
> 13206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFContext.h Wed Sep 13
> +++ 15:09:01 2017
> @@ -123,7 +123,7 @@ public:
> 
>    void dump(raw_ostream &OS, DIDumpOptions DumpOpts) override;
> 
> -  bool verify(raw_ostream &OS, uint64_t DumpType = DIDT_All,
> +  bool verify(raw_ostream &OS, unsigned DumpType = DIDT_All,
>                DIDumpOptions DumpOpts = {}) override;
> 
>    using cu_iterator_range =
> DWARFUnitSection<DWARFCompileUnit>::iterator_range;
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h?rev=313207&
> r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugAbbrev.h Wed Sep
> +++ 13 15:09:01 2017
> @@ -67,6 +67,7 @@ public:
> 
>    void dump(raw_ostream &OS) const;
>    void extract(DataExtractor Data);
> +  bool empty() const { return begin() == end(); }
> 
>    DWARFAbbreviationDeclarationSetMap::const_iterator begin() const {
>      return AbbrDeclSets.begin();
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h?rev=313207&r
> 1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugFrame.h Wed Sep 13
> +++ 15:09:01 2017
> @@ -36,6 +36,9 @@ public:
>    /// data is assumed to be pointing to the beginning of the section.
>    void parse(DataExtractor Data);
> 
> +  /// Return whether the section has any entries.
> +  bool empty() const { return Entries.empty(); }
> +
>  private:
>    std::vector<std::unique_ptr<FrameEntry>> Entries;  };
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h?rev=313207&r1=
> 313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugLoc.h Wed Sep 13
> +++ 15:09:01 2017
> @@ -63,7 +63,7 @@ public:
>    /// Parse the debug_loc section accessible via the 'data' parameter using
> the
>    /// address size also given in 'data' to interpret the address ranges.
>    void parse(const DWARFDataExtractor &data);
> -
> +
>    Optional<LocationList> parseOneLocationList(DWARFDataExtractor Data,
>                                                uint32_t *Offset);  };
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h?rev=313207&r
> 1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFDebugMacro.h Wed Sep 13
> +++ 15:09:01 2017
> @@ -53,6 +53,9 @@ public:
> 
>    /// Parse the debug_macinfo section accessible via the 'data' parameter.
>    void parse(DataExtractor data);
> +
> +  /// Return whether the section has any entries.
> +  bool empty() const { return Macros.empty(); }
>  };
> 
>  } // end namespace llvm
> 
> Modified: llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h?rev=313207&r1
> =313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h (original)
> +++ llvm/trunk/include/llvm/DebugInfo/DWARF/DWARFUnitIndex.h Wed Sep 13
> +++ 15:09:01 2017
> @@ -87,6 +87,7 @@ public:
> 
>    bool parse(DataExtractor IndexData);
>    void dump(raw_ostream &OS) const;
> +
>    const Entry *getFromOffset(uint32_t Offset) const;
>    const Entry *getFromHash(uint64_t Offset) const;
> 
> 
> Modified: llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp?rev=313207&r1=313206&r
> 2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp (original)
> +++ llvm/trunk/lib/DebugInfo/DWARF/DWARFContext.cpp Wed Sep 13 15:09:01
> +++ 2017
> @@ -41,6 +41,7 @@
>  #include "llvm/Support/Error.h"
>  #include "llvm/Support/Format.h"
>  #include "llvm/Support/MemoryBuffer.h"
> +#include "llvm/Support/Path.h"
>  #include "llvm/Support/TargetRegistry.h"
>  #include "llvm/Support/raw_ostream.h"
>  #include <algorithm>
> @@ -224,6 +225,10 @@ void DWARFContext::dump(raw_ostream &OS,
>    uint64_t DumpType = DumpOpts.DumpType;
>    bool DumpEH = DumpOpts.DumpEH;
> 
> +  StringRef Extension = sys::path::extension(DObj->getFileName());
> +  bool IsDWO = (Extension == ".dwo") || (Extension == ".dwp");
> +
> +  // Print UUID header.
>    const auto *ObjFile = DObj->getFile();
>    if (!(DumpType & DIDT_UUID) || DumpType == DIDT_All)
>      outs() << ObjFile->getFileName() << ":\tfile format "
> @@ -231,72 +236,82 @@ void DWARFContext::dump(raw_ostream &OS,
>    if (DumpType & DIDT_UUID)
>      dumpUUID(OS, *ObjFile);
> 
> -  if (DumpType & DIDT_DebugAbbrev) {
> -    OS << ".debug_abbrev contents:\n";
> +  // Print a header for each explicitly-requested section.
> +  // Otherwise just print one for non-empty sections.
> +  bool Explicit = DumpType != DIDT_All && !IsDWO;  auto shouldDump =
> + [&](unsigned DIDT_Section, StringRef Section) {
> +    return (DumpType & DIDT_Section) && (Explicit || !Section.empty());
> + };  // Only print empty .dwo section headers when dumping a .dwo file.
> +  bool ExplicitDWO = Explicit && IsDWO;  auto shouldDumpDWO =
> + [&](unsigned DIDT_Section, StringRef Section) {
> +    return (DumpType & DIDT_Section) && (ExplicitDWO ||
> + !Section.empty());  };
> +
> +  // Dump individual sections.
> +  if (shouldDump(DIDT_DebugAbbrev, DObj->getAbbrevSection())) {
> +    OS << "\n.debug_abbrev contents:\n";
>      getDebugAbbrev()->dump(OS);
>    }
> +  if (shouldDumpDWO(DIDT_DebugAbbrev, DObj->getAbbrevDWOSection())) {
> +    OS << "\n.debug_abbrev.dwo contents:\n";
> +    getDebugAbbrevDWO()->dump(OS);
> +  }
> 
> -  if (DumpType & DIDT_DebugAbbrevDwo)
> -    if (const DWARFDebugAbbrev *D = getDebugAbbrevDWO()) {
> -      OS << "\n.debug_abbrev.dwo contents:\n";
> -      D->dump(OS);
> -    }
> -
> -  if (DumpType & DIDT_DebugInfo) {
> +  if (shouldDump(DIDT_DebugInfo, DObj->getInfoSection().Data)) {
>      OS << "\n.debug_info contents:\n";
>      for (const auto &CU : compile_units())
>        CU->dump(OS, DumpOpts);
>    }
> -
> -  if ((DumpType & DIDT_DebugInfoDwo) &&
> -      getNumDWOCompileUnits()) {
> +  if (shouldDumpDWO(DIDT_DebugInfo, DObj->getInfoDWOSection().Data)) {
>      OS << "\n.debug_info.dwo contents:\n";
>      for (const auto &DWOCU : dwo_compile_units())
>        DWOCU->dump(OS, DumpOpts);
>    }
> 
> -  if ((DumpType & DIDT_DebugTypes) && getNumTypeUnits()) {
> -    OS << "\n.debug_types contents:\n";
> -    for (const auto &TUS : type_unit_sections())
> -      for (const auto &TU : TUS)
> -        TU->dump(OS, DumpOpts);
> -  }
> -
> -  if ((DumpType & DIDT_DebugTypesDwo) &&
> -      getNumDWOTypeUnits()) {
> -    OS << "\n.debug_types.dwo contents:\n";
> -    for (const auto &DWOTUS : dwo_type_unit_sections())
> -      for (const auto &DWOTU : DWOTUS)
> -        DWOTU->dump(OS, DumpOpts);
> +  if ((DumpType & DIDT_DebugTypes)) {
> +    if (Explicit || getNumTypeUnits()) {
> +      OS << "\n.debug_types contents:\n";
> +      for (const auto &TUS : type_unit_sections())
> +        for (const auto &TU : TUS)
> +          TU->dump(OS, DumpOpts);
> +    }
> +    if (ExplicitDWO || getNumDWOTypeUnits()) {
> +      OS << "\n.debug_types.dwo contents:\n";
> +      for (const auto &DWOTUS : dwo_type_unit_sections())
> +        for (const auto &DWOTU : DWOTUS)
> +          DWOTU->dump(OS, DumpOpts);
> +    }
>    }
> 
> -  if (DumpType & DIDT_DebugLoc) {
> +  if (shouldDump(DIDT_DebugLoc, DObj->getLocSection().Data)) {
>      OS << "\n.debug_loc contents:\n";
>      getDebugLoc()->dump(OS, getRegisterInfo());
>    }
> -
> -  if (DumpType & DIDT_DebugLocDwo) {
> +  if (shouldDumpDWO(DIDT_DebugLoc, DObj->getLocDWOSection().Data)) {
>      OS << "\n.debug_loc.dwo contents:\n";
>      getDebugLocDWO()->dump(OS, getRegisterInfo());
>    }
> 
> -  if (DumpType & DIDT_DebugFrames) {
> +  if (shouldDump(DIDT_DebugFrames, DObj->getDebugFrameSection())) {
>      OS << "\n.debug_frame contents:\n";
>      getDebugFrame()->dump(OS);
> -    if (DumpEH) {
> -      OS << "\n.eh_frame contents:\n";
> -      getEHFrame()->dump(OS);
> -    }
> +  }
> +  if (DumpEH && !getEHFrame()->empty()) {
> +    OS << "\n.eh_frame contents:\n";
> +    getEHFrame()->dump(OS);
>    }
> 
>    if (DumpType & DIDT_DebugMacro) {
> -    OS << "\n.debug_macinfo contents:\n";
> -    getDebugMacro()->dump(OS);
> +    if (Explicit || !getDebugMacro()->empty()) {
> +      OS << "\n.debug_macinfo contents:\n";
> +      getDebugMacro()->dump(OS);
> +    }
>    }
> 
> -  uint32_t offset = 0;
> -  if (DumpType & DIDT_DebugAranges) {
> +  if (shouldDump(DIDT_DebugAranges, DObj->getARangeSection())) {
>      OS << "\n.debug_aranges contents:\n";
> +    uint32_t offset = 0;
>      DataExtractor arangesData(DObj->getARangeSection(), isLittleEndian(), 0);
>      DWARFDebugArangeSet set;
>      while (set.extract(arangesData, &offset)) @@ -304,7 +319,7 @@ void
> DWARFContext::dump(raw_ostream &OS,
>    }
> 
>    uint8_t savedAddressByteSize = 0;
> -  if (DumpType & DIDT_DebugLine) {
> +  if (shouldDump(DIDT_DebugLine, DObj->getLineSection().Data)) {
>      OS << "\n.debug_line contents:\n";
>      for (const auto &CU : compile_units()) {
>        savedAddressByteSize = CU->getAddressByteSize(); @@ -322,17 +337,12 @@
> void DWARFContext::dump(raw_ostream &OS,
>      }
>    }
> 
> -  if (DumpType & DIDT_DebugCUIndex) {
> -    OS << "\n.debug_cu_index contents:\n";
> -    getCUIndex().dump(OS);
> -  }
> -
> -  if (DumpType & DIDT_DebugTUIndex) {
> -    OS << "\n.debug_tu_index contents:\n";
> -    getTUIndex().dump(OS);
> +  // FIXME: This seems sketchy.
> +  for (const auto &CU : compile_units()) {
> +    savedAddressByteSize = CU->getAddressByteSize();
> +    break;
>    }
> -
> -  if (DumpType & DIDT_DebugLineDwo) {
> +  if (shouldDumpDWO(DIDT_DebugLine, DObj->getLineDWOSection().Data)) {
>      OS << "\n.debug_line.dwo contents:\n";
>      unsigned stmtOffset = 0;
>      DWARFDataExtractor lineData(*DObj, DObj->getLineDWOSection(), @@ -344,22
> +354,30 @@ void DWARFContext::dump(raw_ostream &OS,
>      }
>    }
> 
> -  if (DumpType & DIDT_DebugStr) {
> +  if (shouldDump(DIDT_DebugCUIndex, DObj->getCUIndexSection())) {
> +    OS << "\n.debug_cu_index contents:\n";
> +    getCUIndex().dump(OS);
> +  }
> +
> +  if (shouldDump(DIDT_DebugTUIndex, DObj->getTUIndexSection())) {
> +    OS << "\n.debug_tu_index contents:\n";
> +    getTUIndex().dump(OS);
> +  }
> +
> +  if (shouldDump(DIDT_DebugStr, DObj->getStringSection())) {
>      OS << "\n.debug_str contents:\n";
>      DataExtractor strData(DObj->getStringSection(), isLittleEndian(), 0);
> -    offset = 0;
> +    uint32_t offset = 0;
>      uint32_t strOffset = 0;
>      while (const char *s = strData.getCStr(&offset)) {
>        OS << format("0x%8.8x: \"%s\"\n", strOffset, s);
>        strOffset = offset;
>      }
>    }
> -
> -  if ((DumpType & DIDT_DebugStrDwo) &&
> -      !DObj->getStringDWOSection().empty()) {
> +  if (shouldDumpDWO(DIDT_DebugStr, DObj->getStringDWOSection())) {
>      OS << "\n.debug_str.dwo contents:\n";
>      DataExtractor strDWOData(DObj->getStringDWOSection(), isLittleEndian(),
> 0);
> -    offset = 0;
> +    uint32_t offset = 0;
>      uint32_t strDWOOffset = 0;
>      while (const char *s = strDWOData.getCStr(&offset)) {
>        OS << format("0x%8.8x: \"%s\"\n", strDWOOffset, s); @@ -367,69 +385,68
> @@ void DWARFContext::dump(raw_ostream &OS,
>      }
>    }
> 
> -  if (DumpType & DIDT_DebugRanges) {
> +  if (shouldDump(DIDT_DebugRanges, DObj->getRangeSection().Data)) {
>      OS << "\n.debug_ranges contents:\n";
>      // In fact, different compile units may have different address byte
> -    // sizes, but for simplicity we just use the address byte size of the
> last
> -    // compile unit (there is no easy and fast way to associate address range
> -    // list and the compile unit it describes).
> +    // sizes, but for simplicity we just use the address byte size of the
> +    // last compile unit (there is no easy and fast way to associate address
> +    // range list and the compile unit it describes).
> +    // FIXME: savedAddressByteSize seems sketchy.
>      DWARFDataExtractor rangesData(*DObj, DObj->getRangeSection(),
>                                    isLittleEndian(), savedAddressByteSize);
> -    offset = 0;
> +    uint32_t offset = 0;
>      DWARFDebugRangeList rangeList;
>      while (rangeList.extract(rangesData, &offset))
>        rangeList.dump(OS);
>    }
> 
> -  if (DumpType & DIDT_DebugPubnames)
> +  if (shouldDump(DIDT_DebugPubnames, DObj->getPubNamesSection()))
>      DWARFDebugPubTable(DObj->getPubNamesSection(), isLittleEndian(), false)
>          .dump("debug_pubnames", OS);
> 
> -  if (DumpType & DIDT_DebugPubtypes)
> +  if (shouldDump(DIDT_DebugPubtypes, DObj->getPubTypesSection()))
>      DWARFDebugPubTable(DObj->getPubTypesSection(), isLittleEndian(), false)
>          .dump("debug_pubtypes", OS);
> 
> -  if (DumpType & DIDT_DebugGnuPubnames)
> +  if (shouldDump(DIDT_DebugGnuPubnames, DObj->getGnuPubNamesSection()))
>      DWARFDebugPubTable(DObj->getGnuPubNamesSection(), isLittleEndian(),
>                         true /* GnuStyle */)
>          .dump("debug_gnu_pubnames", OS);
> 
> -  if (DumpType & DIDT_DebugGnuPubtypes)
> +  if (shouldDump(DIDT_DebugGnuPubtypes, DObj->getGnuPubTypesSection()))
>      DWARFDebugPubTable(DObj->getGnuPubTypesSection(), isLittleEndian(),
>                         true /* GnuStyle */)
>          .dump("debug_gnu_pubtypes", OS);
> 
> -  if (DumpType & DIDT_DebugStrOffsets)
> +  if (shouldDump(DIDT_DebugStrOffsets,
> + DObj->getStringOffsetSection().Data))
>      dumpStringOffsetsSection(
>          OS, "debug_str_offsets", *DObj, DObj->getStringOffsetSection(),
>          DObj->getStringSection(), isLittleEndian(), getMaxVersion());
> -
> -  if (DumpType & DIDT_DebugStrOffsetsDwo) {
> +  if (shouldDumpDWO(DIDT_DebugStrOffsets,
> +                    DObj->getStringOffsetDWOSection().Data))
>      dumpStringOffsetsSection(
>          OS, "debug_str_offsets.dwo", *DObj, DObj-
> >getStringOffsetDWOSection(),
>          DObj->getStringDWOSection(), isLittleEndian(), getMaxVersion());
> -  }
> 
> -  if ((DumpType & DIDT_GdbIndex) &&
> -      !DObj->getGdbIndexSection().empty()) {
> +  if (shouldDump(DIDT_GdbIndex, DObj->getGdbIndexSection())) {
>      OS << "\n.gnu_index contents:\n";
>      getGdbIndex().dump(OS);
>    }
> 
> -  if (DumpType & DIDT_AppleNames)
> +  if (shouldDump(DIDT_AppleNames, DObj->getAppleNamesSection().Data))
>      dumpAccelSection(OS, "apple_names", *DObj, DObj->getAppleNamesSection(),
>                       DObj->getStringSection(), isLittleEndian());
> 
> -  if (DumpType & DIDT_AppleTypes)
> +  if (shouldDump(DIDT_AppleTypes, DObj->getAppleTypesSection().Data))
>      dumpAccelSection(OS, "apple_types", *DObj, DObj->getAppleTypesSection(),
>                       DObj->getStringSection(), isLittleEndian());
> 
> -  if (DumpType & DIDT_AppleNamespaces)
> +  if (shouldDump(DIDT_AppleNamespaces,
> + DObj->getAppleNamespacesSection().Data))
>      dumpAccelSection(OS, "apple_namespaces", *DObj,
>                       DObj->getAppleNamespacesSection(),
>                       DObj->getStringSection(), isLittleEndian());
> 
> -  if (DumpType & DIDT_AppleObjC)
> +  if (shouldDump(DIDT_AppleObjC, DObj->getAppleObjCSection().Data))
>      dumpAccelSection(OS, "apple_objc", *DObj, DObj->getAppleObjCSection(),
>                       DObj->getStringSection(), isLittleEndian());  } @@ -
> 461,7 +478,7 @@ DWARFDie DWARFContext::getDIEForOffset(u
>    return DWARFDie();
>  }
> 
> -bool DWARFContext::verify(raw_ostream &OS, uint64_t DumpType,
> +bool DWARFContext::verify(raw_ostream &OS, unsigned DumpType,
>                            DIDumpOptions DumpOpts) {
>    bool Success = true;
>    DWARFVerifier verifier(OS, *this, DumpOpts);
> 
> Modified: llvm/trunk/test/DebugInfo/Inputs/gmlt.ll
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/DebugInfo/Inputs/gmlt.ll?rev=313207&r1=313206&r2=31320
> 7&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/Inputs/gmlt.ll (original)
> +++ llvm/trunk/test/DebugInfo/Inputs/gmlt.ll Wed Sep 13 15:09:01 2017
> @@ -87,12 +87,8 @@
> 
> 
>  ; Check that we don't emit any pubnames or pubtypes under -gmlt -; CHECK:
> .debug_pubnames contents:
> -; CHECK-NOT: Offset
> -
> -; CHECK: .debug_pubtypes contents:
> -; CHECK-NOT: Offset
> -
> +; CHECK-NOT: .debug_pubnames contents:
> +; CHECK-NOT: .debug_pubtypes contents:
>  ; CHECK: .apple{{.*}} contents:
> 
>  ; Function Attrs: nounwind uwtable
> 
> Modified: llvm/trunk/test/DebugInfo/X86/fission-inline.ll
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/DebugInfo/X86/fission-
> inline.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/fission-inline.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/fission-inline.ll Wed Sep 13 15:09:01
> +++ 2017
> @@ -71,6 +71,7 @@
>  ; CHECK:     DW_AT_call_file
>  ; CHECK-NEXT:     DW_AT_call_line {{.*}} (18)
>  ; CHECK-NOT: DW_
> +; CHECK: .debug_info.dwo contents:
> 
>  ; RELOCS-NOT: RELOCATION RECORDS FOR [.rela.debug_ranges]
> 
> 
> Modified: llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/DebugInfo/X86/fission-no-
> inlining.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/fission-no-inlining.ll Wed Sep 13
> +++ 15:09:01 2017
> @@ -1,6 +1,8 @@
>  ; RUN: llc -split-dwarf-file=foo.dwo -O0 < %s -mtriple=x86_64-unknown-linux-
> gnu -filetype=obj | llvm-dwarfdump -debug-info - | FileCheck %s
> 
> +; CHECK: .debug_info contents:
>  ; CHECK-NOT: DW_TAG_subprogram
> +; CHECK: contents:
> 
>  ; IR generated from the following source:
>  ; void f1();
> 
> Modified: llvm/trunk/test/DebugInfo/X86/fission-ranges.ll
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/DebugInfo/X86/fission-
> ranges.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/fission-ranges.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/fission-ranges.ll Wed Sep 13 15:09:01
> +++ 2017
> @@ -17,7 +17,7 @@
>  ; CHECK: DW_AT_location [DW_FORM_sec_offset]   ([[B:0x[0-9a-z]*]]
>  ; CHECK: DW_AT_location [DW_FORM_sec_offset]   ([[D:0x[0-9a-z]*]]
>  ; CHECK: DW_AT_ranges [DW_FORM_sec_offset]   (0x00000000
> -; CHECK: .debug_loc contents:
> +; CHECK-NOT: .debug_loc contents:
>  ; CHECK-NOT: Beginning address offset
>  ; CHECK: .debug_loc.dwo contents:
> 
> 
> Modified: llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/DebugInfo/X86/generate-odr-
> hash.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/generate-odr-hash.ll Wed Sep 13
> +++ 15:09:01 2017
> @@ -74,8 +74,7 @@
>  ; CHECK-NEXT: DW_AT_signature {{.*}} (0xfd756cee88f8a118)
> 
>  ; SINGLE-LABEL: .debug_types contents:
> -; FISSION-NOT: .debug_types contents:
> -; FISSION-LABEL: .debug_types.dwo contents:
> +; FISSION: .debug_types.dwo contents:
> 
>  ; Check that we generate a hash for bar and the value.
>  ; CHECK-NOT: type_signature
> @@ -127,7 +126,8 @@
>  ; CHECK: file_names{{.*}} bar.cpp
>  ; CHECK-NOT: file_names[
> 
> -; CHECK-LABEL: .debug_line.dwo contents:
> +; FISSION: .debug_line.dwo contents:
> +; CHECK-NOT: .debug_line.dwo contents:
>  ; FISSION: Line table prologue
>  ; FISSION: opcode_base: 1
>  ; FISSION-NOT: standard_opcode_lengths
> 
> Modified: llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/gnu-
> public-names-gmlt.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/gnu-public-names-gmlt.ll Wed Sep 13
> +++ 15:09:01 2017
> @@ -24,14 +24,10 @@
>  ; GPUB-NEXT: length = 0x0000000e version = 0x0002 unit_offset = 0x00000000  ;
> GPUB-NEXT: Name
> 
> -; NONE: .debug_pubnames contents:
> -; NONE: {{^$}}
> -; NONE: .debug_pubtypes contents:
> -; NONE: {{^$}}
> -; NONE: .debug_gnu_pubnames contents:
> -; NONE: {{^$}}
> -; NONE: .debug_gnu_pubtypes contents:
> -; NONE: {{^$}}
> +; NONE-NOT: .debug_pubnames contents:
> +; NONE-NOT: .debug_pubtypes contents:
> +; NONE-NOT: .debug_gnu_pubnames contents:
> +; NONE-NOT: .debug_gnu_pubtypes contents:
> 
> 
>  ; Function Attrs: noinline uwtable
> 
> Modified: llvm/trunk/test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/split-
> dwarf-cross-unit-reference.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll
> (original)
> +++ llvm/trunk/test/DebugInfo/X86/split-dwarf-cross-unit-reference.ll
> +++ Wed Sep 13 15:09:01 2017
> @@ -1,11 +1,11 @@
>  ; RUN: llc -mtriple=x86_64-linux -split-dwarf-cross-cu-references -split-
> dwarf-file=foo.dwo -filetype=obj -o %t < %s  ; RUN: llvm-objdump -r %t |
> FileCheck %s -; RUN: llvm-dwarfdump -v -debug-info-dwo %t | FileCheck --check-
> prefix=ALL --check-prefix=INFO --check-prefix=DWO --check-prefix=CROSS %s
> +; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck --check-prefix=ALL
> +--check-prefix=INFO --check-prefix=DWO --check-prefix=CROSS %s
>  ; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck --check-prefix=ALL --
> check-prefix=INFO %s
> 
>  ; RUN: llc -mtriple=x86_64-linux -split-dwarf-file=foo.dwo -filetype=obj -o
> %t < %s  ; RUN: llvm-objdump -r %t | FileCheck %s -; RUN: llvm-dwarfdump -v -
> debug-info-dwo %t | FileCheck --check-prefix=ALL --check-prefix=DWO --check-
> prefix=NOCROSS %s
> +; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck --check-prefix=ALL
> +--check-prefix=DWO --check-prefix=NOCROSS %s
>  ; RUN: llvm-dwarfdump -v -debug-info %t | FileCheck --check-prefix=ALL --
> check-prefix=INFO %s
> 
>  ; Testing cross-CU references for types, subprograms, and variables @@ -42,6
> +42,7 @@  ; * debug_info.dwo contains duplicate types, abstract subprograms
> and abstract
>  ;   variables otherwise to avoid the need for cross-cu references
> 
> +; DWO: .debug_info.dwo contents:
>  ; CHECK-NOT: .rel{{a?}}.debug_info.dwo
>  ; CHECK: RELOCATION RECORDS FOR [.rel{{a?}}.debug_info]:
>  ; CHECK-NOT: RELOCATION RECORDS
> 
> Modified: llvm/trunk/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/split-
> dwarf-multiple-cu-hash.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/split-dwarf-multiple-cu-hash.ll Wed
> +++ Sep 13 15:09:01 2017
> @@ -3,8 +3,10 @@
>  ; RUN: %llc_dwarf -split-dwarf-file=bar.dwo  %s -filetype=obj -o %t/b.o  ;
> RUN: llvm-dwarfdump -debug-info %t/a.o %t/b.o | FileCheck %s
> 
> +; CHECK: .debug_info contents:
>  ; CHECK: dwo_id {{.*}}([[HASH:.*]])
>  ; CHECK-NOT: dwo_id {{.*}}([[HASH]])
> +; CHECK: .debug_info.dwo contents:
> 
>  target triple = "x86_64-pc-linux"
> 
> 
> Modified: llvm/trunk/test/DebugInfo/X86/split-dwarf-omit-empty.ll
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/X86/split-
> dwarf-omit-empty.ll?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/X86/split-dwarf-omit-empty.ll (original)
> +++ llvm/trunk/test/DebugInfo/X86/split-dwarf-omit-empty.ll Wed Sep 13
> +++ 15:09:01 2017
> @@ -15,8 +15,10 @@
>  ; will be emitted. This emulates something more like the available_externally
> ; import performed by ThinLTO.
> 
> +; CHECK: .debug_info contents:
>  ; CHECK: Compile Unit
>  ; CHECK-NOT: Compile Unit
> +; CHECK: .debug_info.dwo contents:
> 
>  target triple = "x86_64-pc-linux"
> 
> 
> Modified: llvm/trunk/test/DebugInfo/dwarfdump-dump-flags.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-
> dump-flags.test?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/dwarfdump-dump-flags.test (original)
> +++ llvm/trunk/test/DebugInfo/dwarfdump-dump-flags.test Wed Sep 13
> +++ 15:09:01 2017
> @@ -6,10 +6,11 @@
>  ; RUN: llvm-dwarfdump %p/Inputs/dwarfdump-test.macho-i386.o --debug-ranges |
> FileCheck %s -check-prefix DUMP_RANGES
> 
>  ; DUMP_ALL: .debug_info
> -; DUMP_ALL: .debug_ranges
> +; DUMP_ALL: .debug_str
> 
>  ; DUMP_INFO: .debug_info
>  ; DUMP_INFO-NOT: .debug_ranges
> +; DUMP_INFO-NOT: .debug_str
> 
>  ; DUMP_RANGES-NOT: .debug_info
>  ; DUMP_RANGES: .debug_ranges
> 
> Modified: llvm/trunk/test/DebugInfo/dwarfdump-dwp.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/DebugInfo/dwarfdump-
> dwp.test?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/DebugInfo/dwarfdump-dwp.test (original)
> +++ llvm/trunk/test/DebugInfo/dwarfdump-dwp.test Wed Sep 13 15:09:01
> +++ 2017
> @@ -9,6 +9,7 @@ RUN: llvm-dwarfdump -v %p/Inputs/dwarfdu
>  ;   bar b() {
>  ;   }
> 
> +; CHECK-NOT: .debug_info contents:
>  ; CHECK-LABEL: .debug_info.dwo contents:
>  ; CHECK: Compile Unit
> 
> 
> Modified: llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-
> multiple-sections-dwarf-2.s?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s (original)
> +++ llvm/trunk/test/MC/ARM/dwarf-asm-multiple-sections-dwarf-2.s Wed Sep
> +++ 13 15:09:01 2017
> @@ -45,9 +45,8 @@ b:
>  // DWARF-NEXT: 0x0000000000000004     11      0      1   0   0 is_stmt
> end_sequence
> 
> 
> -// DWARF: .debug_ranges contents:
> -// DWARF-NOT: {{0-9a-f}}
> -// DWARF: .debug_pubnames contents:
> +// DWARF-NOT: .debug_ranges contents:
> +// DWARF-NOT: .debug_pubnames contents:
> 
> 
>  // RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
> 
> Modified: llvm/trunk/test/MC/ARM/dwarf-asm-no-code.s
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-no-
> code.s?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/MC/ARM/dwarf-asm-no-code.s (original)
> +++ llvm/trunk/test/MC/ARM/dwarf-asm-no-code.s Wed Sep 13 15:09:01 2017
> @@ -8,18 +8,10 @@
>  a:
>  .long 42
> 
> -// DWARF: .debug_abbrev contents:
> -// DWARF-NEXT: < EMPTY >
> -
> -// DWARF: .debug_info contents:
> -
> -// DWARF: .debug_aranges contents:
> -
> +// DWARF: ELF32-arm-little
> +// DWARF-NOT: contents:
>  // DWARF: .debug_line contents:
> 
> -// DWARF: .debug_ranges contents:
> -
> -
>  // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_info]:
> 
>  // RELOC-NOT: RELOCATION RECORDS FOR [.rel.debug_ranges]:
> 
> Modified: llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-
> nonstandard-section.s?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s (original)
> +++ llvm/trunk/test/MC/ARM/dwarf-asm-nonstandard-section.s Wed Sep 13
> +++ 15:09:01 2017
> @@ -37,9 +37,8 @@ b:
>  // DWARF-NEXT: 0x0000000000000004      7      0      1   0   0  is_stmt
> end_sequence
> 
> 
> -// DWARF: .debug_ranges contents:
> -// DWARF-NOT: {{0-9a-f}}
> -// DWARF: .debug_pubnames contents:
> +// DWARF-NOT: .debug_ranges contents:
> +// DWARF-NOT: .debug_pubnames contents:
> 
> 
> 
> 
> Modified: llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/MC/ARM/dwarf-asm-
> single-section.s?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s (original)
> +++ llvm/trunk/test/MC/ARM/dwarf-asm-single-section.s Wed Sep 13
> +++ 15:09:01 2017
> @@ -37,9 +37,8 @@ a:
>  // DWARF-NEXT: 0x0000000000000004      7      0      1   0   0 is_stmt
> end_sequence
> 
> 
> -// DWARF: .debug_ranges contents:
> -// DWARF-NOT: {{0-9a-f}}
> -// DWARF: .debug_pubnames contents:
> +// DWARF-NOT: .debug_ranges contents:
> +// DWARF-NOT: .debug_pubnames contents:
> 
> 
>  // RELOC: RELOCATION RECORDS FOR [.rel.debug_info]:
> 
> Modified: llvm/trunk/test/tools/dsymutil/X86/basic-linking-x86.test
> URL: http://llvm.org/viewvc/llvm-
> project/llvm/trunk/test/tools/dsymutil/X86/basic-linking-
> x86.test?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/tools/dsymutil/X86/basic-linking-x86.test (original)
> +++ llvm/trunk/test/tools/dsymutil/X86/basic-linking-x86.test Wed Sep 13
> +++ 15:09:01 2017
> @@ -140,8 +140,7 @@ CHECK:      DW_AT_frame_base [DW_FORM_bl
> 
>  CHECK:    NULL
> 
> -CHECK: .debug_loc contents
> -CHECK-NOT: Location
> +CHECK-NOT: .debug_loc contents
> 
>  CHECK:.debug_aranges contents:
>  CHECK-NEXT:Address Range Header: length = 0x0000002c, version = 0x0002,
> cu_offset = 0x00000000, addr_size = 0x08, seg_size = 0x00
> 
> Modified: llvm/trunk/test/tools/llvm-dwp/X86/empty.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-
> dwp/X86/empty.test?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-dwp/X86/empty.test (original)
> +++ llvm/trunk/test/tools/llvm-dwp/X86/empty.test Wed Sep 13 15:09:01
> +++ 2017
> @@ -1,8 +1,8 @@
>  RUN: llvm-dwp %p/../Inputs/empty.dwo -o %t
>  RUN: llvm-dwarfdump -v %t | FileCheck %s
> 
> -CHECK-LABEL: .debug_cu_index
> +CHECK: file format
> +CHECK-NOT: .debug_cu_index
>  CHECK-NOT: version
> -CHECK-LABEL: .debug_tu_index
> +CHECK-NOT: .debug_tu_index
>  CHECK-NOT: version
> -CHECK: .debug_
> 
> Modified: llvm/trunk/test/tools/llvm-dwp/X86/simple.test
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-
> dwp/X86/simple.test?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/test/tools/llvm-dwp/X86/simple.test (original)
> +++ llvm/trunk/test/tools/llvm-dwp/X86/simple.test Wed Sep 13 15:09:01
> +++ 2017
> @@ -76,8 +76,7 @@ TYPES:     3 [[DWOB]]  {{\[}}[[BOFF]], [
>  NOTYP:     3 [[DWOA]]  {{\[}}[[AOFF]], [[BOFF]]) [0x0000[[AAOFF]],
> 0x0000[[BAOFF]]) [0x00000000, 0x00000011) [0x00000000, 0x00000010)
>  NOTYP:     4 [[DWOB]]  {{\[}}[[BOFF]], [[XOFF]]) [0x0000[[BAOFF]],
> 0x00000075)      [0x00000011, 0x00000022) [0x00000010, 0x00000024)
> 
> -CHECK-LABEL: .debug_tu_index contents:
> -NOTYP-NOT: Index
> +CHECK-NOT: .debug_tu_index contents:
>  TYPES: Index Signature  TYPES                           ABBREV
> LINE                     STR_OFFSETS
>  TYPES:     1 [[FOOSIG]] {{\[}}[[FOOUOFF]], [[BARUOFF]]) [0x0000[[AAOFF]],
> 0x0000[[BAOFF]]) [0x00000000, 0x0000001a) [0x00000000, 0x00000010)
>  TYPES:     4 [[BARSIG]] {{\[}}[[BARUOFF]], [[XUOFF]])   [0x0000[[BAOFF]],
> 0x00000099)      [0x0000001a, 0x00000034) [0x00000010, 0x00000024)
> 
> Modified: llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-dwarfdump/llvm-
> dwarfdump.cpp?rev=313207&r1=313206&r2=313207&view=diff
> ==============================================================================
> --- llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp (original)
> +++ llvm/trunk/tools/llvm-dwarfdump/llvm-dwarfdump.cpp Wed Sep 13
> +++ 15:09:01 2017
> @@ -53,7 +53,7 @@ static opt<bool> DumpAll("all", desc("Du
>                           cat(SectionCategory));  static alias
> DumpAllAlias("a", desc("Alias for -all"), aliasopt(DumpAll));
> 
> -static uint64_t DumpType = DIDT_Null;
> +static unsigned DumpType = DIDT_Null;
>  #define HANDLE_DWARF_SECTION(ENUM_NAME, ELF_NAME, CMDLINE_NAME)
> \
>    static opt<bool> Dump##ENUM_NAME(CMDLINE_NAME,
> \
>                                     desc("Dump the " ELF_NAME " section"),
> \
> @@ -99,8 +99,7 @@ static void DumpObjectFile(ObjectFile &O
>                          Filename.str() + ": ");
>    // The UUID dump already contains all the same information.
>    if (!(DumpType & DIDT_UUID) || DumpType == DIDT_All)
> -    outs() << Filename << ":\tfile format " << Obj.getFileFormatName()
> -           << "\n\n";
> +    outs() << Filename << ":\tfile format " << Obj.getFileFormatName()
> + << '\n';
> 
>    // Dump the complete DWARF structure.
>    DICtx->dump(outs(), GetDumpOpts());
> 
> 
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits


More information about the llvm-commits mailing list