Skip to content

Commit 6cebcaa

Browse files
author
tnowicki
committed
SWDEV-303548 - Clang format
1 parent 6c40a09 commit 6cebcaa

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

llvm/include/llvm/Support/Debug.h

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff 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

llvm/unittests/Support/DebugTest.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
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) {
3636
TEST(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];

0 commit comments

Comments
 (0)