summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-03-02 22:02:36 +0000
committerAdrian Prantl <aprantl@apple.com>2015-03-02 22:02:36 +0000
commitb846acc6c6fd4b05856f39cdedff377bf63c1729 (patch)
treecf611363594a194e935e56a58a43677d21dcf62f /llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
parent92da14b24402ece7602f4ee5d283e8baad7959c5 (diff)
downloadbcm5719-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/DwarfUnit.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 56e8f11c16a..ce394a85f02 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -17,6 +17,7 @@
#include "DwarfDebug.h"
#include "DwarfExpression.h"
#include "llvm/ADT/APFloat.h"
+#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DIBuilder.h"
#include "llvm/IR/DataLayout.h"
@@ -43,11 +44,11 @@ GenerateDwarfTypeUnits("generate-type-units", cl::Hidden,
cl::desc("Generate DWARF4 type units."),
cl::init(false));
-DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP,
- DwarfUnit &DU, DIELoc &DIE)
- : DwarfExpression(*AP.TM.getSubtargetImpl()->getRegisterInfo(),
- AP.getDwarfDebug()->getDwarfVersion()),
- AP(AP), DU(DU), DIE(DIE) {}
+DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU,
+ DIELoc &DIE)
+ : DwarfExpression(*AP.MF->getSubtarget().getRegisterInfo(),
+ AP.getDwarfDebug()->getDwarfVersion()),
+ AP(AP), DU(DU), DIE(DIE) {}
void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
DU.addUInt(DIE, dwarf::DW_FORM_data1, Op);
OpenPOWER on IntegriCloud