mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-11-01 15:11:24 +00:00
Remove duplicated code and consolidate initializers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234525 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7e0993d377
commit
a9fa357be4
@ -222,20 +222,6 @@ void HexagonAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
||||
return;
|
||||
}
|
||||
|
||||
static MCInstPrinter *createHexagonMCInstPrinter(const Triple &T,
|
||||
unsigned SyntaxVariant,
|
||||
const MCAsmInfo &MAI,
|
||||
const MCInstrInfo &MII,
|
||||
const MCRegisterInfo &MRI) {
|
||||
if (SyntaxVariant == 0)
|
||||
return(new HexagonInstPrinter(MAI, MII, MRI));
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
extern "C" void LLVMInitializeHexagonAsmPrinter() {
|
||||
RegisterAsmPrinter<HexagonAsmPrinter> X(TheHexagonTarget);
|
||||
|
||||
TargetRegistry::RegisterMCInstPrinter(TheHexagonTarget,
|
||||
createHexagonMCInstPrinter);
|
||||
}
|
||||
|
@ -75,12 +75,16 @@ static MCCodeGenInfo *createHexagonMCCodeGenInfo(StringRef TT, Reloc::Model RM,
|
||||
X->InitMCCodeGenInfo(Reloc::Static, CM, OL);
|
||||
return X;
|
||||
}
|
||||
|
||||
static MCInstPrinter *createHexagonMCInstPrinter(const Triple &T,
|
||||
unsigned SyntaxVariant,
|
||||
const MCAsmInfo &MAI,
|
||||
const MCInstrInfo &MII,
|
||||
const MCRegisterInfo &MRI) {
|
||||
return new HexagonInstPrinter(MAI, MII, MRI);
|
||||
if (SyntaxVariant == 0)
|
||||
return(new HexagonInstPrinter(MAI, MII, MRI));
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
// Force static initialization.
|
||||
|
Loading…
Reference in New Issue
Block a user