mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-25 16:30:05 +00:00
Migrate away a use of the subtarget (and TargetMachine) from
AsmPrinterDwarf since the information is on the MCRegisterInfo via the MCContext and MMI that we already have on the AsmPrinter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@229928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
aeb422f527
commit
b28b68c7ca
@ -15,19 +15,18 @@
|
||||
#include "DwarfExpression.h"
|
||||
#include "llvm/ADT/Twine.h"
|
||||
#include "llvm/CodeGen/AsmPrinter.h"
|
||||
#include "llvm/CodeGen/MachineModuleInfo.h"
|
||||
#include "llvm/IR/DataLayout.h"
|
||||
#include "llvm/MC/MCAsmInfo.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCSection.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
#include "llvm/MC/MCSymbol.h"
|
||||
#include "llvm/MC/MachineLocation.h"
|
||||
#include "llvm/Support/Dwarf.h"
|
||||
#include "llvm/Support/ErrorHandling.h"
|
||||
#include "llvm/Target/TargetFrameLowering.h"
|
||||
#include "llvm/Target/TargetLoweringObjectFile.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Target/TargetSubtargetInfo.h"
|
||||
using namespace llvm;
|
||||
|
||||
#define DEBUG_TYPE "asm-printer"
|
||||
@ -230,8 +229,8 @@ void AsmPrinter::EmitDwarfOpPiece(ByteStreamer &Streamer,
|
||||
void AsmPrinter::EmitDwarfRegOp(ByteStreamer &Streamer,
|
||||
const MachineLocation &MLoc) const {
|
||||
DebugLocDwarfExpression Expr(*this, Streamer);
|
||||
const TargetRegisterInfo *TRI = TM.getSubtargetImpl()->getRegisterInfo();
|
||||
int Reg = TRI->getDwarfRegNum(MLoc.getReg(), false);
|
||||
const MCRegisterInfo *MRI = MMI->getContext().getRegisterInfo();
|
||||
int Reg = MRI->getDwarfRegNum(MLoc.getReg(), false);
|
||||
if (Reg < 0) {
|
||||
// We assume that pointers are always in an addressable register.
|
||||
if (MLoc.isIndirect())
|
||||
|
Loading…
x
Reference in New Issue
Block a user