summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/SystemZ
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-05-21 17:57:19 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-05-21 17:57:19 +0000
commit571a3301aeaaddcb1d784d8f27957170fe0cfd15 (patch)
tree68b8fadb711472ead3443a2b0352d21eadb7d405 /llvm/lib/Target/SystemZ
parenta91ce17b5f2bbaa909aaa61a4610316de06f18cb (diff)
downloadbcm5719-llvm-571a3301aeaaddcb1d784d8f27957170fe0cfd15.tar.gz
bcm5719-llvm-571a3301aeaaddcb1d784d8f27957170fe0cfd15.zip
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 llvm-svn: 332857
Diffstat (limited to 'llvm/lib/Target/SystemZ')
-rw-r--r--llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp b/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
index 5cd4a7daf0f..321f49f596e 100644
--- a/llvm/lib/Target/SystemZ/MCTargetDesc/SystemZMCAsmBackend.cpp
+++ b/llvm/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;
}
OpenPOWER on IntegriCloud