mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Separate MCInstPrinter registration from AsmPrinter registration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135974 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -316,18 +316,7 @@ isBlockOnlyReachableByFallthrough(const MachineBasicBlock *MBB) const {
|
||||
return I == Pred->end() || !I->getDesc().isBarrier();
|
||||
}
|
||||
|
||||
static MCInstPrinter *createMBlazeMCInstPrinter(const Target &T,
|
||||
unsigned SyntaxVariant,
|
||||
const MCAsmInfo &MAI) {
|
||||
if (SyntaxVariant == 0)
|
||||
return new MBlazeInstPrinter(MAI);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeMBlazeAsmPrinter() {
|
||||
RegisterAsmPrinter<MBlazeAsmPrinter> X(TheMBlazeTarget);
|
||||
TargetRegistry::RegisterMCInstPrinter(TheMBlazeTarget,
|
||||
createMBlazeMCInstPrinter);
|
||||
|
||||
}
|
||||
|
@@ -13,6 +13,7 @@
|
||||
|
||||
#include "MBlazeMCTargetDesc.h"
|
||||
#include "MBlazeMCAsmInfo.h"
|
||||
#include "InstPrinter/MBlazeInstPrinter.h"
|
||||
#include "llvm/MC/MCInstrInfo.h"
|
||||
#include "llvm/MC/MCRegisterInfo.h"
|
||||
#include "llvm/MC/MCStreamer.h"
|
||||
@@ -91,6 +92,14 @@ static MCStreamer *createMCStreamer(const Target &T, const std::string &TT,
|
||||
return createELFStreamer(Ctx, TAB, _OS, _Emitter, RelaxAll, NoExecStack);
|
||||
}
|
||||
|
||||
static MCInstPrinter *createMBlazeMCInstPrinter(const Target &T,
|
||||
unsigned SyntaxVariant,
|
||||
const MCAsmInfo &MAI) {
|
||||
if (SyntaxVariant == 0)
|
||||
return new MBlazeInstPrinter(MAI);
|
||||
return 0;
|
||||
}
|
||||
|
||||
// Force static initialization.
|
||||
extern "C" void LLVMInitializeMBlazeTargetMC() {
|
||||
// Register the MC asm info.
|
||||
@@ -122,4 +131,8 @@ extern "C" void LLVMInitializeMBlazeTargetMC() {
|
||||
// Register the object streamer
|
||||
TargetRegistry::RegisterObjectStreamer(TheMBlazeTarget,
|
||||
createMCStreamer);
|
||||
|
||||
// Register the MCInstPrinter.
|
||||
TargetRegistry::RegisterMCInstPrinter(TheMBlazeTarget,
|
||||
createMBlazeMCInstPrinter);
|
||||
}
|
||||
|
Reference in New Issue
Block a user