summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/WasmObjectWriter.cpp
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2018-05-21 18:11:35 +0000
committerPeter Collingbourne <peter@pcc.me.uk>2018-05-21 18:11:35 +0000
commit147db3e628369d5d8cfee192647912ebaea28f0e (patch)
tree7d7e7c5165da3f8661810aabe8c564115fa46ef2 /llvm/lib/MC/WasmObjectWriter.cpp
parent571a3301aeaaddcb1d784d8f27957170fe0cfd15 (diff)
downloadbcm5719-llvm-147db3e628369d5d8cfee192647912ebaea28f0e.tar.gz
bcm5719-llvm-147db3e628369d5d8cfee192647912ebaea28f0e.zip
MC: Change MCAssembler::writeSectionData and writeFragmentPadding to take a raw_ostream. NFCI.
Also clean up a couple of hacks where we were writing the section contents to another stream by setting the object writer's stream, writing and setting it back. Part of PR37466. Differential Revision: https://reviews.llvm.org/D47038 llvm-svn: 332858
Diffstat (limited to 'llvm/lib/MC/WasmObjectWriter.cpp')
-rw-r--r--llvm/lib/MC/WasmObjectWriter.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp
index 22e05c17994..daefd5d2b54 100644
--- a/llvm/lib/MC/WasmObjectWriter.cpp
+++ b/llvm/lib/MC/WasmObjectWriter.cpp
@@ -853,7 +853,7 @@ void WasmObjectWriter::writeCodeSection(const MCAssembler &Asm,
encodeULEB128(Size, getStream());
FuncSection.setSectionOffset(getStream().tell() - Section.ContentsOffset);
- Asm.writeSectionData(&FuncSection, Layout);
+ Asm.writeSectionData(getStream(), &FuncSection, Layout);
}
// Apply fixups.
@@ -1016,7 +1016,7 @@ void WasmObjectWriter::writeCustomSections(const MCAssembler &Asm,
startCustomSection(Section, CustomSection.Name);
Sec->setSectionOffset(getStream().tell() - Section.ContentsOffset);
- Asm.writeSectionData(Sec, Layout);
+ Asm.writeSectionData(getStream(), Sec, Layout);
CustomSection.OutputContentsOffset = Section.ContentsOffset;
CustomSection.OutputIndex = Section.Index;
OpenPOWER on IntegriCloud