mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-10-25 10:27:04 +00:00
Allow MCCodeEmitter access to the target MCRegisterInfo.
Add the MCRegisterInfo to the factories and constructors. Patch by Tom Stellard <Tom.Stellard@amd.com>. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@156828 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -108,6 +108,7 @@ namespace llvm {
|
||||
const MCRegisterInfo &MRI,
|
||||
const MCSubtargetInfo &STI);
|
||||
typedef MCCodeEmitter *(*MCCodeEmitterCtorTy)(const MCInstrInfo &II,
|
||||
const MCRegisterInfo &MRI,
|
||||
const MCSubtargetInfo &STI,
|
||||
MCContext &Ctx);
|
||||
typedef MCStreamer *(*MCObjectStreamerCtorTy)(const Target &T,
|
||||
@@ -405,11 +406,12 @@ namespace llvm {
|
||||
|
||||
/// createMCCodeEmitter - Create a target specific code emitter.
|
||||
MCCodeEmitter *createMCCodeEmitter(const MCInstrInfo &II,
|
||||
const MCRegisterInfo &MRI,
|
||||
const MCSubtargetInfo &STI,
|
||||
MCContext &Ctx) const {
|
||||
if (!MCCodeEmitterCtorFn)
|
||||
return 0;
|
||||
return MCCodeEmitterCtorFn(II, STI, Ctx);
|
||||
return MCCodeEmitterCtorFn(II, MRI, STI, Ctx);
|
||||
}
|
||||
|
||||
/// createMCObjectStreamer - Create a target specific MCStreamer.
|
||||
@@ -1144,6 +1146,7 @@ namespace llvm {
|
||||
|
||||
private:
|
||||
static MCCodeEmitter *Allocator(const MCInstrInfo &II,
|
||||
const MCRegisterInfo &MRI,
|
||||
const MCSubtargetInfo &STI,
|
||||
MCContext &Ctx) {
|
||||
return new MCCodeEmitterImpl();
|
||||
|
||||
Reference in New Issue
Block a user