LLVM: include/llvm/Support/Debug.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28#ifndef LLVM_SUPPORT_DEBUG_H
29#define LLVM_SUPPORT_DEBUG_H
30
32
33namespace llvm {
34
36
37#ifndef NDEBUG
38
39
40
41
42
43
44
46
47
48
49
50
51
52
53
54
56
57
58
59
60
62
63
64
65
66
67
68
69
70
71
72#define DEBUG_WITH_TYPE(TYPE, ...) \
73 do { \
74 if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE, 1)) { \
75 __VA_ARGS__; \
76 } \
77 } while (false)
78
79#else
80#define isCurrentDebugType(X) (false)
81#define setCurrentDebugType(X) do { (void)(X); } while (false)
82#define setCurrentDebugTypes(X, N) do { (void)(X); (void)(N); } while (false)
83#define DEBUG_WITH_TYPE(TYPE, ...) \
84 do { \
85 } while (false)
86#endif
87
88
89
90
91
93
94
95
96
97
98
99
101
102
103
104
106
107
108
109
110
111
112
113
114#define LLVM_DEBUG(...) DEBUG_WITH_TYPE(DEBUG_TYPE, __VA_ARGS__)
115
116}
117
118#endif
The instances of the Type class are immutable: once they are created, they are never changed.
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI bool EnableDebugBuffering
EnableDebugBuffering - This defaults to false.
LLVM_ABI bool isCurrentDebugType(const char *Type, int Level=0)
isCurrentDebugType - Return true if the specified string is the debug type specified on the command l...
LLVM_ABI bool DebugFlag
This boolean is set to true if the '-debug' command line option is specified.
LLVM_ABI void setCurrentDebugTypes(const char **Types, unsigned Count)
setCurrentDebugTypes - Set the current debug type, as if the -debug-only=X,Y,Z option were specified.
LLVM_ABI raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
LLVM_ABI void setCurrentDebugType(const char *Type)
setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.
FunctionAddr VTableAddr Count