summaryrefslogtreecommitdiff
path: root/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
diff options
context:
space:
mode:
authorZachary Turner <zturner@google.com>2015-02-22 22:03:38 +0000
committerZachary Turner <zturner@google.com>2015-02-22 22:03:38 +0000
commit395adf9f891cdbe5aa58d0817c06a27880894eb4 (patch)
tree7406f1203736670098039311269a8d5b2bf89ccf /lib/DebugInfo/PDB/PDBSymbolLabel.cpp
parente759e99a67aeeb96048e8358d7ad20a9530e6807 (diff)
[llvm-pdbdump] Rewrite dumper using visitor pattern.
This increases the flexibility of how to dump different symbol types -- necessary for context-sensitive formatting of symbol types -- and also improves the modularity by allowing the dumping to be implemented in the actual dumper, as opposed to in the PDB library. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230184 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/DebugInfo/PDB/PDBSymbolLabel.cpp')
-rw-r--r--lib/DebugInfo/PDB/PDBSymbolLabel.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/DebugInfo/PDB/PDBSymbolLabel.cpp b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
index abb516330de..ce569e2f50b 100644
--- a/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
+++ b/lib/DebugInfo/PDB/PDBSymbolLabel.cpp
@@ -9,8 +9,7 @@
#include "llvm/DebugInfo/PDB/PDBSymbolLabel.h"
-#include "llvm/DebugInfo/PDB/PDBSymbol.h"
-#include "llvm/Support/Format.h"
+#include "llvm/DebugInfo/PDB/PDBSymDumper.h"
#include <utility>
@@ -21,8 +20,6 @@ PDBSymbolLabel::PDBSymbolLabel(const IPDBSession &PDBSession,
: PDBSymbol(PDBSession, std::move(Symbol)) {}
void PDBSymbolLabel::dump(raw_ostream &OS, int Indent,
- PDB_DumpLevel Level, PDB_DumpFlags Flags) const {
- OS << stream_indent(Indent);
- OS << "label [" << format_hex(getRelativeVirtualAddress(), 10) << "] "
- << getName();
+ PDBSymDumper &Dumper) const {
+ Dumper.dump(*this, OS, Indent);
}