mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Revert "Add a TargetMachine local MCRegisterInfo and MCInstrInfo so that"
Committed too early. This reverts commit r232666. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232667 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -47,10 +47,8 @@ EnableFastISelOption("fast-isel", cl::Hidden,
|
||||
cl::desc("Enable the \"fast\" instruction selector"));
|
||||
|
||||
void LLVMTargetMachine::initAsmInfo() {
|
||||
MRI = TheTarget.createMCRegInfo(getTargetTriple());
|
||||
MII = TheTarget.createMCInstrInfo();
|
||||
|
||||
MCAsmInfo *TmpAsmInfo = TheTarget.createMCAsmInfo(*MRI, getTargetTriple());
|
||||
MCAsmInfo *TmpAsmInfo = TheTarget.createMCAsmInfo(
|
||||
*getSubtargetImpl()->getRegisterInfo(), getTargetTriple());
|
||||
// TargetSelect.h moved to a different directory between LLVM 2.9 and 3.0,
|
||||
// and if the old one gets included then MCAsmInfo will be NULL and
|
||||
// we'll crash later.
|
||||
@@ -166,15 +164,15 @@ bool LLVMTargetMachine::addPassesToEmitFile(PassManagerBase &PM,
|
||||
|
||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
||||
const MCAsmInfo &MAI = *getMCAsmInfo();
|
||||
const MCRegisterInfo &MRI = *getMCRegisterInfo();
|
||||
const MCInstrInfo &MII = *getMCInstrInfo();
|
||||
|
||||
const MCRegisterInfo &MRI = *getSubtargetImpl()->getRegisterInfo();
|
||||
const MCInstrInfo &MII = *getSubtargetImpl()->getInstrInfo();
|
||||
std::unique_ptr<MCStreamer> AsmStreamer;
|
||||
|
||||
switch (FileType) {
|
||||
case CGFT_AssemblyFile: {
|
||||
MCInstPrinter *InstPrinter = getTarget().createMCInstPrinter(
|
||||
MAI.getAssemblerDialect(), MAI, MII, MRI, STI);
|
||||
MCInstPrinter *InstPrinter =
|
||||
getTarget().createMCInstPrinter(MAI.getAssemblerDialect(), MAI,
|
||||
MII, MRI, STI);
|
||||
|
||||
// Create a code emitter if asked to show the encoding.
|
||||
MCCodeEmitter *MCE = nullptr;
|
||||
@@ -241,7 +239,8 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
||||
|
||||
// Create the code emitter for the target if it exists. If not, .o file
|
||||
// emission fails.
|
||||
const MCRegisterInfo &MRI = *getMCRegisterInfo();
|
||||
const MCRegisterInfo &MRI = *getSubtargetImpl()->getRegisterInfo();
|
||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
||||
MCCodeEmitter *MCE = getTarget().createMCCodeEmitter(
|
||||
*getSubtargetImpl()->getInstrInfo(), MRI, *Ctx);
|
||||
MCAsmBackend *MAB = getTarget().createMCAsmBackend(MRI, getTargetTriple(),
|
||||
@@ -250,7 +249,6 @@ bool LLVMTargetMachine::addPassesToEmitMC(PassManagerBase &PM,
|
||||
return true;
|
||||
|
||||
Triple T(getTargetTriple());
|
||||
const MCSubtargetInfo &STI = getSubtarget<MCSubtargetInfo>();
|
||||
std::unique_ptr<MCStreamer> AsmStreamer(getTarget().createMCObjectStreamer(
|
||||
T, *Ctx, *MAB, Out, MCE, STI, Options.MCOptions.MCRelaxAll));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user