[llvm] r231003 - Revert "For the dwarf expression code get the subtarget off of the current"
Adrian Prantl
aprantl at apple.com
Mon Mar 2 12:01:48 PST 2015
Author: adrian
Date: Mon Mar 2 14:01:47 2015
New Revision: 231003
URL: http://llvm.org/viewvc/llvm-project?rev=231003&view=rev
Log:
Revert "For the dwarf expression code get the subtarget off of the current"
This reverts commit 230990 because also reverting 230975.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp?rev=231003&r1=231002&r2=231003&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp Mon Mar 2 14:01:47 2015
@@ -16,7 +16,6 @@
#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"
@@ -192,7 +191,7 @@ void AsmPrinter::EmitSectionOffset(const
/// EmitDwarfRegOp - Emit dwarf register operation.
void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer,
const MachineLocation &MLoc) const {
- DebugLocDwarfExpression Expr(*MF->getSubtarget().getRegisterInfo(),
+ DebugLocDwarfExpression Expr(*TM.getSubtargetImpl()->getRegisterInfo(),
getDwarfDebug()->getDwarfVersion(), Streamer);
const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo();
int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false);
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=231003&r1=231002&r2=231003&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Mon Mar 2 14:01:47 2015
@@ -17,7 +17,6 @@
#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"
@@ -44,11 +43,11 @@ GenerateDwarfTypeUnits("generate-type-un
cl::desc("Generate DWARF4 type units."),
cl::init(false));
-DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU,
- DIELoc &DIE)
- : DwarfExpression(*AP.MF->getSubtarget().getRegisterInfo(),
- AP.getDwarfDebug()->getDwarfVersion()),
- AP(AP), DU(DU), DIE(DIE) {}
+DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP,
+ DwarfUnit &DU, DIELoc &DIE)
+ : DwarfExpression(*AP.TM.getSubtargetImpl()->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);
More information about the llvm-commits
mailing list