File tree Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Expand file tree Collapse file tree 2 files changed +14
-9
lines changed Original file line number Diff line number Diff line change @@ -61,15 +61,20 @@ void setCurrentDebugTypes(const char **Types, unsigned Count);
6161// /
6262// / This will emit the debug information if -debug is present, and -debug-only
6363// / is not specified, or is specified as "bitset".
64- #define DEBUG_WITH_TYPE (TYPE, ...) \
65- do { if (::llvm::DebugFlag && ::llvm::isCurrentDebugType (TYPE)) { __VA_ARGS__; } \
64+ #define DEBUG_WITH_TYPE (TYPE, ...) \
65+ do { \
66+ if (::llvm::DebugFlag && ::llvm::isCurrentDebugType (TYPE)) { \
67+ __VA_ARGS__; \
68+ } \
6669 } while (false )
6770
6871#else
6972#define isCurrentDebugType (X ) (false )
7073#define setCurrentDebugType (X ) do { (void )(X); } while (false )
7174#define setCurrentDebugTypes (X, N ) do { (void )(X); (void )(N); } while (false )
72- #define DEBUG_WITH_TYPE (TYPE, ...) do { } while (false )
75+ #define DEBUG_WITH_TYPE (TYPE, ...) \
76+ do { \
77+ } while (false )
7378#endif
7479
7580// / This boolean is set to true if the '-debug' command line option
Original file line number Diff line number Diff line change 66//
77// ===----------------------------------------------------------------------===//
88
9- #include " llvm/ADT/MapVector.h"
109#include " llvm/Support/Debug.h"
10+ #include " llvm/ADT/MapVector.h"
1111#include " llvm/Support/MathExtras.h"
1212#include " llvm/Support/raw_ostream.h"
1313#include " gtest/gtest.h"
@@ -36,14 +36,14 @@ TEST(DebugTest, Basic) {
3636TEST (DebugTest, CommaInDebugBlock) {
3737 std::string s1, s2;
3838 raw_string_ostream os1 (s1), os2 (s2);
39- static const char *DT[] = {" A" , " B" };
40- static const char Letters[] = {' X' , ' Y' , ' Z' };
41-
39+ static const char *DT[] = {" A" , " B" };
40+ static const char Letters[] = {' X' , ' Y' , ' Z' };
41+
4242 llvm::DebugFlag = true ;
4343 setCurrentDebugTypes (DT, 2 );
4444 DEBUG_WITH_TYPE (" A" , {
45- SmallMapVector <int , char , 4 > map;
46- for (int i = 0 ; i < 3 ; i++)
45+ SmallMapVector<int , char , 4 > map;
46+ for (int i = 0 ; i < 3 ; i++)
4747 map[i] = Letters[i];
4848 for (int i = 2 ; i >= 0 ; i--)
4949 os1 << map[i];
You can’t perform that action at this time.
0 commit comments