summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-pdbdump/LinePrinter.h
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.h
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.h')
-rw-r--r--llvm/tools/llvm-pdbdump/LinePrinter.h25
1 files changed, 9 insertions, 16 deletions
diff --git a/llvm/tools/llvm-pdbdump/LinePrinter.h b/llvm/tools/llvm-pdbdump/LinePrinter.h
index 51b4fa9e4e9..c2a3ab60d90 100644
--- a/llvm/tools/llvm-pdbdump/LinePrinter.h
+++ b/llvm/tools/llvm-pdbdump/LinePrinter.h
@@ -25,33 +25,25 @@ class LinePrinter {
public:
LinePrinter(int Indent, raw_ostream &Stream);
- template <typename Iter> void SetTypeFilters(Iter Begin, Iter End) {
- TypeFilters.clear();
- for (; Begin != End; ++Begin)
- TypeFilters.push_back(StringRef(*Begin));
- }
- template <typename Iter> void SetSymbolFilters(Iter Begin, Iter End) {
- SymbolFilters.clear();
- for (; Begin != End; ++Begin)
- SymbolFilters.push_back(StringRef(*Begin));
- }
- template <typename Iter> void SetCompilandFilters(Iter Begin, Iter End) {
- CompilandFilters.clear();
- for (; Begin != End; ++Begin)
- CompilandFilters.push_back(StringRef(*Begin));
- }
-
void Indent();
void Unindent();
void NewLine();
raw_ostream &getStream() { return OS; }
+ int getIndentLevel() const { return CurrentIndent; }
bool IsTypeExcluded(llvm::StringRef TypeName);
bool IsSymbolExcluded(llvm::StringRef SymbolName);
bool IsCompilandExcluded(llvm::StringRef CompilandName);
private:
+ template <typename Iter>
+ void SetFilters(std::list<Regex> &List, Iter Begin, Iter End) {
+ List.clear();
+ for (; Begin != End; ++Begin)
+ List.push_back(StringRef(*Begin));
+ }
+
raw_ostream &OS;
int IndentSpaces;
int CurrentIndent;
@@ -77,6 +69,7 @@ enum class PDB_ColorItem {
Path,
SectionHeader,
LiteralValue,
+ Register,
};
class WithColor {
OpenPOWER on IntegriCloud