18 for (
const auto &Entry : SerializationFormatRegistry::entries())
19 if (Entry.getName() == FormatName)
24std::unique_ptr<SerializationFormat>
26 for (
const auto &Entry : SerializationFormatRegistry::entries())
27 if (Entry.getName() == FormatName)
28 return Entry.instantiate();
29 assert(
false &&
"Unknown SerializationFormat name");
34 OS <<
"OVERVIEW: Available SSAF serialization formats:\n\n";
35 for (
const auto &Entry : SerializationFormatRegistry::entries())
36 OS <<
" " << Entry.getName() <<
" - " << Entry.getDesc() <<
"\n";
std::unique_ptr< SerializationFormat > makeFormat(llvm::StringRef FormatName)
Try to instantiate a SerializationFormat with a given name.
llvm::Registry< SerializationFormat > SerializationFormatRegistry
void printAvailableFormats(llvm::raw_ostream &OS)
Print the list of available serialization formats.
bool isFormatRegistered(llvm::StringRef FormatName)
Check if a SerializationFormat was registered with a given name.
The JSON file list parser is used to communicate input to InstallAPI.
Diagnostic wrappers for TextAPI types for error reporting.