diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2018-05-21 17:57:19 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2018-05-21 17:57:19 +0000 |
commit | a8e9721d8de743d0610782cd65b22875945ee393 (patch) | |
tree | 71b3538c95c14efa10e17bbbb715a358034ba898 /lib/Target/SystemZ | |
parent | c2406964f339a7e40cef3d9419d9645a9ad838a8 (diff) |
MC: Change MCAsmBackend::writeNopData() to take a raw_ostream instead of an MCObjectWriter. NFCI.
To make this work I needed to add an endianness field to MCAsmBackend
so that writeNopData() implementations know which endianness to use.
Part of PR37466.
Differential Revision: https://reviews.llvm.org/D47035
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@332857 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SystemZ')
-rw-r--r-- | lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp index 5cd4a7daf0f..321f49f596e 100644 --- a/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp +++ b/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp @@ -44,7 +44,7 @@ class SystemZMCAsmBackend : public MCAsmBackend { uint8_t OSABI; public: SystemZMCAsmBackend(uint8_t osABI) - : OSABI(osABI) {} + : MCAsmBackend(support::big), OSABI(osABI) {} // Override MCAsmBackend unsigned getNumFixupKinds() const override { @@ -66,7 +66,7 @@ public: MCInst &Res) const override { llvm_unreachable("SystemZ does do not have assembler relaxation"); } - bool writeNopData(uint64_t Count, MCObjectWriter *OW) const override; + bool writeNopData(raw_ostream &OS, uint64_t Count) const override; std::unique_ptr<MCObjectWriter> createObjectWriter(raw_pwrite_stream &OS) const override { return createSystemZObjectWriter(OS, OSABI); @@ -115,10 +115,9 @@ void SystemZMCAsmBackend::applyFixup(const MCAssembler &Asm, } } -bool SystemZMCAsmBackend::writeNopData(uint64_t Count, - MCObjectWriter *OW) const { +bool SystemZMCAsmBackend::writeNopData(raw_ostream &OS, uint64_t Count) const { for (uint64_t I = 0; I != Count; ++I) - OW->write8(7); + OS << '\x7'; return true; } |