Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Passes/PassPluginRegistry.cpp
- This file was added.
//===- lib/Passes/PassPluginRegistry.cpp - Pass Plugins registry ----------===// | |||||
// | |||||
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | |||||
// See https://llvm.org/LICENSE.txt for license information. | |||||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | |||||
// | |||||
//===----------------------------------------------------------------------===// | |||||
#include "llvm/Passes/PassPluginRegistry.h" | |||||
#include "llvm/Passes/PassPlugin.h" | |||||
#include "llvm/Support/ManagedStatic.h" | |||||
using namespace llvm; | |||||
static ManagedStatic<PassPluginRegistry> PassPluginRegistryObj; | |||||
const SmallVector<PassPlugin> &PassPluginRegistry::getPlugins() { | |||||
return PassPluginRegistryObj->Plugins; | |||||
} | |||||
void PassPluginRegistry::addPlugin(PassPlugin &&PP) { | |||||
PassPluginRegistryObj->Plugins.push_back(std::move(PP)); | |||||
} |