11#include "llvm/ADT/STLExtras.h"
23std::vector<AnalysisName> &AnalysisRegistry::getAnalysisNames() {
24 static std::vector<AnalysisName> Names;
28bool AnalysisRegistry::contains(
const AnalysisName &Name) {
29 return llvm::is_contained(getAnalysisNames(), Name);
32const std::vector<AnalysisName> &AnalysisRegistry::names() {
33 return getAnalysisNames();
38 for (
const auto &Entry : llvm::Registry<AnalysisBase>::entries()) {
39 if (Entry.getName() == Name.
str()) {
40 return std::unique_ptr<AnalysisBase>(Entry.instantiate());
44 "no analysis registered for '{0}'", Name)
Uniquely identifies a whole-program analysis and the AnalysisResult it produces.
llvm::StringRef str() const
Explicit conversion to the underlying string representation.
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.
volatile int AnalysisRegistryAnchorSource
The JSON file list parser is used to communicate input to InstallAPI.