[PM/AA] Extract the interface for GlobalsModRef into a header along with
[oota-llvm.git] / tools / llvm-pdbdump / LinePrinter.h
index 003e847bbb448df4b2810ee1c16878b74139643c..b985e93419095db298084fadd401edfe7d816f4f 100644 (file)
@@ -10,6 +10,7 @@
 #ifndef LLVM_TOOLS_LLVMPDBDUMP_LINEPRINTER_H
 #define LLVM_TOOLS_LLVMPDBDUMP_LINEPRINTER_H
 
+#include "llvm/ADT/StringRef.h"
 #include "llvm/ADT/Twine.h"
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Support/Regex.h"
@@ -24,27 +25,25 @@ class LinePrinter {
 public:
   LinePrinter(int Indent, raw_ostream &Stream);
 
-  template <typename Iter> void SetTypeFilters(Iter Begin, Iter End) {
-    TypeFilters.assign(Begin, End);
-  }
-  template <typename Iter> void SetSymbolFilters(Iter Begin, Iter End) {
-    SymbolFilters.assign(Begin, End);
-  }
-  template <typename Iter> void SetCompilandFilters(Iter Begin, Iter End) {
-    CompilandFilters.assign(Begin, End);
-  }
-
   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.emplace_back(StringRef(*Begin));
+  }
+
   raw_ostream &OS;
   int IndentSpaces;
   int CurrentIndent;
@@ -70,6 +69,7 @@ enum class PDB_ColorItem {
   Path,
   SectionHeader,
   LiteralValue,
+  Register,
 };
 
 class WithColor {