diff options
author | David Blaikie <dblaikie@gmail.com> | 2016-10-18 21:09:48 +0000 |
---|---|---|
committer | David Blaikie <dblaikie@gmail.com> | 2016-10-18 21:09:48 +0000 |
commit | 50cc27ecb931c0ffeace0da054848fee62d95e96 (patch) | |
tree | c4e042b5211715b3db71b3643062baf902e8802c /llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | |
parent | c0a717ba5bf41ad90ba1ad8151f2b15b79c65998 (diff) | |
download | bcm5719-llvm-50cc27ecb931c0ffeace0da054848fee62d95e96.tar.gz bcm5719-llvm-50cc27ecb931c0ffeace0da054848fee62d95e96.zip |
dwarfdump: -summarize-types: print a short summary (unqualified type name, hash, length) of type units rather than dumping contents
This is just a quick utility handy for getting rough summaries of types
in a given object or dwo file. I've been using it to investigate the
amount of type info redundancy across a project build, for example.
llvm-svn: 284537
Diffstat (limited to 'llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp')
-rw-r--r-- | llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp index 429df622ef5..f3e16dc6f00 100644 --- a/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp +++ b/llvm/tools/llvm-dwarfdump/llvm-dwarfdump.cpp @@ -74,6 +74,10 @@ static cl::opt<DIDumpType> DumpType( clEnumValN(DIDT_GdbIndex, "gdb_index", ".gdb_index"), clEnumValN(DIDT_TUIndex, "tu_index", ".debug_tu_index"))); +static cl::opt<bool> + SummarizeTypes("summarize-types", + cl::desc("Abbreviate the description of type unit entries")); + static void error(StringRef Filename, std::error_code EC) { if (!EC) return; @@ -87,7 +91,7 @@ static void DumpObjectFile(ObjectFile &Obj, Twine Filename) { outs() << Filename.str() << ":\tfile format " << Obj.getFileFormatName() << "\n\n"; // Dump the complete DWARF structure. - DICtx->dump(outs(), DumpType); + DICtx->dump(outs(), DumpType, false, SummarizeTypes); } static void DumpInput(StringRef Filename) { |