diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-13 09:43:05 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2017-09-13 09:43:05 +0000 |
commit | 27476ce24b988b463029ef63d30f5c081d38923e (patch) | |
tree | d47fad0d3dc97db9cb184ec1d59ef1599f37e6d7 /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | a753080d1e47ba0cf6e8cb4c62306dc0c6aa8e1c (diff) | |
download | bcm5719-llvm-27476ce24b988b463029ef63d30f5c081d38923e.tar.gz bcm5719-llvm-27476ce24b988b463029ef63d30f5c081d38923e.zip |
[dwarfdump] Rename Brief to Verbose in DIDumpOptions
This patches renames "brief" to "verbose" in de DIDumpOptions and
inverts the logic to match the new behavior where brief is the default.
Changing the default value uncovered some bugs related to the
DIDumpOptions not being propagated and have been fixed as well.
Differential revision: https://reviews.llvm.org/D37745
llvm-svn: 313139
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 9fded20eeb5..39d207b8d58 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -82,6 +82,14 @@ static void error(StringRef Filename, std::error_code EC) { exit(1); } +static DIDumpOptions GetDumpOpts() { + DIDumpOptions DumpOpts; + DumpOpts.DumpType = DumpType; + DumpOpts.SummarizeTypes = SummarizeTypes; + DumpOpts.Verbose = Verbose; + return DumpOpts; +} + static void DumpObjectFile(ObjectFile &Obj, Twine Filename) { std::unique_ptr<DWARFContext> DICtx = DWARFContext::create(Obj); logAllUnhandledErrors(DICtx->loadRegisterInfo(Obj), errs(), @@ -92,11 +100,7 @@ static void DumpObjectFile(ObjectFile &Obj, Twine Filename) { // Dump the complete DWARF structure. - DIDumpOptions DumpOpts; - DumpOpts.DumpType = DumpType; - DumpOpts.SummarizeTypes = SummarizeTypes; - DumpOpts.Brief = !Verbose; - DICtx->dump(outs(), DumpOpts); + DICtx->dump(outs(), GetDumpOpts()); } static void DumpInput(StringRef Filename) { @@ -129,7 +133,7 @@ static bool VerifyObjectFile(ObjectFile &Obj, Twine Filename) { raw_ostream &stream = Quiet ? nulls() : outs(); stream << "Verifying " << Filename.str() << ":\tfile format " << Obj.getFileFormatName() << "\n"; - bool Result = DICtx->verify(stream, DumpType); + bool Result = DICtx->verify(stream, DumpType, GetDumpOpts()); if (Result) stream << "No errors.\n"; else |