mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-24 23:28:41 +00:00
fix the sparc codegen to not depend on the sparc asmprinter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#define DEBUG_TYPE "asm-printer"
|
||||
#include "Sparc.h"
|
||||
#include "SparcInstrInfo.h"
|
||||
#include "SparcTargetMachine.h"
|
||||
#include "llvm/Constants.h"
|
||||
#include "llvm/DerivedTypes.h"
|
||||
#include "llvm/Module.h"
|
||||
@@ -24,8 +25,6 @@
|
||||
#include "llvm/CodeGen/MachineConstantPool.h"
|
||||
#include "llvm/CodeGen/MachineInstr.h"
|
||||
#include "llvm/Target/TargetAsmInfo.h"
|
||||
#include "llvm/Target/TargetData.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Support/Mangler.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
#include "llvm/ADT/Statistic.h"
|
||||
@@ -88,6 +87,7 @@ FunctionPass *llvm::createSparcCodePrinterPass(raw_ostream &o,
|
||||
return new SparcAsmPrinter(o, tm, tm.getTargetAsmInfo(), OptLevel, verbose);
|
||||
}
|
||||
|
||||
|
||||
/// runOnMachineFunction - This uses the printInstruction()
|
||||
/// method to print assembly for each instruction.
|
||||
///
|
||||
@@ -354,6 +354,14 @@ bool SparcAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
||||
return false;
|
||||
}
|
||||
|
||||
namespace {
|
||||
static struct Register {
|
||||
Register() {
|
||||
SparcTargetMachine::registerAsmPrinter(createSparcCodePrinterPass);
|
||||
}
|
||||
} Registrator;
|
||||
}
|
||||
|
||||
// Force static initialization when called from
|
||||
// llvm/InitializeAllAsmPrinters.h
|
||||
namespace llvm {
|
||||
|
Reference in New Issue
Block a user