Lines Matching +full:io +full:- +full:reset

1 //===- IFSHandler.cpp -----------------------------------------------------===//
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===-----------------------------------------------------------------------===/
33 static void enumeration(IO &IO, IFSSymbolType &SymbolType) {
34 IO.enumCase(SymbolType, "NoType", IFSSymbolType::NoType);
35 IO.enumCase(SymbolType, "Func", IFSSymbolType::Func);
36 IO.enumCase(SymbolType, "Object", IFSSymbolType::Object);
37 IO.enumCase(SymbolType, "TLS", IFSSymbolType::TLS);
38 IO.enumCase(SymbolType, "Unknown", IFSSymbolType::Unknown);
40 if (!IO.outputting() && IO.matchEnumFallback())
104 static void mapping(IO &IO, IFSTarget &Target) {
105 IO.mapOptional("ObjectFormat", Target.ObjectFormat);
106 IO.mapOptional("Arch", Target.ArchString);
107 IO.mapOptional("Endianness", Target.Endianness);
108 IO.mapOptional("BitWidth", Target.BitWidth);
112 static const bool flow = true; // NOLINT(readability-identifier-naming)
117 static void mapping(IO &IO, IFSSymbol &Symbol) {
118 IO.mapRequired("Name", Symbol.Name);
119 IO.mapRequired("Type", Symbol.Type);
125 IO.mapOptional("Size", Symbol.Size);
127 IO.mapOptional("Size", Symbol.Size);
129 IO.mapOptional("Undefined", Symbol.Undefined, false);
130 IO.mapOptional("Weak", Symbol.Weak, false);
131 IO.mapOptional("Warning", Symbol.Warning);
135 static const bool flow = true; // NOLINT(readability-identifier-naming)
140 static void mapping(IO &IO, IFSStub &Stub) {
141 if (!IO.mapTag("!ifs-v1", true))
142 IO.setError("Not a .tbe YAML file.");
143 IO.mapRequired("IfsVersion", Stub.IfsVersion);
144 IO.mapOptional("SoName", Stub.SoName);
145 IO.mapOptional("Target", Stub.Target);
146 IO.mapOptional("NeededLibs", Stub.NeededLibs);
147 IO.mapRequired("Symbols", Stub.Symbols);
153 static void mapping(IO &IO, IFSStubTriple &Stub) {
154 if (!IO.mapTag("!ifs-v1", true))
155 IO.setError("Not a .tbe YAML file.");
156 IO.mapRequired("IfsVersion", Stub.IfsVersion);
157 IO.mapOptional("SoName", Stub.SoName);
158 IO.mapOptional("Target", Stub.Target.Triple);
159 IO.mapOptional("NeededLibs", Stub.NeededLibs);
160 IO.mapRequired("Symbols", Stub.Symbols);
191 if (Stub->IfsVersion > IFSVersionCurrent)
193 "IFS version " + Stub->IfsVersion.getAsString() + " is unsupported.",
195 if (Stub->Target.ArchString) {
197 ELF::convertArchNameToEMachine(*Stub->Target.ArchString);
201 "IFS arch '" + *Stub->Target.ArchString + "' is unsupported");
202 Stub->Target.Arch = eMachine;
204 for (const auto &Item : Stub->Symbols) {
217 CopyStub->Target.ArchString =
222 if (CopyStub->Target.Triple ||
223 (!CopyStub->Target.ArchString && !CopyStub->Target.Endianness &&
224 !CopyStub->Target.BitWidth))
331 Stub.Target.Arch.reset();
332 Stub.Target.ArchString.reset();
335 Stub.Target.Endianness.reset();
338 Stub.Target.BitWidth.reset();
341 Stub.Target.Triple.reset();
344 Stub.Target.ObjectFormat.reset();