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 | 7f48777609b85f3c60bbeed625e7888ed2e84663 (patch) | |
tree | 3c987e446350971305295f7ff57b0753290d106d /llvm/lib/CodeGen | |
parent | 9832a3d1e0d7e013fe1adceea2a0d99b6ec6186b (diff) | |
download | bcm5719-llvm-7f48777609b85f3c60bbeed625e7888ed2e84663.tar.gz bcm5719-llvm-7f48777609b85f3c60bbeed625e7888ed2e84663.zip |
Debug info: Factor the retrieving of the DIVariable from a MachineInstr
into a function.
llvm-svn: 205973
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp index 11345eb288a..fde3604e04f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp +++ b/llvm/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)) |