summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineInstr.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/MachineInstr.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/MachineInstr.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 1240efb75d5..c2accbd1a2a 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -881,8 +881,8 @@ bool MachineInstr::isIdenticalTo(const MachineInstr *Other,
}
// If DebugLoc does not match then two dbg.values are not identical.
if (isDebugValue())
- if (!getDebugLoc().isUnknown() && !Other->getDebugLoc().isUnknown()
- && getDebugLoc() != Other->getDebugLoc())
+ if (getDebugLoc() && Other->getDebugLoc() &&
+ getDebugLoc() != Other->getDebugLoc())
return false;
return true;
}
@@ -1715,9 +1715,9 @@ void MachineInstr::print(raw_ostream &OS, bool SkipOpers) const {
if (!HaveSemi) OS << ";";
DIVariable DV(getOperand(e - 1).getMetadata());
OS << " line no:" << DV.getLineNumber();
- if (MDNode *InlinedAt = DV.getInlinedAt()) {
- DebugLoc InlinedAtDL = DebugLoc::getFromDILocation(InlinedAt);
- if (!InlinedAtDL.isUnknown() && MF) {
+ if (auto *InlinedAt = DV.getInlinedAt()) {
+ DebugLoc InlinedAtDL(InlinedAt);
+ if (InlinedAtDL && MF) {
OS << " inlined @[ ";
InlinedAtDL.print(OS);
OS << " ]";
@@ -1725,7 +1725,7 @@ void MachineInstr::print(raw_ostream &OS, bool SkipOpers) const {
}
if (isIndirectDebugValue())
OS << " indirect";
- } else if (!debugLoc.isUnknown() && MF) {
+ } else if (debugLoc && MF) {
if (!HaveSemi) OS << ";";
OS << " dbg:";
debugLoc.print(OS);
OpenPOWER on IntegriCloud