summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 19:14:47 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2015-03-30 19:14:47 +0000
commit9dffcd04f72c07212288754f8eedc844c46ba805 (patch)
treecccdeb28e2ddae54a527cb064fc7c388dd5b1627 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
parent58ee437c311430f28e56ff195c579eafc3608429 (diff)
downloadbcm5719-llvm-9dffcd04f72c07212288754f8eedc844c46ba805.tar.gz
bcm5719-llvm-9dffcd04f72c07212288754f8eedc844c46ba805.zip
CodeGen: Use the new DebugLoc API, NFC
Update lib/CodeGen (and lib/Target) to use the new `DebugLoc` API. llvm-svn: 233582
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp16
1 files changed, 5 insertions, 11 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
index 3f8706ea8f1..e6c34e0116b 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGDumper.cpp
@@ -523,22 +523,16 @@ void SDNode::print_details(raw_ostream &OS, const SelectionDAG *G) const {
if (!G)
return;
- DebugLoc dl = getDebugLoc();
- if (dl.isUnknown())
+ MDLocation *L = getDebugLoc();
+ if (!L)
return;
- DIScope Scope(
- dl.getScope(G->getMachineFunction().getFunction()->getContext()));
- OS << " dbg:";
- assert((!Scope || Scope.isScope()) &&
- "Scope of a DebugLoc should be null or a DIScope.");
- // Omit the directory, since it's usually long and uninteresting.
- if (Scope)
+ if (DIScope Scope = L->getScope())
OS << Scope.getFilename();
else
OS << "<unknown>";
- OS << ':' << dl.getLine();
- if (unsigned C = dl.getCol())
+ OS << ':' << L->getLine();
+ if (unsigned C = L->getColumn())
OS << ':' << C;
}
OpenPOWER on IntegriCloud