Lines Matching refs:Section

33   void writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec,
38 void writeSectionContent(raw_ostream &OS, WasmYAML::CustomSection &Section);
39 void writeSectionContent(raw_ostream &OS, WasmYAML::TypeSection &Section);
40 void writeSectionContent(raw_ostream &OS, WasmYAML::ImportSection &Section);
41 void writeSectionContent(raw_ostream &OS, WasmYAML::FunctionSection &Section);
42 void writeSectionContent(raw_ostream &OS, WasmYAML::TableSection &Section);
43 void writeSectionContent(raw_ostream &OS, WasmYAML::MemorySection &Section);
44 void writeSectionContent(raw_ostream &OS, WasmYAML::TagSection &Section);
45 void writeSectionContent(raw_ostream &OS, WasmYAML::GlobalSection &Section);
46 void writeSectionContent(raw_ostream &OS, WasmYAML::ExportSection &Section);
47 void writeSectionContent(raw_ostream &OS, WasmYAML::StartSection &Section);
48 void writeSectionContent(raw_ostream &OS, WasmYAML::ElemSection &Section);
49 void writeSectionContent(raw_ostream &OS, WasmYAML::CodeSection &Section);
50 void writeSectionContent(raw_ostream &OS, WasmYAML::DataSection &Section);
51 void writeSectionContent(raw_ostream &OS, WasmYAML::DataCountSection &Section);
54 void writeSectionContent(raw_ostream &OS, WasmYAML::DylinkSection &Section);
55 void writeSectionContent(raw_ostream &OS, WasmYAML::NameSection &Section);
56 void writeSectionContent(raw_ostream &OS, WasmYAML::LinkingSection &Section);
57 void writeSectionContent(raw_ostream &OS, WasmYAML::ProducersSection &Section);
59 WasmYAML::TargetFeaturesSection &Section);
158 WasmYAML::DylinkSection &Section) { in writeSectionContent() argument
159 writeStringRef(Section.Name, OS); in writeSectionContent()
160 encodeULEB128(Section.MemorySize, OS); in writeSectionContent()
161 encodeULEB128(Section.MemoryAlignment, OS); in writeSectionContent()
162 encodeULEB128(Section.TableSize, OS); in writeSectionContent()
163 encodeULEB128(Section.TableAlignment, OS); in writeSectionContent()
164 encodeULEB128(Section.Needed.size(), OS); in writeSectionContent()
165 for (StringRef Needed : Section.Needed) in writeSectionContent()
170 WasmYAML::LinkingSection &Section) { in writeSectionContent() argument
171 writeStringRef(Section.Name, OS); in writeSectionContent()
172 encodeULEB128(Section.Version, OS); in writeSectionContent()
177 if (Section.SymbolTable.size()) { in writeSectionContent()
180 encodeULEB128(Section.SymbolTable.size(), SubSection.getStream()); in writeSectionContent()
184 for (const WasmYAML::SymbolInfo &Info : Section.SymbolTable) { in writeSectionContent()
218 if (Section.SegmentInfos.size()) { in writeSectionContent()
220 encodeULEB128(Section.SegmentInfos.size(), SubSection.getStream()); in writeSectionContent()
221 for (const WasmYAML::SegmentInfo &SegmentInfo : Section.SegmentInfos) { in writeSectionContent()
230 if (Section.InitFunctions.size()) { in writeSectionContent()
232 encodeULEB128(Section.InitFunctions.size(), SubSection.getStream()); in writeSectionContent()
233 for (const WasmYAML::InitFunction &Func : Section.InitFunctions) { in writeSectionContent()
241 if (Section.Comdats.size()) { in writeSectionContent()
243 encodeULEB128(Section.Comdats.size(), SubSection.getStream()); in writeSectionContent()
244 for (const auto &C : Section.Comdats) { in writeSectionContent()
258 WasmYAML::NameSection &Section) { in writeSectionContent() argument
259 writeStringRef(Section.Name, OS); in writeSectionContent()
260 if (Section.FunctionNames.size()) { in writeSectionContent()
265 encodeULEB128(Section.FunctionNames.size(), SubSection.getStream()); in writeSectionContent()
266 for (const WasmYAML::NameEntry &NameEntry : Section.FunctionNames) { in writeSectionContent()
273 if (Section.GlobalNames.size()) { in writeSectionContent()
278 encodeULEB128(Section.GlobalNames.size(), SubSection.getStream()); in writeSectionContent()
279 for (const WasmYAML::NameEntry &NameEntry : Section.GlobalNames) { in writeSectionContent()
286 if (Section.DataSegmentNames.size()) { in writeSectionContent()
291 encodeULEB128(Section.DataSegmentNames.size(), SubSection.getStream()); in writeSectionContent()
292 for (const WasmYAML::NameEntry &NameEntry : Section.DataSegmentNames) { in writeSectionContent()
302 WasmYAML::ProducersSection &Section) { in writeSectionContent() argument
303 writeStringRef(Section.Name, OS); in writeSectionContent()
304 int Fields = int(!Section.Languages.empty()) + int(!Section.Tools.empty()) + in writeSectionContent()
305 int(!Section.SDKs.empty()); in writeSectionContent()
309 for (auto &Field : {std::make_pair(StringRef("language"), &Section.Languages), in writeSectionContent()
310 std::make_pair(StringRef("processed-by"), &Section.Tools), in writeSectionContent()
311 std::make_pair(StringRef("sdk"), &Section.SDKs)}) { in writeSectionContent()
324 WasmYAML::TargetFeaturesSection &Section) { in writeSectionContent() argument
325 writeStringRef(Section.Name, OS); in writeSectionContent()
326 encodeULEB128(Section.Features.size(), OS); in writeSectionContent()
327 for (auto &E : Section.Features) { in writeSectionContent()
334 WasmYAML::CustomSection &Section) { in writeSectionContent() argument
335 if (auto S = dyn_cast<WasmYAML::DylinkSection>(&Section)) { in writeSectionContent()
337 } else if (auto S = dyn_cast<WasmYAML::NameSection>(&Section)) { in writeSectionContent()
339 } else if (auto S = dyn_cast<WasmYAML::LinkingSection>(&Section)) { in writeSectionContent()
341 } else if (auto S = dyn_cast<WasmYAML::ProducersSection>(&Section)) { in writeSectionContent()
343 } else if (auto S = dyn_cast<WasmYAML::TargetFeaturesSection>(&Section)) { in writeSectionContent()
346 writeStringRef(Section.Name, OS); in writeSectionContent()
347 Section.Payload.writeAsBinary(OS); in writeSectionContent()
352 WasmYAML::TypeSection &Section) { in writeSectionContent() argument
353 encodeULEB128(Section.Signatures.size(), OS); in writeSectionContent()
355 for (const WasmYAML::Signature &Sig : Section.Signatures) { in writeSectionContent()
372 WasmYAML::ImportSection &Section) { in writeSectionContent() argument
373 encodeULEB128(Section.Imports.size(), OS); in writeSectionContent()
374 for (const WasmYAML::Import &Import : Section.Imports) { in writeSectionContent()
409 WasmYAML::FunctionSection &Section) { in writeSectionContent() argument
410 encodeULEB128(Section.FunctionTypes.size(), OS); in writeSectionContent()
411 for (uint32_t FuncType : Section.FunctionTypes) in writeSectionContent()
416 WasmYAML::ExportSection &Section) { in writeSectionContent() argument
417 encodeULEB128(Section.Exports.size(), OS); in writeSectionContent()
418 for (const WasmYAML::Export &Export : Section.Exports) { in writeSectionContent()
426 WasmYAML::StartSection &Section) { in writeSectionContent() argument
427 encodeULEB128(Section.StartFunction, OS); in writeSectionContent()
431 WasmYAML::TableSection &Section) { in writeSectionContent() argument
432 encodeULEB128(Section.Tables.size(), OS); in writeSectionContent()
434 for (auto &Table : Section.Tables) { in writeSectionContent()
446 WasmYAML::MemorySection &Section) { in writeSectionContent() argument
447 encodeULEB128(Section.Memories.size(), OS); in writeSectionContent()
448 for (const WasmYAML::Limits &Mem : Section.Memories) in writeSectionContent()
453 WasmYAML::TagSection &Section) { in writeSectionContent() argument
454 encodeULEB128(Section.Tags.size(), OS); in writeSectionContent()
456 for (auto &Tag : Section.Tags) { in writeSectionContent()
468 WasmYAML::GlobalSection &Section) { in writeSectionContent() argument
469 encodeULEB128(Section.Globals.size(), OS); in writeSectionContent()
471 for (auto &Global : Section.Globals) { in writeSectionContent()
484 WasmYAML::ElemSection &Section) { in writeSectionContent() argument
485 encodeULEB128(Section.Segments.size(), OS); in writeSectionContent()
486 for (auto &Segment : Section.Segments) { in writeSectionContent()
512 WasmYAML::CodeSection &Section) { in writeSectionContent() argument
513 encodeULEB128(Section.Functions.size(), OS); in writeSectionContent()
515 for (auto &Func : Section.Functions) { in writeSectionContent()
540 WasmYAML::DataSection &Section) { in writeSectionContent() argument
541 encodeULEB128(Section.Segments.size(), OS); in writeSectionContent()
542 for (auto &Segment : Section.Segments) { in writeSectionContent()
554 WasmYAML::DataCountSection &Section) { in writeSectionContent() argument
555 encodeULEB128(Section.Count, OS); in writeSectionContent()
558 void WasmWriter::writeRelocSection(raw_ostream &OS, WasmYAML::Section &Sec, in writeRelocSection()
606 for (const std::unique_ptr<WasmYAML::Section> &Sec : Obj.Sections) { in writeWasm()
660 for (const std::unique_ptr<WasmYAML::Section> &Sec : Obj.Sections) { in writeWasm()