clang
22.0.0git
lib
CodeGen
LinkInModulesPass.h
Go to the documentation of this file.
1
//===-- LinkInModulesPass.h - Module Linking pass ----------------- 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
/// \file
9
///
10
/// This file provides a pass to link in Modules from a provided
11
/// BackendConsumer.
12
///
13
//===----------------------------------------------------------------------===//
14
15
#ifndef LLVM_BITCODE_LINKINMODULESPASS_H
16
#define LLVM_BITCODE_LINKINMODULESPASS_H
17
18
#include "
BackendConsumer.h
"
19
#include "llvm/IR/PassManager.h"
20
21
namespace
llvm
{
22
class
Module
;
23
class
ModulePass;
24
class
Pass;
25
26
/// Create and return a pass that links in Moduels from a provided
27
/// BackendConsumer to a given primary Module. Note that this pass is designed
28
/// for use with the legacy pass manager.
29
class
LinkInModulesPass
:
public
PassInfoMixin
<LinkInModulesPass> {
30
clang::BackendConsumer
*BC;
31
32
public
:
33
LinkInModulesPass
(
clang::BackendConsumer
*BC);
34
35
PreservedAnalyses
run
(Module &M, AnalysisManager<Module> &);
36
static
bool
isRequired
() {
return
true
; }
37
};
38
39
}
// namespace llvm
40
41
#endif
BackendConsumer.h
PassInfoMixin
clang::BackendConsumer
Definition
BackendConsumer.h:27
llvm::LinkInModulesPass::run
PreservedAnalyses run(Module &M, AnalysisManager< Module > &)
Definition
LinkInModulesPass.cpp:21
llvm::LinkInModulesPass::isRequired
static bool isRequired()
Definition
LinkInModulesPass.h:36
llvm::LinkInModulesPass::LinkInModulesPass
LinkInModulesPass(clang::BackendConsumer *BC)
Definition
LinkInModulesPass.cpp:19
clang::Linkage::Module
@ Module
Module linkage, which indicates that the entity can be referred to from other translation units withi...
Definition
Linkage.h:54
llvm
Diagnostic wrappers for TextAPI types for error reporting.
Definition
Dominators.h:30
Generated on
for clang by
1.14.0