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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@339810
91177308-0d34-0410-b5e6-
96231b3b80d8
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) {
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";
}
de = declVec.end(); di != de; ++di) {
llvm::errs() << " " << (*di)->getDeclName().getAsString()
<< " <";
- (*di)->getLocation().dump(M);
+ (*di)->getLocation().print(llvm::errs(), M);
llvm::errs() << ">\n";
}
}
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) {
<< Decomp.first.getHashValue() << "> ";
SrcMgr.getLocForStartOfFile(Decomp.first)
.getLocWithOffset(Decomp.second)
- .dump(SrcMgr);
+ .print(llvm::errs(), SrcMgr);
}
if (File.HasLocalTransitions)
llvm::errs() << " has_local_transitions";
llvm::errs() << " ";
SrcMgr.getLocForStartOfFile(ID)
.getLocWithOffset(Transition.Offset)
- .dump(SrcMgr);
+ .print(llvm::errs(), SrcMgr);
llvm::errs() << ": state " << Transition.State << ":\n";
};
LLVM_DUMP_METHOD void SourceLocation::dump(const SourceManager &SM) const {
print(llvm::errs(), SM);
+ llvm::errs() << '\n';
}
//===----------------------------------------------------------------------===//
}
void Preprocessor::DumpLocation(SourceLocation Loc) const {
- Loc.dump(SourceMgr);
+ Loc.print(llvm::errs(), SourceMgr);
}
void Preprocessor::DumpMacro(const MacroInfo &MI) const {