summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/LinePrinter.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-03-02 04:39:56 +0000
committerZachary Turner <zturner@google.com>2015-03-02 04:39:56 +0000
commit7797c726b9a864372553de4b640c540b1dae8251 (patch)
tree655a6b62386ef5b43759a072b66b3d588fea3ba1 /llvm/tools/llvm-pdbdump/LinePrinter.cpp
parent968ceddca9a80197db8c785faf80fa9fc44ef7cd (diff)
downloadbcm5719-llvm-7797c726b9a864372553de4b640c540b1dae8251.tar.gz
bcm5719-llvm-7797c726b9a864372553de4b640c540b1dae8251.zip
[llvm-pdbdump] Many minor fixes and improvements
A short list of some of the improvements: 1) Now supports -all command line argument, which implies many other command line arguments to simplify usage. 2) Now supports -no-compiler-generated command line argument to exclude compiler generated types. 3) Prints base class list. 4) -class-definitions implies -types. 5) Proper display of bitfields. 6) Can now distinguish between struct/class/interface/union. And a few other minor tweaks. llvm-svn: 230933
Diffstat (limited to 'llvm/tools/llvm-pdbdump/LinePrinter.cpp')
-rw-r--r--llvm/tools/llvm-pdbdump/LinePrinter.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/llvm/tools/llvm-pdbdump/LinePrinter.cpp b/llvm/tools/llvm-pdbdump/LinePrinter.cpp
index 7aa93599a20..6bbc403f5ca 100644
--- a/llvm/tools/llvm-pdbdump/LinePrinter.cpp
+++ b/llvm/tools/llvm-pdbdump/LinePrinter.cpp
@@ -9,6 +9,8 @@
#include "LinePrinter.h"
+#include "llvm-pdbdump.h"
+
#include "llvm/Support/Regex.h"
#include <algorithm>
@@ -16,7 +18,13 @@
using namespace llvm;
LinePrinter::LinePrinter(int Indent, llvm::raw_ostream &Stream)
- : OS(Stream), IndentSpaces(Indent), CurrentIndent(0) {}
+ : OS(Stream), IndentSpaces(Indent), CurrentIndent(0) {
+ SetFilters(TypeFilters, opts::ExcludeTypes.begin(), opts::ExcludeTypes.end());
+ SetFilters(SymbolFilters, opts::ExcludeSymbols.begin(),
+ opts::ExcludeSymbols.end());
+ SetFilters(CompilandFilters, opts::ExcludeCompilands.begin(),
+ opts::ExcludeCompilands.end());
+}
void LinePrinter::Indent() { CurrentIndent += IndentSpaces; }
@@ -86,6 +94,7 @@ void WithColor::translateColor(PDB_ColorItem C, raw_ostream::Colors &Color,
Color = raw_ostream::MAGENTA;
Bold = true;
return;
+ case PDB_ColorItem::Register:
case PDB_ColorItem::Offset:
Color = raw_ostream::YELLOW;
Bold = false;
OpenPOWER on IntegriCloud