diff --git a/clang/lib/ARCMigrate/TransGCAttrs.cpp b/clang/lib/ARCMigrate/TransGCAttrs.cpp index fb45cd92c1f6..ef36dcabb56e 100644 --- a/clang/lib/ARCMigrate/TransGCAttrs.cpp +++ b/clang/lib/ARCMigrate/TransGCAttrs.cpp @@ -340,7 +340,7 @@ void MigrationContext::dumpGCAttrs() { llvm::errs() << "KIND: " << (Attr.Kind == GCAttrOccurrence::Strong ? "strong" : "weak"); llvm::errs() << "\nLOC: "; - Attr.Loc.dump(Pass.Ctx.getSourceManager()); + Attr.Loc.print(llvm::errs(), Pass.Ctx.getSourceManager()); llvm::errs() << "\nTYPE: "; Attr.ModifiedType.dump(); if (Attr.Dcl) { diff --git a/clang/lib/AST/CommentLexer.cpp b/clang/lib/AST/CommentLexer.cpp index 8d401ff5c7ea..c43275318dd7 100644 --- a/clang/lib/AST/CommentLexer.cpp +++ b/clang/lib/AST/CommentLexer.cpp @@ -21,7 +21,7 @@ namespace comments { void Token::dump(const Lexer &L, const SourceManager &SM) const { llvm::errs() << "comments::Token Kind=" << Kind << " "; - Loc.dump(SM); + Loc.print(llvm::errs(), SM); llvm::errs() << " " << Length << " \"" << L.getSpelling(*this, SM) << "\"\n"; } diff --git a/clang/lib/Analysis/LiveVariables.cpp b/clang/lib/Analysis/LiveVariables.cpp index 4e063f4ca742..ca82515ffa5a 100644 --- a/clang/lib/Analysis/LiveVariables.cpp +++ b/clang/lib/Analysis/LiveVariables.cpp @@ -626,7 +626,7 @@ void LiveVariablesImpl::dumpBlockLiveness(const SourceManager &M) { de = declVec.end(); di != de; ++di) { llvm::errs() << " " << (*di)->getDeclName().getAsString() << " <"; - (*di)->getLocation().dump(M); + (*di)->getLocation().print(llvm::errs(), M); llvm::errs() << ">\n"; } } diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp index f1ebd9d38b9e..88ee319b5c28 100644 --- a/clang/lib/Basic/Diagnostic.cpp +++ b/clang/lib/Basic/Diagnostic.cpp @@ -239,7 +239,7 @@ DiagnosticsEngine::DiagStateMap::getFile(SourceManager &SrcMgr, void DiagnosticsEngine::DiagStateMap::dump(SourceManager &SrcMgr, StringRef DiagName) const { llvm::errs() << "diagnostic state at "; - CurDiagStateLoc.dump(SrcMgr); + CurDiagStateLoc.print(llvm::errs(), SrcMgr); llvm::errs() << ": " << CurDiagState << "\n"; for (auto &F : Files) { @@ -261,7 +261,7 @@ void DiagnosticsEngine::DiagStateMap::dump(SourceManager &SrcMgr, << Decomp.first.getHashValue() << "> "; SrcMgr.getLocForStartOfFile(Decomp.first) .getLocWithOffset(Decomp.second) - .dump(SrcMgr); + .print(llvm::errs(), SrcMgr); } if (File.HasLocalTransitions) llvm::errs() << " has_local_transitions"; @@ -281,7 +281,7 @@ void DiagnosticsEngine::DiagStateMap::dump(SourceManager &SrcMgr, llvm::errs() << " "; SrcMgr.getLocForStartOfFile(ID) .getLocWithOffset(Transition.Offset) - .dump(SrcMgr); + .print(llvm::errs(), SrcMgr); llvm::errs() << ": state " << Transition.State << ":\n"; }; diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp index eb916ec76fdc..27eb1191fdde 100644 --- a/clang/lib/Basic/SourceLocation.cpp +++ b/clang/lib/Basic/SourceLocation.cpp @@ -77,6 +77,7 @@ SourceLocation::printToString(const SourceManager &SM) const { LLVM_DUMP_METHOD void SourceLocation::dump(const SourceManager &SM) const { print(llvm::errs(), SM); + llvm::errs() << '\n'; } //===----------------------------------------------------------------------===// diff --git a/clang/lib/Lex/Preprocessor.cpp b/clang/lib/Lex/Preprocessor.cpp index bfeaa03d85d9..c7da41172f88 100644 --- a/clang/lib/Lex/Preprocessor.cpp +++ b/clang/lib/Lex/Preprocessor.cpp @@ -250,7 +250,7 @@ void Preprocessor::DumpToken(const Token &Tok, bool DumpFlags) const { } void Preprocessor::DumpLocation(SourceLocation Loc) const { - Loc.dump(SourceMgr); + Loc.print(llvm::errs(), SourceMgr); } void Preprocessor::DumpMacro(const MacroInfo &MI) const {