diff options
author | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:30:56 +0000 |
---|---|---|
committer | Nicola Zaghen <nicola.zaghen@imgtec.com> | 2018-05-15 13:30:56 +0000 |
commit | 3538b39ed55e8bcce9a15f6144d605b6843c1cd0 (patch) | |
tree | a9861ff8de0e3e5be9be55407492d38005e663d5 /clang/lib/Format/UnwrappedLineFormatter.cpp | |
parent | 80827f10a18b91510dc57ff02cf48751bb1498ff (diff) | |
download | bcm5719-llvm-3538b39ed55e8bcce9a15f6144d605b6843c1cd0.tar.gz bcm5719-llvm-3538b39ed55e8bcce9a15f6144d605b6843c1cd0.zip |
[clang] Update uses of DEBUG macro to LLVM_DEBUG.
The DEBUG() macro is very generic so it might clash with other projects.
The renaming was done as follows:
- git grep -l 'DEBUG' | xargs sed -i 's/\bDEBUG\s\?(/LLVM_DEBUG(/g'
- git diff -U0 master | ../clang/tools/clang-format/clang-format-diff.py -i -p1 -style LLVM
Explicitly avoided changing the strings in the clang-format tests.
Differential Revision: https://reviews.llvm.org/D44975
llvm-svn: 332350
Diffstat (limited to 'clang/lib/Format/UnwrappedLineFormatter.cpp')
-rw-r--r-- | clang/lib/Format/UnwrappedLineFormatter.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/clang/lib/Format/UnwrappedLineFormatter.cpp b/clang/lib/Format/UnwrappedLineFormatter.cpp index 33163f7d0a1..906dae40cbe 100644 --- a/clang/lib/Format/UnwrappedLineFormatter.cpp +++ b/clang/lib/Format/UnwrappedLineFormatter.cpp @@ -905,7 +905,8 @@ private: Penalty = Queue.top().first.first; StateNode *Node = Queue.top().second; if (!Node->State.NextToken) { - DEBUG(llvm::dbgs() << "\n---\nPenalty for line: " << Penalty << "\n"); + LLVM_DEBUG(llvm::dbgs() + << "\n---\nPenalty for line: " << Penalty << "\n"); break; } Queue.pop(); @@ -929,7 +930,7 @@ private: if (Queue.empty()) { // We were unable to find a solution, do nothing. // FIXME: Add diagnostic? - DEBUG(llvm::dbgs() << "Could not find a solution.\n"); + LLVM_DEBUG(llvm::dbgs() << "Could not find a solution.\n"); return 0; } @@ -937,8 +938,9 @@ private: if (!DryRun) reconstructPath(InitialState, Queue.top().second); - DEBUG(llvm::dbgs() << "Total number of analyzed states: " << Count << "\n"); - DEBUG(llvm::dbgs() << "---\n"); + LLVM_DEBUG(llvm::dbgs() + << "Total number of analyzed states: " << Count << "\n"); + LLVM_DEBUG(llvm::dbgs() << "---\n"); return Penalty; } @@ -980,7 +982,7 @@ private: formatChildren(State, (*I)->NewLine, /*DryRun=*/false, Penalty); Penalty += Indenter->addTokenToState(State, (*I)->NewLine, false); - DEBUG({ + LLVM_DEBUG({ printLineState((*I)->Previous->State); if ((*I)->NewLine) { llvm::dbgs() << "Penalty for placing " |