[llvm] r229805 - Remove the local subtarget variable from the SystemZ asm printer
Eric Christopher
echristo at gmail.com
Wed Feb 18 17:26:28 PST 2015
Author: echristo
Date: Wed Feb 18 19:26:28 2015
New Revision: 229805
URL: http://llvm.org/viewvc/llvm-project?rev=229805&view=rev
Log:
Remove the local subtarget variable from the SystemZ asm printer
and update the two calls accordingly.
Modified:
llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.h
Modified: llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp?rev=229805&r1=229804&r2=229805&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.cpp Wed Feb 18 19:26:28 2015
@@ -186,7 +186,7 @@ void SystemZAsmPrinter::EmitInstruction(
#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::PrintAsmMemoryOp
}
void SystemZAsmPrinter::EmitEndOfAsmFile(Module &M) {
- if (Subtarget->isTargetELF()) {
+ if (Triple(TM.getTargetTriple()).isOSBinFormatELF()) {
auto &TLOFELF =
static_cast<const TargetLoweringObjectFileELF &>(getObjFileLowering());
Modified: llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.h?rev=229805&r1=229804&r2=229805&view=diff
==============================================================================
--- llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.h (original)
+++ llvm/trunk/lib/Target/SystemZ/SystemZAsmPrinter.h Wed Feb 18 19:26:28 2015
@@ -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 {
More information about the llvm-commits
mailing list