diff options
| author | Mike Edwards <mike@sqlby.me> | 2017-09-20 01:21:02 +0000 |
|---|---|---|
| committer | Mike Edwards <mike@sqlby.me> | 2017-09-20 01:21:02 +0000 |
| commit | b487bf45f0d457e9811b4345ab8304b76213b302 (patch) | |
| tree | b5443f77c1fbe9b45d913aa10856243db3a86c8d /llvm/lib/MC | |
| parent | 66a004ac0c25fd200e0b6403aa7b0e93fac0bf4f (diff) | |
| download | bcm5719-llvm-b487bf45f0d457e9811b4345ab8304b76213b302.tar.gz bcm5719-llvm-b487bf45f0d457e9811b4345ab8304b76213b302.zip | |
Reverting due to Green Dragon bot failure.
http://green.lab.llvm.org/green/job/clang-stage1-cmake-RA-incremental/42594/
llvm-svn: 313706
Diffstat (limited to 'llvm/lib/MC')
| -rw-r--r-- | llvm/lib/MC/WasmObjectWriter.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/llvm/lib/MC/WasmObjectWriter.cpp b/llvm/lib/MC/WasmObjectWriter.cpp index 6ec93246c06..7ed20d32fd2 100644 --- a/llvm/lib/MC/WasmObjectWriter.cpp +++ b/llvm/lib/MC/WasmObjectWriter.cpp @@ -102,7 +102,6 @@ struct WasmFunctionTypeDenseMapInfo { // wasm data segment. struct WasmDataSegment { MCSectionWasm *Section; - StringRef Name; uint32_t Offset; SmallVector<char, 4> Data; }; @@ -280,8 +279,7 @@ private: uint32_t NumFuncImports); void writeCodeRelocSection(); void writeDataRelocSection(); - void writeLinkingMetaDataSection(ArrayRef<WasmDataSegment> Segments, - uint32_t DataSize, uint32_t DataAlignment, + void writeLinkingMetaDataSection(uint32_t DataSize, uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols, bool HasStackPointer, uint32_t StackPointerGlobal); @@ -913,8 +911,7 @@ void WasmObjectWriter::writeDataRelocSection() { } void WasmObjectWriter::writeLinkingMetaDataSection( - ArrayRef<WasmDataSegment> Segments, uint32_t DataSize, - uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols, + uint32_t DataSize, uint32_t DataAlignment, ArrayRef<StringRef> WeakSymbols, bool HasStackPointer, uint32_t StackPointerGlobal) { SectionBookkeeping Section; startSection(Section, wasm::WASM_SEC_CUSTOM, "linking"); @@ -946,14 +943,6 @@ void WasmObjectWriter::writeLinkingMetaDataSection( endSection(SubSection); } - if (Segments.size()) { - startSection(SubSection, wasm::WASM_SEGMENT_NAMES); - encodeULEB128(Segments.size(), getStream()); - for (const WasmDataSegment &Segment : Segments) - writeString(Segment.Name); - endSection(SubSection); - } - endSection(Section); } @@ -1140,7 +1129,6 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, DataSize = alignTo(DataSize, Section.getAlignment()); DataSegments.emplace_back(); WasmDataSegment &Segment = DataSegments.back(); - Segment.Name = Section.getSectionName(); Segment.Offset = DataSize; Segment.Section = &Section; addData(Segment.Data, Section, DataAlignment); @@ -1300,8 +1288,7 @@ void WasmObjectWriter::writeObject(MCAssembler &Asm, writeNameSection(Functions, Imports, NumFuncImports); writeCodeRelocSection(); writeDataRelocSection(); - writeLinkingMetaDataSection(DataSegments, DataSize, DataAlignment, - WeakSymbols, HasStackPointer, StackPointerGlobal); + writeLinkingMetaDataSection(DataSize, DataAlignment, WeakSymbols, HasStackPointer, StackPointerGlobal); // TODO: Translate the .comment section to the output. // TODO: Translate debug sections to the output. |

