Debian Codegraph @

llvm/unittests/CodeGen/CGPluginTest/Plugin/Plugin.cpp

raw
1 //===----------------------------------------------------------------------===//
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 #include "CodeGenTestPass.h"
10
11 #include <llvm/CodeGen/Passes.h>
12 #include <llvm/CodeGen/TargetPassConfig.h>
13 #include <llvm/Target/RegisterTargetPassConfigCallback.h>
14
15 using namespace llvm;
16
17 namespace {
18 [[maybe_unused]] RegisterTargetPassConfigCallback X{
19 [](auto &TM, auto &PM, auto *TPC) {
20 TPC->insertPass(&GCLoweringID, &CodeGenTest::ID);
21 }};
22 } // namespace
23
24 __attribute__((constructor)) static void initCodeGenPlugin() {
25 initializeCodeGenTestPass(*PassRegistry::getPassRegistry());
26 }