From 673f4b57f684320bae7034529acf60e31ff1e3af Mon Sep 17 00:00:00 2001 From: Sean Silva Date: Thu, 15 Mar 2018 22:51:55 +0000 Subject: [PATCH] Use standard `print(dbgs())` pattern to implement DebugLoc::dump The open-coded implementation had a bug. It didn't print filenames. llvm-svn: 327681 --- llvm/lib/IR/DebugLoc.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 0a49411..12a7181 100644 --- a/llvm/lib/IR/DebugLoc.cpp +++ b/llvm/lib/IR/DebugLoc.cpp @@ -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 { -- 2.7.4