Lines Matching full:section

26 Section::~Section() = default;
46 static void commonSectionMapping(IO &IO, WasmYAML::Section &Section) {
47 IO.mapRequired("Type", Section.Type);
48 IO.mapOptional("Relocations", Section.Relocations);
49 IO.mapOptional("HeaderSecSizeEncodingLen", Section.HeaderSecSizeEncodingLen);
52 static void sectionMapping(IO &IO, WasmYAML::DylinkSection &Section) {
53 commonSectionMapping(IO, Section);
54 IO.mapRequired("Name", Section.Name);
55 IO.mapRequired("MemorySize", Section.MemorySize);
56 IO.mapRequired("MemoryAlignment", Section.MemoryAlignment);
57 IO.mapRequired("TableSize", Section.TableSize);
58 IO.mapRequired("TableAlignment", Section.TableAlignment);
59 IO.mapRequired("Needed", Section.Needed);
60 IO.mapOptional("ImportInfo", Section.ImportInfo);
61 IO.mapOptional("ExportInfo", Section.ExportInfo);
64 static void sectionMapping(IO &IO, WasmYAML::NameSection &Section) {
65 commonSectionMapping(IO, Section);
66 IO.mapRequired("Name", Section.Name);
67 IO.mapOptional("FunctionNames", Section.FunctionNames);
68 IO.mapOptional("GlobalNames", Section.GlobalNames);
69 IO.mapOptional("DataSegmentNames", Section.DataSegmentNames);
72 static void sectionMapping(IO &IO, WasmYAML::LinkingSection &Section) {
73 commonSectionMapping(IO, Section);
74 IO.mapRequired("Name", Section.Name);
75 IO.mapRequired("Version", Section.Version);
76 IO.mapOptional("SymbolTable", Section.SymbolTable);
77 IO.mapOptional("SegmentInfo", Section.SegmentInfos);
78 IO.mapOptional("InitFunctions", Section.InitFunctions);
79 IO.mapOptional("Comdats", Section.Comdats);
82 static void sectionMapping(IO &IO, WasmYAML::ProducersSection &Section) {
83 commonSectionMapping(IO, Section);
84 IO.mapRequired("Name", Section.Name);
85 IO.mapOptional("Languages", Section.Languages);
86 IO.mapOptional("Tools", Section.Tools);
87 IO.mapOptional("SDKs", Section.SDKs);
90 static void sectionMapping(IO &IO, WasmYAML::TargetFeaturesSection &Section) {
91 commonSectionMapping(IO, Section);
92 IO.mapRequired("Name", Section.Name);
93 IO.mapRequired("Features", Section.Features);
96 static void sectionMapping(IO &IO, WasmYAML::CustomSection &Section) {
97 commonSectionMapping(IO, Section);
98 IO.mapRequired("Name", Section.Name);
99 IO.mapRequired("Payload", Section.Payload);
102 static void sectionMapping(IO &IO, WasmYAML::TypeSection &Section) {
103 commonSectionMapping(IO, Section);
104 IO.mapOptional("Signatures", Section.Signatures);
107 static void sectionMapping(IO &IO, WasmYAML::ImportSection &Section) {
108 commonSectionMapping(IO, Section);
109 IO.mapOptional("Imports", Section.Imports);
112 static void sectionMapping(IO &IO, WasmYAML::FunctionSection &Section) {
113 commonSectionMapping(IO, Section);
114 IO.mapOptional("FunctionTypes", Section.FunctionTypes);
117 static void sectionMapping(IO &IO, WasmYAML::TableSection &Section) {
118 commonSectionMapping(IO, Section);
119 IO.mapOptional("Tables", Section.Tables);
122 static void sectionMapping(IO &IO, WasmYAML::MemorySection &Section) {
123 commonSectionMapping(IO, Section);
124 IO.mapOptional("Memories", Section.Memories);
127 static void sectionMapping(IO &IO, WasmYAML::TagSection &Section) {
128 commonSectionMapping(IO, Section);
129 IO.mapOptional("TagTypes", Section.TagTypes);
132 static void sectionMapping(IO &IO, WasmYAML::GlobalSection &Section) {
133 commonSectionMapping(IO, Section);
134 IO.mapOptional("Globals", Section.Globals);
137 static void sectionMapping(IO &IO, WasmYAML::ExportSection &Section) {
138 commonSectionMapping(IO, Section);
139 IO.mapOptional("Exports", Section.Exports);
142 static void sectionMapping(IO &IO, WasmYAML::StartSection &Section) {
143 commonSectionMapping(IO, Section);
144 IO.mapOptional("StartFunction", Section.StartFunction);
147 static void sectionMapping(IO &IO, WasmYAML::ElemSection &Section) {
148 commonSectionMapping(IO, Section);
149 IO.mapOptional("Segments", Section.Segments);
152 static void sectionMapping(IO &IO, WasmYAML::CodeSection &Section) {
153 commonSectionMapping(IO, Section);
154 IO.mapRequired("Functions", Section.Functions);
157 static void sectionMapping(IO &IO, WasmYAML::DataSection &Section) {
158 commonSectionMapping(IO, Section);
159 IO.mapRequired("Segments", Section.Segments);
162 static void sectionMapping(IO &IO, WasmYAML::DataCountSection &Section) {
163 commonSectionMapping(IO, Section);
164 IO.mapRequired("Count", Section.Count);
167 void MappingTraits<std::unique_ptr<WasmYAML::Section>>::mapping(
168 IO &IO, std::unique_ptr<WasmYAML::Section> &Section) {
171 SectionType = Section->Type;
179 auto CustomSection = cast<WasmYAML::CustomSection>(Section.get());
186 Section.reset(new WasmYAML::DylinkSection());
187 sectionMapping(IO, *cast<WasmYAML::DylinkSection>(Section.get()));
190 Section.reset(new WasmYAML::LinkingSection());
191 sectionMapping(IO, *cast<WasmYAML::LinkingSection>(Section.get()));
194 Section.reset(new WasmYAML::NameSection());
195 sectionMapping(IO, *cast<WasmYAML::NameSection>(Section.get()));
198 Section.reset(new WasmYAML::ProducersSection());
199 sectionMapping(IO, *cast<WasmYAML::ProducersSection>(Section.get()));
202 Section.reset(new WasmYAML::TargetFeaturesSection());
203 sectionMapping(IO, *cast<WasmYAML::TargetFeaturesSection>(Section.get()));
206 Section.reset(new WasmYAML::CustomSection(SectionName));
207 sectionMapping(IO, *cast<WasmYAML::CustomSection>(Section.get()));
213 Section.reset(new WasmYAML::TypeSection());
214 sectionMapping(IO, *cast<WasmYAML::TypeSection>(Section.get()));
218 Section.reset(new WasmYAML::ImportSection());
219 sectionMapping(IO, *cast<WasmYAML::ImportSection>(Section.get()));
223 Section.reset(new WasmYAML::FunctionSection());
224 sectionMapping(IO, *cast<WasmYAML::FunctionSection>(Section.get()));
228 Section.reset(new WasmYAML::TableSection());
229 sectionMapping(IO, *cast<WasmYAML::TableSection>(Section.get()));
233 Section.reset(new WasmYAML::MemorySection());
234 sectionMapping(IO, *cast<WasmYAML::MemorySection>(Section.get()));
238 Section.reset(new WasmYAML::TagSection());
239 sectionMapping(IO, *cast<WasmYAML::TagSection>(Section.get()));
243 Section.reset(new WasmYAML::GlobalSection());
244 sectionMapping(IO, *cast<WasmYAML::GlobalSection>(Section.get()));
248 Section.reset(new WasmYAML::ExportSection());
249 sectionMapping(IO, *cast<WasmYAML::ExportSection>(Section.get()));
253 Section.reset(new WasmYAML::StartSection());
254 sectionMapping(IO, *cast<WasmYAML::StartSection>(Section.get()));
258 Section.reset(new WasmYAML::ElemSection());
259 sectionMapping(IO, *cast<WasmYAML::ElemSection>(Section.get()));
263 Section.reset(new WasmYAML::CodeSection());
264 sectionMapping(IO, *cast<WasmYAML::CodeSection>(Section.get()));
268 Section.reset(new WasmYAML::DataSection());
269 sectionMapping(IO, *cast<WasmYAML::DataSection>(Section.get()));
273 Section.reset(new WasmYAML::DataCountSection());
274 sectionMapping(IO, *cast<WasmYAML::DataCountSection>(Section.get()));
277 llvm_unreachable("Unknown section type");
490 ECase(SECTION);
530 IO.mapRequired("Section", Info.ElementIndex);
592 ECase(SECTION);