mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-26 05:25:47 +00:00
Reset the Subtarget in the AsmPrinter for each machine function
and add explanatory comment about dual initialization. Fix use of the Subtarget to grab the information off of the target machine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@213336 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -58,6 +58,8 @@ MipsTargetStreamer &MipsAsmPrinter::getTargetStreamer() {
|
||||
}
|
||||
|
||||
bool MipsAsmPrinter::runOnMachineFunction(MachineFunction &MF) {
|
||||
Subtarget = &TM.getSubtarget<MipsSubtarget>();
|
||||
|
||||
// Initialize TargetLoweringObjectFile.
|
||||
if (Subtarget->allowMixed16_32())
|
||||
const_cast<TargetLoweringObjectFile&>(getObjFileLowering())
|
||||
@@ -672,7 +674,7 @@ void MipsAsmPrinter::EmitStartOfAsmFile(Module &M) {
|
||||
bool IsABICalls = true;
|
||||
if (IsABICalls) {
|
||||
getTargetStreamer().emitDirectiveAbiCalls();
|
||||
Reloc::Model RM = Subtarget->getRelocationModel();
|
||||
Reloc::Model RM = TM.getRelocationModel();
|
||||
// FIXME: This condition should be a lot more complicated that it is here.
|
||||
// Ideally it should test for properties of the ABI and not the ABI
|
||||
// itself.
|
||||
|
Reference in New Issue
Block a user