diff options
| author | Zachary Turner <zturner@google.com> | 2015-02-22 22:03:38 +0000 |
|---|---|---|
| committer | Zachary Turner <zturner@google.com> | 2015-02-22 22:03:38 +0000 |
| commit | 9a818ad193d19ef2f560e6da4b0fcf6748979fdb (patch) | |
| tree | dc22e1c7f49c2326e9ec39be74c601925dc9b133 /llvm/tools/llvm-pdbdump/llvm-pdbdump.h | |
| parent | 87f4c90a5c0b38d497e975e8e2c54bbd6f4050a5 (diff) | |
| download | bcm5719-llvm-9a818ad193d19ef2f560e6da4b0fcf6748979fdb.tar.gz bcm5719-llvm-9a818ad193d19ef2f560e6da4b0fcf6748979fdb.zip | |
[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.
llvm-svn: 230184
Diffstat (limited to 'llvm/tools/llvm-pdbdump/llvm-pdbdump.h')
| -rw-r--r-- | llvm/tools/llvm-pdbdump/llvm-pdbdump.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/llvm/tools/llvm-pdbdump/llvm-pdbdump.h b/llvm/tools/llvm-pdbdump/llvm-pdbdump.h new file mode 100644 index 00000000000..74a171810c7 --- /dev/null +++ b/llvm/tools/llvm-pdbdump/llvm-pdbdump.h @@ -0,0 +1,28 @@ +//===- llvm-pdbdump.h ----------------------------------------- *- C++ --*-===// +// +// The LLVM Compiler Infrastructure +// +// This file is distributed under the University of Illinois Open Source +// License. See LICENSE.TXT for details. +// +//===----------------------------------------------------------------------===// + +#ifndef LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H +#define LLVM_TOOLS_LLVMPDBDUMP_LLVMPDBDUMP_H + +#include "llvm/Support/raw_ostream.h" + +namespace llvm { +struct newline { + newline(int IndentWidth) : Width(IndentWidth) {} + int Width; +}; + +inline raw_ostream &operator<<(raw_ostream &OS, const newline &Indent) { + OS << "\n"; + OS.indent(Indent.Width); + return OS; +} +} + +#endif
\ No newline at end of file |

