clang 23.0.0git
ParsedAttrInfo.cpp
Go to the documentation of this file.
1//===- ParsedAttrInfo.cpp - Registry for attribute plugins ------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the Registry of attributes added by plugins which
10// derive the ParsedAttrInfo class.
11//
12//===----------------------------------------------------------------------===//
13
16#include "llvm/Support/ManagedStatic.h"
17#include <list>
18#include <memory>
19
20using namespace clang;
21
23
24static std::list<std::unique_ptr<ParsedAttrInfo>> instantiateEntries() {
25 std::list<std::unique_ptr<ParsedAttrInfo>> Instances;
26 for (const auto &It : ParsedAttrInfoRegistry::entries())
27 Instances.emplace_back(It.instantiate());
28 return Instances;
29}
30
31const std::list<std::unique_ptr<ParsedAttrInfo>> &
33 static std::list<std::unique_ptr<ParsedAttrInfo>> Instances =
35 return Instances;
36}
LLVM_INSTANTIATE_REGISTRY_EX(CLANG_ABI_EXPORT, clang::tooling::ToolExecutorPluginRegistry) namespace clang
Definition Execution.cpp:14
static std::list< std::unique_ptr< ParsedAttrInfo > > instantiateEntries()
The JSON file list parser is used to communicate input to InstallAPI.
const std::list< std::unique_ptr< ParsedAttrInfo > > & getAttributePluginInstances()
llvm::Registry< ParsedAttrInfo > ParsedAttrInfoRegistry