]> granicus.if.org Git - clang/commitdiff
Exclude printLineState() in -Asserts. [-Wunused-function]
authorNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 17 Dec 2014 14:46:56 +0000 (14:46 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Wed, 17 Dec 2014 14:46:56 +0000 (14:46 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@224430 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Format/UnwrappedLineFormatter.cpp

index 56feaf6e54ef192dc36f09a3d1e919e4a41785db..ca66e7351641c7fd81d15f78d09fe85b67603e90 100644 (file)
@@ -593,6 +593,7 @@ unsigned UnwrappedLineFormatter::analyzeSolutionSpace(LineState &InitialState,
   return Penalty;
 }
 
+#ifndef NDEBUG
 static void printLineState(const LineState &State) {
   llvm::dbgs() << "State: ";
   for (const ParenState &P : State.Stack) {
@@ -601,6 +602,7 @@ static void printLineState(const LineState &State) {
   }
   llvm::dbgs() << State.NextToken->TokenText << "\n";
 }
+#endif
 
 void UnwrappedLineFormatter::reconstructPath(LineState &State,
                                              StateNode *Current) {