14using RegistryT = llvm::Registry<SummaryDataBuilderBase>;
18const RegistryT::entry *findEntry(llvm::StringRef Name) {
19 for (
const auto &Entry : RegistryT::entries()) {
20 if (Entry.getName() == Name) {
29 return findEntry(Name) !=
nullptr;
32std::unique_ptr<SummaryDataBuilderBase>
34 const auto *Entry = findEntry(Name);
35 return Entry ? Entry->instantiate() :
nullptr;
llvm::Registry< SummaryDataBuilderBase > RegistryT
static bool contains(llvm::StringRef Name)
Returns true if a builder is registered under Name.
static std::unique_ptr< SummaryDataBuilderBase > instantiate(llvm::StringRef Name)
Instantiates the builder registered under Name, or returns nullptr if no such builder is registered.
The JSON file list parser is used to communicate input to InstallAPI.