LLVM  4.0.0
DIPrinter.h
Go to the documentation of this file.
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 
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  int PrintSourceContext;
32 
33  void print(const DILineInfo &Info, bool Inlined);
34  void printContext(const std::string &FileName, int64_t Line);
35 
36 public:
37  DIPrinter(raw_ostream &OS, bool PrintFunctionNames = true,
38  bool PrintPretty = false, int PrintSourceContext = 0)
39  : OS(OS), PrintFunctionNames(PrintFunctionNames),
40  PrintPretty(PrintPretty), PrintSourceContext(PrintSourceContext) {}
41 
42  DIPrinter &operator<<(const DILineInfo &Info);
43  DIPrinter &operator<<(const DIInliningInfo &Info);
44  DIPrinter &operator<<(const DIGlobal &Global);
45 };
46 }
47 }
48 
49 #endif
50 
DIPrinter & operator<<(const DILineInfo &Info)
Definition: DIPrinter.cpp:85
DILineInfo - a format-neutral container for source line information.
Definition: DIContext.h:32
DIInliningInfo - a format-neutral container for inlined code description.
Definition: DIContext.h:61
DIPrinter(raw_ostream &OS, bool PrintFunctionNames=true, bool PrintPretty=false, int PrintSourceContext=0)
Definition: DIPrinter.h:37
This class implements an extremely fast bulk output stream that can only output to a stream...
Definition: raw_ostream.h:44
DIGlobal - container for description of a global variable.
Definition: DIContext.h:87