LLVM: include/llvm/Support/Debug.h Source File (original) (raw)
Go to the documentation of this file.
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
31namespace llvm {
32
33class raw_ostream;
34
35#ifndef NDEBUG
36
37
38
39
40
42
43
44
45
46
48
49
50
51
52
54
55
56
57
58
59
60
61
62
63
64#define DEBUG_WITH_TYPE(TYPE, ...) \
65 do { \
66 if (::llvm::DebugFlag && ::llvm::isCurrentDebugType(TYPE)) { \
67 __VA_ARGS__; \
68 } \
69 } while (false)
70
71#else
72#define isCurrentDebugType(X) (false)
73#define setCurrentDebugType(X) do { (void)(X); } while (false)
74#define setCurrentDebugTypes(X, N) do { (void)(X); (void)(N); } while (false)
75#define DEBUG_WITH_TYPE(TYPE, ...) \
76 do { \
77 } while (false)
78#endif
79
80
81
82
83
85
86
87
88
89
90
91
93
94
95
96
97raw_ostream &dbgs();
98
99
100
101
102
103
104
105
106#define LLVM_DEBUG(...) DEBUG_WITH_TYPE(DEBUG_TYPE, __VA_ARGS__)
107
108}
109
110#endif
This is an optimization pass for GlobalISel generic memory operations.
bool EnableDebugBuffering
EnableDebugBuffering - This defaults to false.
bool DebugFlag
This boolean is set to true if the '-debug' command line option is specified.
void setCurrentDebugTypes(const char **Types, unsigned Count)
setCurrentDebugTypes - Set the current debug type, as if the -debug-only=X,Y,Z option were specified.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void setCurrentDebugType(const char *Type)
setCurrentDebugType - Set the current debug type, as if the -debug-only=X option were specified.
bool isCurrentDebugType(const char *Type)
isCurrentDebugType - Return true if the specified string is the debug type specified on the command l...