forked from OSchip/llvm-project
Use standard `print(dbgs())` pattern to implement DebugLoc::dump
The open-coded implementation had a bug. It didn't print filenames. llvm-svn: 327681
This commit is contained in:
parent
2d568ec0e4
commit
673f4b57f6
|
@ -99,19 +99,7 @@ DebugLoc DebugLoc::appendInlinedAt(DebugLoc DL, DILocation *InlinedAt,
|
|||
}
|
||||
|
||||
#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)
|
||||
LLVM_DUMP_METHOD void DebugLoc::dump() const {
|
||||
if (!Loc)
|
||||
return;
|
||||
|
||||
dbgs() << getLine();
|
||||
if (getCol() != 0)
|
||||
dbgs() << ',' << getCol();
|
||||
if (DebugLoc InlinedAtDL = DebugLoc(getInlinedAt())) {
|
||||
dbgs() << " @ ";
|
||||
InlinedAtDL.dump();
|
||||
} else
|
||||
dbgs() << "\n";
|
||||
}
|
||||
LLVM_DUMP_METHOD void DebugLoc::dump() const { print(dbgs()); }
|
||||
#endif
|
||||
|
||||
void DebugLoc::print(raw_ostream &OS) const {
|
||||
|
|
Loading…
Reference in New Issue