diff options
| author | Adrian Prantl <aprantl@apple.com> | 2015-03-02 22:02:36 +0000 |
|---|---|---|
| committer | Adrian Prantl <aprantl@apple.com> | 2015-03-02 22:02:36 +0000 |
| commit | b846acc6c6fd4b05856f39cdedff377bf63c1729 (patch) | |
| tree | cf611363594a194e935e56a58a43677d21dcf62f /llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | |
| parent | 92da14b24402ece7602f4ee5d283e8baad7959c5 (diff) | |
| download | bcm5719-llvm-b846acc6c6fd4b05856f39cdedff377bf63c1729.tar.gz bcm5719-llvm-b846acc6c6fd4b05856f39cdedff377bf63c1729.zip | |
Revert "Revert "For the dwarf expression code get the subtarget off of the current""
This reapplies r230990 without modifications.
llvm-svn: 231024
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp index d602660b3bd..1b4e4cfc4f8 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp @@ -16,6 +16,7 @@ #include "DwarfExpression.h" #include "llvm/ADT/Twine.h" #include "llvm/CodeGen/AsmPrinter.h" +#include "llvm/CodeGen/MachineFunction.h" #include "llvm/CodeGen/MachineModuleInfo.h" #include "llvm/IR/DataLayout.h" #include "llvm/MC/MCAsmInfo.h" @@ -191,7 +192,7 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label, /// EmitDwarfRegOp - Emit dwarf register operation. void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer, const MachineLocation &MLoc) const { - DebugLocDwarfExpression Expr(*TM.getSubtargetImpl()->getRegisterInfo(), + DebugLocDwarfExpression Expr(*MF->getSubtarget().getRegisterInfo(), getDwarfDebug()->getDwarfVersion(), Streamer); const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo(); int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false); |

