Add a newline to SourceLocation dump output
Summary:
Migrate callers to print().
dump() should be useful to downstreams and third parties as a debugging
aid. Everyone trips up on this and creates confusing output.
Subscribers: cfe-commits
Differential Revision: https://reviews.llvm.org/D50661
llvm-svn: 339810
diff --git a/clang/lib/Basic/Diagnostic.cpp b/clang/lib/Basic/Diagnostic.cpp
index f1ebd9d..88ee319 100644
--- a/clang/lib/Basic/Diagnostic.cpp
+++ b/clang/lib/Basic/Diagnostic.cpp
@@ -239,7 +239,7 @@
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 @@
<< 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 @@
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 eb916ec..27eb119 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -77,6 +77,7 @@
LLVM_DUMP_METHOD void SourceLocation::dump(const SourceManager &SM) const {
print(llvm::errs(), SM);
+ llvm::errs() << '\n';
}
//===----------------------------------------------------------------------===//