11#include "llvm/ADT/STLExtras.h"
22std::vector<AnalysisName> &AnalysisRegistry::getAnalysisNames() {
23 static std::vector<AnalysisName> Names;
28 return llvm::is_contained(getAnalysisNames(), Name);
32 return getAnalysisNames();
37 for (
const auto &Entry : RegistryT::entries()) {
38 if (Entry.getName() == Name.
str()) {
39 return std::unique_ptr<AnalysisBase>(Entry.instantiate());
43 "no analysis registered for '{0}'", Name)
volatile int SSAFAnalysisRegistryAnchorSource
llvm::Registry< SummaryDataBuilderBase > RegistryT
Uniquely identifies a whole-program analysis and the AnalysisResult it produces.
llvm::StringRef str() const
Explicit conversion to the underlying string representation.
static bool contains(const AnalysisName &Name)
Returns true if an analysis is registered under Name.
static const std::vector< AnalysisName > & names()
Returns the names of all registered analyses.
static llvm::Expected< std::unique_ptr< AnalysisBase > > instantiate(const AnalysisName &Name)
Instantiates the analysis registered under Name, or returns an error if no such analysis is registere...
static ErrorBuilder create(std::error_code EC, const char *Fmt, Args &&...ArgVals)
Create an ErrorBuilder with an error code and formatted message.
llvm::Error build() const
Build and return the final error.
The JSON file list parser is used to communicate input to InstallAPI.