forked from OSchip/llvm-project
Remove the local subtarget variable from the SystemZ asm printer
and update the two calls accordingly. llvm-svn: 229805
This commit is contained in:
parent
0795a2ef0c
commit
d84f5d30e2
|
@ -186,7 +186,7 @@ void SystemZAsmPrinter::EmitInstruction(const MachineInstr *MI) {
|
|||
#undef LOWER_HIGH
|
||||
|
||||
case SystemZ::Serialize:
|
||||
if (Subtarget->hasFastSerialization())
|
||||
if (MF->getSubtarget<SystemZSubtarget>().hasFastSerialization())
|
||||
LoweredMI = MCInstBuilder(SystemZ::AsmBCR)
|
||||
.addImm(14).addReg(SystemZ::R0D);
|
||||
else
|
||||
|
@ -256,7 +256,7 @@ bool SystemZAsmPrinter::PrintAsmMemoryOperand(const MachineInstr *MI,
|
|||
}
|
||||
|
||||
void SystemZAsmPrinter::EmitEndOfAsmFile(Module &M) {
|
||||
if (Subtarget->isTargetELF()) {
|
||||
if (Triple(TM.getTargetTriple()).isOSBinFormatELF()) {
|
||||
auto &TLOFELF =
|
||||
static_cast<const TargetLoweringObjectFileELF &>(getObjFileLowering());
|
||||
|
||||
|
|
|
@ -22,14 +22,9 @@ class Module;
|
|||
class raw_ostream;
|
||||
|
||||
class LLVM_LIBRARY_VISIBILITY SystemZAsmPrinter : public AsmPrinter {
|
||||
private:
|
||||
const SystemZSubtarget *Subtarget;
|
||||
|
||||
public:
|
||||
SystemZAsmPrinter(TargetMachine &TM, std::unique_ptr<MCStreamer> Streamer)
|
||||
: AsmPrinter(TM, std::move(Streamer)) {
|
||||
Subtarget = &TM.getSubtarget<SystemZSubtarget>();
|
||||
}
|
||||
: AsmPrinter(TM, std::move(Streamer)) {}
|
||||
|
||||
// Override AsmPrinter.
|
||||
const char *getPassName() const override {
|
||||
|
|
Loading…
Reference in New Issue