Author: nzaghen Date: Tue May 15 06:30:56 2018 New Revision: 332350 URL: http://llvm.org/viewvc/llvm-project?rev=332350&view=rev Log: [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 Modified: cfe/trunk/lib/AST/ExprConstant.cpp cfe/trunk/lib/Analysis/BodyFarm.cpp cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp cfe/trunk/lib/Format/BreakableToken.cpp cfe/trunk/lib/Format/ContinuationIndenter.cpp cfe/trunk/lib/Format/Format.cpp cfe/trunk/lib/Format/SortJavaScriptImports.cpp cfe/trunk/lib/Format/TokenAnalyzer.cpp cfe/trunk/lib/Format/TokenAnnotator.cpp cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp cfe/trunk/lib/Format/UnwrappedLineParser.cpp cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp cfe/trunk/lib/Tooling/Tooling.cpp cfe/trunk/unittests/Format/FormatTest.cpp cfe/trunk/unittests/Format/FormatTestComments.cpp cfe/trunk/unittests/Format/FormatTestJS.cpp cfe/trunk/unittests/Format/FormatTestJava.cpp cfe/trunk/unittests/Format/FormatTestObjC.cpp cfe/trunk/unittests/Format/FormatTestProto.cpp cfe/trunk/unittests/Format/FormatTestRawStrings.cpp cfe/trunk/unittests/Format/FormatTestSelective.cpp cfe/trunk/unittests/Format/FormatTestTextProto.cpp cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp cfe/trunk/unittests/Format/UsingDeclarationsSorterTest.cpp cfe/trunk/unittests/libclang/LibclangTest.cpp Modified: cfe/trunk/lib/AST/ExprConstant.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/ExprConstant.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/AST/ExprConstant.cpp (original) +++ cfe/trunk/lib/AST/ExprConstant.cpp Tue May 15 06:30:56 2018 @@ -6961,8 +6961,8 @@ bool ArrayExprEvaluator::VisitInitListEx if (NumEltsToInit != NumElts && MaybeElementDependentArrayFiller(FillerExpr)) NumEltsToInit = NumElts; - DEBUG(llvm::dbgs() << "The number of elements to initialize: " << - NumEltsToInit << ".\n"); + LLVM_DEBUG(llvm::dbgs() << "The number of elements to initialize: " + << NumEltsToInit << ".\n"); Result = APValue(APValue::UninitArray(), NumEltsToInit, NumElts); Modified: cfe/trunk/lib/Analysis/BodyFarm.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Analysis/BodyFarm.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Analysis/BodyFarm.cpp (original) +++ cfe/trunk/lib/Analysis/BodyFarm.cpp Tue May 15 06:30:56 2018 @@ -314,7 +314,7 @@ static CallExpr *create_call_once_lambda /// } /// \endcode static Stmt *create_call_once(ASTContext &C, const FunctionDecl *D) { - DEBUG(llvm::dbgs() << "Generating body for call_once\n"); + LLVM_DEBUG(llvm::dbgs() << "Generating body for call_once\n"); // We need at least two parameters. if (D->param_size() < 2) @@ -342,9 +342,9 @@ static Stmt *create_call_once(ASTContext auto *FlagRecordDecl = dyn_cast_or_null<RecordDecl>(FlagType->getAsTagDecl()); if (!FlagRecordDecl) { - DEBUG(llvm::dbgs() << "Flag field is not a record: " - << "unknown std::call_once implementation, " - << "ignoring the call.\n"); + LLVM_DEBUG(llvm::dbgs() << "Flag field is not a record: " + << "unknown std::call_once implementation, " + << "ignoring the call.\n"); return nullptr; } @@ -359,16 +359,17 @@ static Stmt *create_call_once(ASTContext } if (!FlagFieldDecl) { - DEBUG(llvm::dbgs() << "No field _M_once or __state_ found on " - << "std::once_flag struct: unknown std::call_once " - << "implementation, ignoring the call."); + LLVM_DEBUG(llvm::dbgs() << "No field _M_once or __state_ found on " + << "std::once_flag struct: unknown std::call_once " + << "implementation, ignoring the call."); return nullptr; } bool isLambdaCall = CallbackRecordDecl && CallbackRecordDecl->isLambda(); if (CallbackRecordDecl && !isLambdaCall) { - DEBUG(llvm::dbgs() << "Not supported: synthesizing body for functors when " - << "body farming std::call_once, ignoring the call."); + LLVM_DEBUG(llvm::dbgs() + << "Not supported: synthesizing body for functors when " + << "body farming std::call_once, ignoring the call."); return nullptr; } @@ -395,9 +396,9 @@ static Stmt *create_call_once(ASTContext // First two arguments are used for the flag and for the callback. if (D->getNumParams() != CallbackFunctionType->getNumParams() + 2) { - DEBUG(llvm::dbgs() << "Types of params of the callback do not match " - << "params passed to std::call_once, " - << "ignoring the call\n"); + LLVM_DEBUG(llvm::dbgs() << "Types of params of the callback do not match " + << "params passed to std::call_once, " + << "ignoring the call\n"); return nullptr; } @@ -411,9 +412,9 @@ static Stmt *create_call_once(ASTContext .getNonReferenceType() .getCanonicalType() != PDecl->getType().getNonReferenceType().getCanonicalType()) { - DEBUG(llvm::dbgs() << "Types of params of the callback do not match " - << "params passed to std::call_once, " - << "ignoring the call\n"); + LLVM_DEBUG(llvm::dbgs() << "Types of params of the callback do not match " + << "params passed to std::call_once, " + << "ignoring the call\n"); return nullptr; } Expr *ParamExpr = M.makeDeclRefExpr(PDecl); Modified: cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp (original) +++ cfe/trunk/lib/CodeGen/ObjectFilePCHContainerOperations.cpp Tue May 15 06:30:56 2018 @@ -290,7 +290,7 @@ public: else ASTSym->setSection("__clangast"); - DEBUG({ + LLVM_DEBUG({ // Print the IR for the PCH container to the debug output. llvm::SmallString<0> Buffer; clang::EmitBackendOutput( Modified: cfe/trunk/lib/Format/BreakableToken.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/BreakableToken.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/BreakableToken.cpp (original) +++ cfe/trunk/lib/Format/BreakableToken.cpp Tue May 15 06:30:56 2018 @@ -67,8 +67,9 @@ static BreakableToken::Split getCommentS unsigned ColumnLimit, unsigned TabWidth, encoding::Encoding Encoding) { - DEBUG(llvm::dbgs() << "Comment split: \"" << Text << ", " << ColumnLimit - << "\", Content start: " << ContentStartColumn << "\n"); + LLVM_DEBUG(llvm::dbgs() << "Comment split: \"" << Text << ", " << ColumnLimit + << "\", Content start: " << ContentStartColumn + << "\n"); if (ColumnLimit <= ContentStartColumn + 1) return BreakableToken::Split(StringRef::npos, 0); @@ -424,7 +425,7 @@ BreakableBlockComment::BreakableBlockCom } } - DEBUG({ + LLVM_DEBUG({ llvm::dbgs() << "IndentAtLineBreak " << IndentAtLineBreak << "\n"; llvm::dbgs() << "DelimitersOnNewline " << DelimitersOnNewline << "\n"; for (size_t i = 0; i < Lines.size(); ++i) { Modified: cfe/trunk/lib/Format/ContinuationIndenter.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/ContinuationIndenter.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/ContinuationIndenter.cpp (original) +++ cfe/trunk/lib/Format/ContinuationIndenter.cpp Tue May 15 06:30:56 2018 @@ -1768,12 +1768,12 @@ ContinuationIndenter::breakProtrudingTok Token->adaptStartOfLine(0, Whitespaces); unsigned Penalty = 0; - DEBUG(llvm::dbgs() << "Breaking protruding token at column " << StartColumn - << ".\n"); + LLVM_DEBUG(llvm::dbgs() << "Breaking protruding token at column " + << StartColumn << ".\n"); for (unsigned LineIndex = 0, EndIndex = Token->getLineCount(); LineIndex != EndIndex; ++LineIndex) { - DEBUG(llvm::dbgs() << " Line: " << LineIndex << " (Reflow: " << Reflow - << ")\n"); + LLVM_DEBUG(llvm::dbgs() + << " Line: " << LineIndex << " (Reflow: " << Reflow << ")\n"); NewBreakBefore = false; // If we did reflow the previous line, we'll try reflowing again. Otherwise // we'll start reflowing if the current line is broken or whitespace is @@ -1781,11 +1781,11 @@ ContinuationIndenter::breakProtrudingTok bool TryReflow = Reflow; // Break the current token until we can fit the rest of the line. while (ContentStartColumn + RemainingTokenColumns > ColumnLimit) { - DEBUG(llvm::dbgs() << " Over limit, need: " - << (ContentStartColumn + RemainingTokenColumns) - << ", space: " << ColumnLimit - << ", reflown prefix: " << ContentStartColumn - << ", offset in line: " << TailOffset << "\n"); + LLVM_DEBUG(llvm::dbgs() << " Over limit, need: " + << (ContentStartColumn + RemainingTokenColumns) + << ", space: " << ColumnLimit + << ", reflown prefix: " << ContentStartColumn + << ", offset in line: " << TailOffset << "\n"); // If the current token doesn't fit, find the latest possible split in the // current line so that breaking at it will be under the column limit. // FIXME: Use the earliest possible split while reflowing to correctly @@ -1800,7 +1800,7 @@ ContinuationIndenter::breakProtrudingTok // The last line's penalty is handled in addNextStateToQueue(). Penalty += Style.PenaltyExcessCharacter * (ContentStartColumn + RemainingTokenColumns - ColumnLimit); - DEBUG(llvm::dbgs() << " No break opportunity.\n"); + LLVM_DEBUG(llvm::dbgs() << " No break opportunity.\n"); break; } assert(Split.first != 0); @@ -1827,7 +1827,7 @@ ContinuationIndenter::breakProtrudingTok // ^--------------- to next split columns unsigned ToSplitColumns = Token->getRangeLength( LineIndex, TailOffset, Split.first, ContentStartColumn); - DEBUG(llvm::dbgs() << " ToSplit: " << ToSplitColumns << "\n"); + LLVM_DEBUG(llvm::dbgs() << " ToSplit: " << ToSplitColumns << "\n"); BreakableToken::Split NextSplit = Token->getSplit( LineIndex, TailOffset + Split.first + Split.second, ColumnLimit, @@ -1847,9 +1847,10 @@ ContinuationIndenter::breakProtrudingTok // unbreakable sequence. ToNextSplitColumns = Token->getLengthAfterCompression(ToNextSplitColumns, Split); - DEBUG(llvm::dbgs() << " ContentStartColumn: " << ContentStartColumn - << "\n"); - DEBUG(llvm::dbgs() << " ToNextSplit: " << ToNextSplitColumns << "\n"); + LLVM_DEBUG(llvm::dbgs() + << " ContentStartColumn: " << ContentStartColumn << "\n"); + LLVM_DEBUG(llvm::dbgs() + << " ToNextSplit: " << ToNextSplitColumns << "\n"); // If the whitespace compression makes us fit, continue on the current // line. bool ContinueOnLine = @@ -1861,16 +1862,16 @@ ContinuationIndenter::breakProtrudingTok ExcessCharactersPenalty = (ContentStartColumn + ToNextSplitColumns - ColumnLimit) * Style.PenaltyExcessCharacter; - DEBUG(llvm::dbgs() - << " Penalty excess: " << ExcessCharactersPenalty - << "\n break : " << NewBreakPenalty << "\n"); + LLVM_DEBUG(llvm::dbgs() + << " Penalty excess: " << ExcessCharactersPenalty + << "\n break : " << NewBreakPenalty << "\n"); if (ExcessCharactersPenalty < NewBreakPenalty) { Exceeded = true; ContinueOnLine = true; } } if (ContinueOnLine) { - DEBUG(llvm::dbgs() << " Continuing on line...\n"); + LLVM_DEBUG(llvm::dbgs() << " Continuing on line...\n"); // The current line fits after compressing the whitespace - reflow // the next line into it if possible. TryReflow = true; @@ -1886,7 +1887,7 @@ ContinuationIndenter::breakProtrudingTok continue; } } - DEBUG(llvm::dbgs() << " Breaking...\n"); + LLVM_DEBUG(llvm::dbgs() << " Breaking...\n"); ContentStartColumn = Token->getContentStartColumn(LineIndex, /*Break=*/true); unsigned NewRemainingTokenColumns = Token->getRemainingLength( @@ -1902,8 +1903,8 @@ ContinuationIndenter::breakProtrudingTok } assert(NewRemainingTokenColumns < RemainingTokenColumns); - DEBUG(llvm::dbgs() << " Breaking at: " << TailOffset + Split.first - << ", " << Split.second << "\n"); + LLVM_DEBUG(llvm::dbgs() << " Breaking at: " << TailOffset + Split.first + << ", " << Split.second << "\n"); if (!DryRun) Token->insertBreak(LineIndex, TailOffset, Split, Whitespaces); @@ -1941,11 +1942,12 @@ ContinuationIndenter::breakProtrudingTok // the next logical line. BreakableToken::Split SplitBeforeNext = Token->getReflowSplit(NextLineIndex, CommentPragmasRegex); - DEBUG(llvm::dbgs() << " Size of reflown text: " << ContentStartColumn - << "\n Potential reflow split: "); + LLVM_DEBUG(llvm::dbgs() + << " Size of reflown text: " << ContentStartColumn + << "\n Potential reflow split: "); if (SplitBeforeNext.first != StringRef::npos) { - DEBUG(llvm::dbgs() << SplitBeforeNext.first << ", " - << SplitBeforeNext.second << "\n"); + LLVM_DEBUG(llvm::dbgs() << SplitBeforeNext.first << ", " + << SplitBeforeNext.second << "\n"); TailOffset = SplitBeforeNext.first + SplitBeforeNext.second; // If the rest of the next line fits into the current line below the // column limit, we can safely reflow. @@ -1953,11 +1955,12 @@ ContinuationIndenter::breakProtrudingTok NextLineIndex, TailOffset, ContentStartColumn); Reflow = true; if (ContentStartColumn + RemainingTokenColumns > ColumnLimit) { - DEBUG(llvm::dbgs() << " Over limit after reflow, need: " - << (ContentStartColumn + RemainingTokenColumns) - << ", space: " << ColumnLimit - << ", reflown prefix: " << ContentStartColumn - << ", offset in line: " << TailOffset << "\n"); + LLVM_DEBUG(llvm::dbgs() + << " Over limit after reflow, need: " + << (ContentStartColumn + RemainingTokenColumns) + << ", space: " << ColumnLimit + << ", reflown prefix: " << ContentStartColumn + << ", offset in line: " << TailOffset << "\n"); // If the whole next line does not fit, try to find a point in // the next line at which we can break so that attaching the part // of the next line to that break point onto the current line is @@ -1966,7 +1969,7 @@ ContinuationIndenter::breakProtrudingTok Token->getSplit(NextLineIndex, TailOffset, ColumnLimit, ContentStartColumn, CommentPragmasRegex); if (Split.first == StringRef::npos) { - DEBUG(llvm::dbgs() << " Did not find later break\n"); + LLVM_DEBUG(llvm::dbgs() << " Did not find later break\n"); Reflow = false; } else { // Check whether the first split point gets us below the column @@ -1975,9 +1978,9 @@ ContinuationIndenter::breakProtrudingTok unsigned ToSplitColumns = Token->getRangeLength( NextLineIndex, TailOffset, Split.first, ContentStartColumn); if (ContentStartColumn + ToSplitColumns > ColumnLimit) { - DEBUG(llvm::dbgs() << " Next split protrudes, need: " - << (ContentStartColumn + ToSplitColumns) - << ", space: " << ColumnLimit); + LLVM_DEBUG(llvm::dbgs() << " Next split protrudes, need: " + << (ContentStartColumn + ToSplitColumns) + << ", space: " << ColumnLimit); unsigned ExcessCharactersPenalty = (ContentStartColumn + ToSplitColumns - ColumnLimit) * Style.PenaltyExcessCharacter; @@ -1988,7 +1991,7 @@ ContinuationIndenter::breakProtrudingTok } } } else { - DEBUG(llvm::dbgs() << "not found.\n"); + LLVM_DEBUG(llvm::dbgs() << "not found.\n"); } } if (!Reflow) { @@ -2030,7 +2033,7 @@ ContinuationIndenter::breakProtrudingTok BreakableToken::Split SplitAfterLastLine = Token->getSplitAfterLastLine(TailOffset); if (SplitAfterLastLine.first != StringRef::npos) { - DEBUG(llvm::dbgs() << "Replacing whitespace after last line.\n"); + LLVM_DEBUG(llvm::dbgs() << "Replacing whitespace after last line.\n"); if (!DryRun) Token->replaceWhitespaceAfterLastLine(TailOffset, SplitAfterLastLine, Whitespaces); Modified: cfe/trunk/lib/Format/Format.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/Format.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/Format.cpp (original) +++ cfe/trunk/lib/Format/Format.cpp Tue May 15 06:30:56 2018 @@ -930,9 +930,9 @@ std::error_code parseConfiguration(Strin // Ensure that each language is configured at most once. for (unsigned j = 0; j < i; ++j) { if (Styles[i].Language == Styles[j].Language) { - DEBUG(llvm::dbgs() - << "Duplicate languages in the config file on positions " << j - << " and " << i << "\n"); + LLVM_DEBUG(llvm::dbgs() + << "Duplicate languages in the config file on positions " + << j << " and " << i << "\n"); return make_error_code(ParseError::Error); } } @@ -2146,7 +2146,7 @@ llvm::Expected<FormatStyle> getStyle(Str SmallString<128> ConfigFile(Directory); llvm::sys::path::append(ConfigFile, ".clang-format"); - DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); Status = FS->status(ConfigFile.str()); bool FoundConfigFile = @@ -2155,7 +2155,7 @@ llvm::Expected<FormatStyle> getStyle(Str // Try _clang-format too, since dotfiles are not commonly used on Windows. ConfigFile = Directory; llvm::sys::path::append(ConfigFile, "_clang-format"); - DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Trying " << ConfigFile << "...\n"); Status = FS->status(ConfigFile.str()); FoundConfigFile = Status && (Status->getType() == llvm::sys::fs::file_type::regular_file); @@ -2177,7 +2177,8 @@ llvm::Expected<FormatStyle> getStyle(Str return make_string_error("Error reading " + ConfigFile + ": " + ec.message()); } - DEBUG(llvm::dbgs() << "Using configuration file " << ConfigFile << "\n"); + LLVM_DEBUG(llvm::dbgs() + << "Using configuration file " << ConfigFile << "\n"); return Style; } } Modified: cfe/trunk/lib/Format/SortJavaScriptImports.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/SortJavaScriptImports.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/SortJavaScriptImports.cpp (original) +++ cfe/trunk/lib/Format/SortJavaScriptImports.cpp Tue May 15 06:30:56 2018 @@ -188,9 +188,9 @@ public: if (FirstNonImportLine && FirstNonImportLine->First->NewlinesBefore < 2) ReferencesText += "\n"; - DEBUG(llvm::dbgs() << "Replacing imports:\n" - << getSourceText(InsertionPoint) << "\nwith:\n" - << ReferencesText << "\n"); + LLVM_DEBUG(llvm::dbgs() << "Replacing imports:\n" + << getSourceText(InsertionPoint) << "\nwith:\n" + << ReferencesText << "\n"); auto Err = Result.add(tooling::Replacement( Env.getSourceManager(), CharSourceRange::getCharRange(InsertionPoint), ReferencesText)); @@ -307,7 +307,7 @@ private: FirstNonImportLine = nullptr; AnyImportAffected = AnyImportAffected || Line->Affected; Reference.Range.setEnd(LineEnd->Tok.getEndLoc()); - DEBUG({ + LLVM_DEBUG({ llvm::dbgs() << "JsModuleReference: {" << "is_export: " << Reference.IsExport << ", cat: " << Reference.Category Modified: cfe/trunk/lib/Format/TokenAnalyzer.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnalyzer.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/TokenAnalyzer.cpp (original) +++ cfe/trunk/lib/Format/TokenAnalyzer.cpp Tue May 15 06:30:56 2018 @@ -55,12 +55,12 @@ TokenAnalyzer::TokenAnalyzer(const Envir UnwrappedLines(1), Encoding(encoding::detectEncoding( Env.getSourceManager().getBufferData(Env.getFileID()))) { - DEBUG( + LLVM_DEBUG( llvm::dbgs() << "File encoding: " << (Encoding == encoding::Encoding_UTF8 ? "UTF8" : "unknown") << "\n"); - DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) - << "\n"); + LLVM_DEBUG(llvm::dbgs() << "Language: " << getLanguageName(Style.Language) + << "\n"); } std::pair<tooling::Replacements, unsigned> TokenAnalyzer::process() { @@ -74,7 +74,7 @@ std::pair<tooling::Replacements, unsigne assert(UnwrappedLines.rbegin()->empty()); unsigned Penalty = 0; for (unsigned Run = 0, RunE = UnwrappedLines.size(); Run + 1 != RunE; ++Run) { - DEBUG(llvm::dbgs() << "Run " << Run << "...\n"); + LLVM_DEBUG(llvm::dbgs() << "Run " << Run << "...\n"); SmallVector<AnnotatedLine *, 16> AnnotatedLines; TokenAnnotator Annotator(Style, Tokens.getKeywords()); @@ -86,7 +86,7 @@ std::pair<tooling::Replacements, unsigne std::pair<tooling::Replacements, unsigned> RunResult = analyze(Annotator, AnnotatedLines, Tokens); - DEBUG({ + LLVM_DEBUG({ llvm::dbgs() << "Replacements for run " << Run << ":\n"; for (tooling::Replacements::const_iterator I = RunResult.first.begin(), E = RunResult.first.end(); Modified: cfe/trunk/lib/Format/TokenAnnotator.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/TokenAnnotator.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/TokenAnnotator.cpp (original) +++ cfe/trunk/lib/Format/TokenAnnotator.cpp Tue May 15 06:30:56 2018 @@ -2143,7 +2143,7 @@ void TokenAnnotator::calculateFormatting ++IndentLevel; } - DEBUG({ printDebugInfo(Line); }); + LLVM_DEBUG({ printDebugInfo(Line); }); } void TokenAnnotator::calculateUnbreakableTailLengths(AnnotatedLine &Line) { Modified: cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp (original) +++ cfe/trunk/lib/Format/UnwrappedLineFormatter.cpp Tue May 15 06:30:56 2018 @@ -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 " Modified: cfe/trunk/lib/Format/UnwrappedLineParser.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UnwrappedLineParser.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/UnwrappedLineParser.cpp (original) +++ cfe/trunk/lib/Format/UnwrappedLineParser.cpp Tue May 15 06:30:56 2018 @@ -260,7 +260,7 @@ void UnwrappedLineParser::parse() { IndexedTokenSource TokenSource(AllTokens); Line->FirstStartColumn = FirstStartColumn; do { - DEBUG(llvm::dbgs() << "----\n"); + LLVM_DEBUG(llvm::dbgs() << "----\n"); reset(); Tokens = &TokenSource; TokenSource.reset(); @@ -2324,7 +2324,7 @@ LLVM_ATTRIBUTE_UNUSED static void printD void UnwrappedLineParser::addUnwrappedLine() { if (Line->Tokens.empty()) return; - DEBUG({ + LLVM_DEBUG({ if (CurrentLines == &Lines) printDebugInfo(*Line); }); Modified: cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp (original) +++ cfe/trunk/lib/Format/UsingDeclarationsSorter.cpp Tue May 15 06:30:56 2018 @@ -161,7 +161,7 @@ void endUsingDeclarationBlock( StringRef Text(SourceMgr.getCharacterData(SortedBegin), SourceMgr.getCharacterData(SortedEnd) - SourceMgr.getCharacterData(SortedBegin)); - DEBUG({ + LLVM_DEBUG({ StringRef OldText(SourceMgr.getCharacterData(Begin), SourceMgr.getCharacterData(End) - SourceMgr.getCharacterData(Begin)); Modified: cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Core/CallEvent.cpp Tue May 15 06:30:56 2018 @@ -399,10 +399,10 @@ RuntimeDefinition AnyFunctionCall::getRu getManager()->getContext(FD); bool IsAutosynthesized; Stmt* Body = AD->getBody(IsAutosynthesized); - DEBUG({ - if (IsAutosynthesized) - llvm::dbgs() << "Using autosynthesized body for " << FD->getName() - << "\n"; + LLVM_DEBUG({ + if (IsAutosynthesized) + llvm::dbgs() << "Using autosynthesized body for " << FD->getName() + << "\n"; }); if (Body) { const Decl* Decl = AD->getDecl(); Modified: cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp (original) +++ cfe/trunk/lib/StaticAnalyzer/Core/MemRegion.cpp Tue May 15 06:30:56 2018 @@ -1244,8 +1244,8 @@ RegionRawOffset ElementRegion::getAsArra if (!Overflow) Overflow = checkedMul(Mult, offset.getQuantity()); if (Overflow) { - DEBUG(llvm::dbgs() << "MemRegion::getAsArrayOffset: " - << "offset overflowing, returning unknown\n"); + LLVM_DEBUG(llvm::dbgs() << "MemRegion::getAsArrayOffset: " + << "offset overflowing, returning unknown\n"); return nullptr; } Modified: cfe/trunk/lib/Tooling/Tooling.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Tooling/Tooling.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/lib/Tooling/Tooling.cpp (original) +++ cfe/trunk/lib/Tooling/Tooling.cpp Tue May 15 06:30:56 2018 @@ -473,7 +473,7 @@ int ClangTool::run(ToolAction *Action) { // FIXME: We need a callback mechanism for the tool writer to output a // customized message for each file. - DEBUG({ llvm::dbgs() << "Processing: " << File << ".\n"; }); + LLVM_DEBUG({ llvm::dbgs() << "Processing: " << File << ".\n"; }); ToolInvocation Invocation(std::move(CommandLine), Action, Files.get(), PCHContainerOps); Invocation.setDiagnosticConsumer(DiagConsumer); Modified: cfe/trunk/unittests/Format/FormatTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTest.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTest.cpp (original) +++ cfe/trunk/unittests/Format/FormatTest.cpp Tue May 15 06:30:56 2018 @@ -39,8 +39,8 @@ protected: std::string format(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle(), StatusCheck CheckComplete = SC_ExpectComplete) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -53,7 +53,7 @@ protected: ReplacementCount = Replaces.size(); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestComments.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestComments.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestComments.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestComments.cpp Tue May 15 06:30:56 2018 @@ -38,8 +38,8 @@ protected: std::string format(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle(), StatusCheck CheckComplete = SC_ExpectComplete) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -52,7 +52,7 @@ protected: ReplacementCount = Replaces.size(); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestJS.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestJS.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestJS.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestJS.cpp Tue May 15 06:30:56 2018 @@ -21,8 +21,8 @@ class FormatTestJS : public ::testing::T protected: static std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length, const FormatStyle &Style) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length)); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -30,7 +30,7 @@ protected: EXPECT_TRUE(Status.FormatComplete); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestJava.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestJava.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestJava.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestJava.cpp Tue May 15 06:30:56 2018 @@ -21,13 +21,13 @@ class FormatTestJava : public ::testing: protected: static std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length, const FormatStyle &Style) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length)); tooling::Replacements Replaces = reformat(Style, Code, Ranges); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestObjC.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestObjC.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestObjC.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestObjC.cpp Tue May 15 06:30:56 2018 @@ -40,8 +40,8 @@ protected: std::string format(llvm::StringRef Code, StatusCheck CheckComplete = SC_ExpectComplete) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -53,7 +53,7 @@ protected: } auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestProto.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestProto.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestProto.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestProto.cpp Tue May 15 06:30:56 2018 @@ -21,13 +21,13 @@ class FormatTestProto : public ::testing protected: static std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length, const FormatStyle &Style) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length)); tooling::Replacements Replaces = reformat(Style, Code, Ranges); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestRawStrings.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestRawStrings.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestRawStrings.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestRawStrings.cpp Tue May 15 06:30:56 2018 @@ -33,8 +33,8 @@ protected: std::string format(llvm::StringRef Code, const FormatStyle &Style = getLLVMStyle(), StatusCheck CheckComplete = SC_ExpectComplete) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(0, Code.size())); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -47,7 +47,7 @@ protected: ReplacementCount = Replaces.size(); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestSelective.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestSelective.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestSelective.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestSelective.cpp Tue May 15 06:30:56 2018 @@ -21,8 +21,8 @@ namespace { class FormatTestSelective : public ::testing::Test { protected: std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length)); FormattingAttemptStatus Status; tooling::Replacements Replaces = @@ -30,7 +30,7 @@ protected: EXPECT_TRUE(Status.FormatComplete) << Code << "\n\n"; auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/FormatTestTextProto.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/FormatTestTextProto.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/FormatTestTextProto.cpp (original) +++ cfe/trunk/unittests/Format/FormatTestTextProto.cpp Tue May 15 06:30:56 2018 @@ -21,13 +21,13 @@ class FormatTestTextProto : public ::tes protected: static std::string format(llvm::StringRef Code, unsigned Offset, unsigned Length, const FormatStyle &Style) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); std::vector<tooling::Range> Ranges(1, tooling::Range(Offset, Length)); tooling::Replacements Replaces = reformat(Style, Code, Ranges); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp (original) +++ cfe/trunk/unittests/Format/NamespaceEndCommentsFixerTest.cpp Tue May 15 06:30:56 2018 @@ -25,13 +25,13 @@ protected: fixNamespaceEndComments(llvm::StringRef Code, const std::vector<tooling::Range> &Ranges, const FormatStyle &Style = getLLVMStyle()) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); tooling::Replacements Replaces = clang::format::fixNamespaceEndComments(Style, Code, Ranges, "<stdin>"); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/Format/UsingDeclarationsSorterTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/Format/UsingDeclarationsSorterTest.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/Format/UsingDeclarationsSorterTest.cpp (original) +++ cfe/trunk/unittests/Format/UsingDeclarationsSorterTest.cpp Tue May 15 06:30:56 2018 @@ -23,13 +23,13 @@ protected: std::string sortUsingDeclarations(llvm::StringRef Code, const std::vector<tooling::Range> &Ranges, const FormatStyle &Style = getLLVMStyle()) { - DEBUG(llvm::errs() << "---\n"); - DEBUG(llvm::errs() << Code << "\n\n"); + LLVM_DEBUG(llvm::errs() << "---\n"); + LLVM_DEBUG(llvm::errs() << Code << "\n\n"); tooling::Replacements Replaces = clang::format::sortUsingDeclarations(Style, Code, Ranges, "<stdin>"); auto Result = applyAllReplacements(Code, Replaces); EXPECT_TRUE(static_cast<bool>(Result)); - DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); + LLVM_DEBUG(llvm::errs() << "\n" << *Result << "\n\n"); return *Result; } Modified: cfe/trunk/unittests/libclang/LibclangTest.cpp URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/unittests/libclang/LibclangTest.cpp?rev=332350&r1=332349&r2=332350&view=diff ============================================================================== --- cfe/trunk/unittests/libclang/LibclangTest.cpp (original) +++ cfe/trunk/unittests/libclang/LibclangTest.cpp Tue May 15 06:30:56 2018 @@ -467,15 +467,17 @@ public: unsigned NumDiagnostics = clang_getNumDiagnostics(ClangTU); for (unsigned i = 0; i < NumDiagnostics; ++i) { auto Diag = clang_getDiagnostic(ClangTU, i); - DEBUG(llvm::dbgs() << clang_getCString(clang_formatDiagnostic( - Diag, clang_defaultDiagnosticDisplayOptions())) << "\n"); + LLVM_DEBUG(llvm::dbgs() + << clang_getCString(clang_formatDiagnostic( + Diag, clang_defaultDiagnosticDisplayOptions())) + << "\n"); clang_disposeDiagnostic(Diag); } } bool ReparseTU(unsigned num_unsaved_files, CXUnsavedFile* unsaved_files) { if (clang_reparseTranslationUnit(ClangTU, num_unsaved_files, unsaved_files, clang_defaultReparseOptions(ClangTU))) { - DEBUG(llvm::dbgs() << "Reparse failed\n"); + LLVM_DEBUG(llvm::dbgs() << "Reparse failed\n"); return false; } DisplayDiagnostics(); @@ -706,7 +708,7 @@ public: unsigned options = clang_defaultSaveOptions(ClangTU); if (clang_saveTranslationUnit(ClangTU, Filename.c_str(), options) != CXSaveError_None) { - DEBUG(llvm::dbgs() << "Saving failed\n"); + LLVM_DEBUG(llvm::dbgs() << "Saving failed\n"); return false; } @@ -715,7 +717,7 @@ public: ClangTU = clang_createTranslationUnit(Index, Filename.c_str()); if (!ClangTU) { - DEBUG(llvm::dbgs() << "Loading failed\n"); + LLVM_DEBUG(llvm::dbgs() << "Loading failed\n"); return false; } _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits