Use braces in multi-statement DEBUG() code [NFC]
By adding braces into the DEBUG statement we can make clang-format format code
such as:
DEBUG(stmt1(); stmt2())
as multi-line code:
DEBUG({
stmt1();
stmt2();
});
This makes control-flow in debug statements easier to read.
llvm-svn: 220441
diff --git a/polly/lib/Support/SCEVValidator.cpp b/polly/lib/Support/SCEVValidator.cpp
index 3a8895f..6c38782 100644
--- a/polly/lib/Support/SCEVValidator.cpp
+++ b/polly/lib/Support/SCEVValidator.cpp
@@ -471,12 +471,20 @@
return false;
SCEVValidator Validator(R, SE, BaseAddress);
- DEBUG(dbgs() << "\n"; dbgs() << "Expr: " << *Expr << "\n";
- dbgs() << "Region: " << R->getNameStr() << "\n"; dbgs() << " -> ");
+ DEBUG({
+ dbgs() << "\n";
+ dbgs() << "Expr: " << *Expr << "\n";
+ dbgs() << "Region: " << R->getNameStr() << "\n";
+ dbgs() << " -> ";
+ });
ValidatorResult Result = Validator.visit(Expr);
- DEBUG(if (Result.isValid()) dbgs() << "VALID\n"; dbgs() << "\n";);
+ DEBUG({
+ if (Result.isValid())
+ dbgs() << "VALID\n";
+ dbgs() << "\n";
+ });
return Result.isValid();
}