summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-04 06:09:53 +0000
committerZachary Turner <zturner@google.com>2015-03-04 06:09:53 +0000
commit653236596af12b89fd3701f86b160a850ddcff21 (patch)
tree189942c606d6e482acf91a3e87e215cca748b31e /llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
parent90746340029f43ac3bfd53a08175b92082e26cfd (diff)
downloadbcm5719-llvm-653236596af12b89fd3701f86b160a850ddcff21.tar.gz
bcm5719-llvm-653236596af12b89fd3701f86b160a850ddcff21.zip
[llvm-pdbdump] Display full enum definitions.
This will now display enum definitions both at the global scope as well as nested inside of classes. Additionally, it will no longer display enums at the global scope if the enum is nested. Instead, it will omit the definition of the enum globally and instead emit it in the corresponding class definition. llvm-svn: 231215
Diffstat (limited to 'llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp15
1 files changed, 7 insertions, 8 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
index 1181307fd8a..78535ec0be9 100644
--- a/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
+++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.cpp
@@ -67,10 +67,6 @@ cl::opt<bool> Globals("globals", cl::desc("Dump global symbols"),
cl::cat(TypeCategory));
cl::opt<bool> Types("types", cl::desc("Display types"), cl::cat(TypeCategory));
cl::opt<bool>
- ClassDefs("class-definitions",
- cl::desc("Display full class definitions (implies -types)"),
- cl::cat(TypeCategory));
-cl::opt<bool>
All("all", cl::desc("Implies all other options in 'Symbol Types' category"),
cl::cat(TypeCategory));
@@ -94,6 +90,12 @@ cl::opt<bool>
ExcludeSystemLibraries("no-system-libs",
cl::desc("Don't show symbols from system libraries"),
cl::cat(FilterCategory));
+cl::opt<bool> NoClassDefs("no-class-definitions",
+ cl::desc("Don't display full class definitions"),
+ cl::cat(FilterCategory));
+cl::opt<bool> NoEnumDefs("no-enum-definitions",
+ cl::desc("Don't display full enum definitions"),
+ cl::cat(FilterCategory));
}
static void dumpInput(StringRef Path) {
@@ -171,7 +173,7 @@ static void dumpInput(StringRef Path) {
Printer.NewLine();
WithColor(Printer, PDB_ColorItem::SectionHeader).get() << "---TYPES---";
Printer.Indent();
- TypeDumper Dumper(Printer, opts::ClassDefs);
+ TypeDumper Dumper(Printer);
Dumper.start(*GlobalScope);
Printer.Unindent();
}
@@ -233,14 +235,11 @@ int main(int argc_, const char *argv_[]) {
llvm_shutdown_obj Y; // Call llvm_shutdown() on exit.
cl::ParseCommandLineOptions(argv.size(), argv.data(), "LLVM PDB Dumper\n");
- if (opts::ClassDefs)
- opts::Types = true;
if (opts::All) {
opts::Compilands = true;
opts::Symbols = true;
opts::Globals = true;
opts::Types = true;
- opts::ClassDefs = true;
}
if (opts::ExcludeCompilerGenerated) {
opts::ExcludeTypes.push_back("__vc_attributes");
OpenPOWER on IntegriCloud