summaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineInstr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/CodeGen/MachineInstr.cpp')
-rw-r--r--lib/CodeGen/MachineInstr.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/lib/CodeGen/MachineInstr.cpp b/lib/CodeGen/MachineInstr.cpp
index 40d6b20..39b7fb5 100644
--- a/lib/CodeGen/MachineInstr.cpp
+++ b/lib/CodeGen/MachineInstr.cpp
@@ -395,7 +395,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, const MachineMemOperand &MMO) {
/// TID NULL and no operands.
MachineInstr::MachineInstr()
: TID(0), NumImplicitOps(0), AsmPrinterFlags(0), MemRefs(0), MemRefsEnd(0),
- Parent(0), debugLoc(DebugLoc::getUnknownLoc()) {
+ Parent(0) {
// Make sure that we get added to a machine basicblock
LeakDetector::addGarbageObject(this);
}
@@ -415,8 +415,7 @@ void MachineInstr::addImplicitDefUseOperands() {
/// instructions with variable number of operands).
MachineInstr::MachineInstr(const TargetInstrDesc &tid, bool NoImp)
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0),
- MemRefs(0), MemRefsEnd(0), Parent(0),
- debugLoc(DebugLoc::getUnknownLoc()) {
+ MemRefs(0), MemRefsEnd(0), Parent(0) {
if (!NoImp && TID->getImplicitDefs())
for (const unsigned *ImpDefs = TID->getImplicitDefs(); *ImpDefs; ++ImpDefs)
NumImplicitOps++;
@@ -454,8 +453,7 @@ MachineInstr::MachineInstr(const TargetInstrDesc &tid, const DebugLoc dl,
///
MachineInstr::MachineInstr(MachineBasicBlock *MBB, const TargetInstrDesc &tid)
: TID(&tid), NumImplicitOps(0), AsmPrinterFlags(0),
- MemRefs(0), MemRefsEnd(0), Parent(0),
- debugLoc(DebugLoc::getUnknownLoc()) {
+ MemRefs(0), MemRefsEnd(0), Parent(0) {
assert(MBB && "Cannot use inserting ctor with null basic block!");
if (TID->ImplicitDefs)
for (const unsigned *ImpDefs = TID->getImplicitDefs(); *ImpDefs; ++ImpDefs)
@@ -1221,17 +1219,16 @@ void MachineInstr::print(raw_ostream &OS, const TargetMachine *TM) const {
// TODO: print InlinedAtLoc information
- DILocation DLT = MF->getDILocation(debugLoc);
- DIScope Scope = DLT.getScope();
+ DIScope Scope(debugLoc.getScope(MF->getFunction()->getContext()));
OS << " dbg:";
// Omit the directory, since it's usually long and uninteresting.
if (Scope.Verify())
OS << Scope.getFilename();
else
OS << "<unknown>";
- OS << ':' << DLT.getLineNumber();
- if (DLT.getColumnNumber() != 0)
- OS << ':' << DLT.getColumnNumber();
+ OS << ':' << debugLoc.getLine();
+ if (debugLoc.getCol() != 0)
+ OS << ':' << debugLoc.getCol();
}
OS << "\n";
OpenPOWER on IntegriCloud