namespace {
const VersionTuple IFSVersionCurrent(1, 2);
-};
+}
static cl::opt<std::string> Action("action", cl::desc("<llvm-ifs action>"),
cl::value_desc("write-ifs | write-bin"),
case IFSSymbolType::Unknown:
return "Unknown";
}
+ llvm_unreachable("Unexpected ifs symbol type.");
}
struct IFSSymbol {
bool operator<(const IFSSymbol &RHS) const { return Name < RHS.Name; }
};
+namespace llvm {
+namespace yaml {
/// YAML traits for IFSSymbolType.
template <> struct ScalarEnumerationTraits<IFSSymbolType> {
static void enumeration(IO &IO, IFSSymbolType &SymbolType) {
IO.mapRequired(Sym.Name.c_str(), const_cast<IFSSymbol &>(Sym));
}
};
+} // End yaml namespace
+} // End llvm namespace
// A cumulative representation of ELF stubs.
// Both textual and binary stubs will read into and write from this object.
Symbols(std::move(Stub.Symbols)) {}
};
+namespace llvm {
+namespace yaml {
/// YAML traits for IFSStub objects.
template <> struct MappingTraits<IFSStub> {
static void mapping(IO &IO, IFSStub &Stub) {
IO.mapRequired("Symbols", Stub.Symbols);
}
};
+} // End yaml namespace
+} // End llvm namespace
static Expected<std::unique_ptr<IFSStub>> readInputFile(StringRef FilePath) {
// Read in file.