[Symbolizer]: Add -pretty-print option
[oota-llvm.git] / include / llvm / DebugInfo / Symbolize / DIPrinter.h
1 //===- llvm/DebugInfo/Symbolize/DIPrinter.h ---------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares the DIPrinter class, which is responsible for printing
11 // structures defined in DebugInfo/DIContext.h
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef LLVM_DEBUGINFO_SYMBOLIZE_DIPRINTER_H
16 #define LLVM_DEBUGINFO_SYMBOLIZE_DIPRINTER_H
17
18 #include "llvm/Support/raw_ostream.h"
19
20 namespace llvm {
21 struct DILineInfo;
22 class DIInliningInfo;
23 struct DIGlobal;
24
25 namespace symbolize {
26
27 class DIPrinter {
28   raw_ostream &OS;
29   bool PrintFunctionNames;
30   bool PrintPretty;
31   void printName(const DILineInfo &Info, bool Inlined);
32
33 public:
34   DIPrinter(raw_ostream &OS, bool PrintFunctionNames = true,
35             bool PrintPretty = false)
36       : OS(OS), PrintFunctionNames(PrintFunctionNames),
37         PrintPretty(PrintPretty) {}
38
39   DIPrinter &operator<<(const DILineInfo &Info);
40   DIPrinter &operator<<(const DIInliningInfo &Info);
41   DIPrinter &operator<<(const DIGlobal &Global);
42 };
43 }
44 }
45
46 #endif
47