From f4bc1f77b78481a01e6a2339a83cb25d2c261390 Mon Sep 17 00:00:00 2001 From: Adrian Prantl Date: Thu, 1 Jun 2017 18:18:23 +0000 Subject: [DWARF] Introduce Dump Options This commit introduces a structure that holds all the flags that control the pretty printing of dwarf output. Patch by Spyridoula Gravani! Differential Revision: https://reviews.llvm.org/D33749 llvm-svn: 304446 --- llvm/tools/llvm-objdump/MachODump.cpp | 5 ++++- llvm/tools/llvm-objdump/llvm-objdump.cpp | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'llvm/tools/llvm-objdump') diff --git a/llvm/tools/llvm-objdump/MachODump.cpp b/llvm/tools/llvm-objdump/MachODump.cpp index 9e02951a4a9..a260d6ff42c 100644 --- a/llvm/tools/llvm-objdump/MachODump.cpp +++ b/llvm/tools/llvm-objdump/MachODump.cpp @@ -1271,7 +1271,10 @@ static void ProcessMachO(StringRef Name, MachOObjectFile *MachOOF, if (DwarfDumpType != DIDT_Null) { std::unique_ptr DICtx(new DWARFContextInMemory(*MachOOF)); // Dump the complete DWARF structure. - DICtx->dump(outs(), DwarfDumpType, true /* DumpEH */); + DIDumpOptions DumpOpts; + DumpOpts.DumpType = DwarfDumpType; + DumpOpts.DumpEH = true; + DICtx->dump(outs(), DumpOpts); } } diff --git a/llvm/tools/llvm-objdump/llvm-objdump.cpp b/llvm/tools/llvm-objdump/llvm-objdump.cpp index 18fa0e07408..6a915157090 100644 --- a/llvm/tools/llvm-objdump/llvm-objdump.cpp +++ b/llvm/tools/llvm-objdump/llvm-objdump.cpp @@ -2064,7 +2064,10 @@ static void DumpObject(ObjectFile *o, const Archive *a = nullptr) { if (DwarfDumpType != DIDT_Null) { std::unique_ptr DICtx(new DWARFContextInMemory(*o)); // Dump the complete DWARF structure. - DICtx->dump(outs(), DwarfDumpType, true /* DumpEH */); + DIDumpOptions DumpOpts; + DumpOpts.DumpType = DwarfDumpType; + DumpOpts.DumpEH = true; + DICtx->dump(outs(), DumpOpts); } } -- cgit v1.2.3