diff options
author | Adrian Prantl <aprantl@apple.com> | 2014-04-10 17:39:48 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2014-04-10 17:39:48 +0000 |
commit | b7b9bf458b2230a977ad5572b8435bb4a2d0cb13 (patch) | |
tree | 767c06da6615dd3fa6c7a3a17b0411908519e798 /lib/CodeGen | |
parent | f0aeabb5a61bd2ffeeee9bf6e43c6d21f312c96f (diff) | |
download | llvm-b7b9bf458b2230a977ad5572b8435bb4a2d0cb13.tar.gz llvm-b7b9bf458b2230a977ad5572b8435bb4a2d0cb13.tar.bz2 llvm-b7b9bf458b2230a977ad5572b8435bb4a2d0cb13.tar.xz |
Debug info: Factor the retrieving of the DIVariable from a MachineInstr
into a function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@205973 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r-- | lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 11345eb288..fde3604e04 100644 --- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp @@ -1198,7 +1198,7 @@ static DebugLocEntry getDebugLocEntry(AsmPrinter *Asm, const MCSymbol *SLabel, const MachineInstr *MI, DwarfCompileUnit *Unit) { - const MDNode *Var = MI->getOperand(MI->getNumOperands() - 1).getMetadata(); + const MDNode *Var = MI->getDebugVariable(); assert(MI->getNumOperands() == 3); if (MI->getOperand(0).isReg()) { @@ -1493,8 +1493,7 @@ void DwarfDebug::beginFunction(const MachineFunction *MF) { assert(MI->getNumOperands() > 1 && "Invalid machine instruction!"); // Keep track of user variables. - const MDNode *Var = - MI->getOperand(MI->getNumOperands() - 1).getMetadata(); + const MDNode *Var = MI->getDebugVariable(); // Variable is in a register, we need to check for clobbers. if (isDbgValueInDefinedReg(MI)) |