diff options
author | Sean Silva <chisophugis@gmail.com> | 2018-03-15 22:51:55 +0000 |
---|---|---|
committer | Sean Silva <chisophugis@gmail.com> | 2018-03-15 22:51:55 +0000 |
commit | 673f4b57f684320bae7034529acf60e31ff1e3af (patch) | |
tree | 80b58e295644db5d2a4123508499d68d0636575f | |
parent | 2d568ec0e49389b903fe3f04bbc6b6e9c3b7c13f (diff) | |
download | bcm5719-llvm-673f4b57f684320bae7034529acf60e31ff1e3af.tar.gz bcm5719-llvm-673f4b57f684320bae7034529acf60e31ff1e3af.zip |
Use standard `print(dbgs())` pattern to implement DebugLoc::dump
The open-coded implementation had a bug. It didn't print filenames.
llvm-svn: 327681
-rw-r--r-- | llvm/lib/IR/DebugLoc.cpp | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/llvm/lib/IR/DebugLoc.cpp b/llvm/lib/IR/DebugLoc.cpp index 0a494119c3f..12a7181607c 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 { |