mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +00:00
For the dwarf expression code get the subtarget off of the current
MachineFunction. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@230990 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0a5c3015f8
commit
45ba21c4a3
@ -16,6 +16,7 @@
|
|||||||
#include "DwarfExpression.h"
|
#include "DwarfExpression.h"
|
||||||
#include "llvm/ADT/Twine.h"
|
#include "llvm/ADT/Twine.h"
|
||||||
#include "llvm/CodeGen/AsmPrinter.h"
|
#include "llvm/CodeGen/AsmPrinter.h"
|
||||||
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||||
#include "llvm/IR/DataLayout.h"
|
#include "llvm/IR/DataLayout.h"
|
||||||
#include "llvm/MC/MCAsmInfo.h"
|
#include "llvm/MC/MCAsmInfo.h"
|
||||||
@ -191,7 +192,7 @@ void AsmPrinter::EmitSectionOffset(const MCSymbol *Label,
|
|||||||
/// EmitDwarfRegOp - Emit dwarf register operation.
|
/// EmitDwarfRegOp - Emit dwarf register operation.
|
||||||
void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer,
|
void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer,
|
||||||
const MachineLocation &MLoc) const {
|
const MachineLocation &MLoc) const {
|
||||||
DebugLocDwarfExpression Expr(*TM.getSubtargetImpl()->getRegisterInfo(),
|
DebugLocDwarfExpression Expr(*MF->getSubtarget().getRegisterInfo(),
|
||||||
getDwarfDebug()->getDwarfVersion(), Streamer);
|
getDwarfDebug()->getDwarfVersion(), Streamer);
|
||||||
const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo();
|
const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo();
|
||||||
int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false);
|
int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false);
|
||||||
|
@ -17,6 +17,7 @@
|
|||||||
#include "DwarfDebug.h"
|
#include "DwarfDebug.h"
|
||||||
#include "DwarfExpression.h"
|
#include "DwarfExpression.h"
|
||||||
#include "llvm/ADT/APFloat.h"
|
#include "llvm/ADT/APFloat.h"
|
||||||
|
#include "llvm/CodeGen/MachineFunction.h"
|
||||||
#include "llvm/IR/Constants.h"
|
#include "llvm/IR/Constants.h"
|
||||||
#include "llvm/IR/DIBuilder.h"
|
#include "llvm/IR/DIBuilder.h"
|
||||||
#include "llvm/IR/DataLayout.h"
|
#include "llvm/IR/DataLayout.h"
|
||||||
@ -43,9 +44,9 @@ GenerateDwarfTypeUnits("generate-type-units", cl::Hidden,
|
|||||||
cl::desc("Generate DWARF4 type units."),
|
cl::desc("Generate DWARF4 type units."),
|
||||||
cl::init(false));
|
cl::init(false));
|
||||||
|
|
||||||
DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP,
|
DIEDwarfExpression::DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU,
|
||||||
DwarfUnit &DU, DIELoc &DIE)
|
DIELoc &DIE)
|
||||||
: DwarfExpression(*AP.TM.getSubtargetImpl()->getRegisterInfo(),
|
: DwarfExpression(*AP.MF->getSubtarget().getRegisterInfo(),
|
||||||
AP.getDwarfDebug()->getDwarfVersion()),
|
AP.getDwarfDebug()->getDwarfVersion()),
|
||||||
AP(AP), DU(DU), DIE(DIE) {}
|
AP(AP), DU(DU), DIE(DIE) {}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user