LLVM 20.0.0git
|
#include "llvm/Linker/IRMover.h"
Classes | |
class | IdentifiedStructTypeSet |
Public Types | |
typedef std::function< void(GlobalValue &)> | ValueAdder |
using | LazyCallback = llvm::unique_function< void(GlobalValue &GV, ValueAdder Add)> |
Public Member Functions | |
IRMover (Module &M) | |
Error | move (std::unique_ptr< Module > Src, ArrayRef< GlobalValue * > ValuesToLink, LazyCallback AddLazyFor, bool IsPerformingImport) |
Move in the provide values in ValuesToLink from Src . | |
Module & | getModule () |
using llvm::IRMover::LazyCallback = llvm::unique_function<void(GlobalValue &GV, ValueAdder Add)> |
typedef std::function<void(GlobalValue &)> llvm::IRMover::ValueAdder |
IRMover::IRMover | ( | Module & | M | ) |
Definition at line 1753 of file IRMover.cpp.
References llvm::IRMover::IdentifiedStructTypeSet::addNonOpaque(), llvm::IRMover::IdentifiedStructTypeSet::addOpaque(), llvm::TypeFinder::getVisitedMetadata(), and llvm::TypeFinder::run().
Error IRMover::move | ( | std::unique_ptr< Module > | Src, |
ArrayRef< GlobalValue * > | ValuesToLink, | ||
LazyCallback | AddLazyFor, | ||
bool | IsPerformingImport | ||
) |
Move in the provide values in ValuesToLink
from Src
.
AddLazyFor
is a call back that the IRMover will call when a global value is referenced by one of the ValuesToLink (transitively) but was not present in ValuesToLink. The GlobalValue and a ValueAdder callback are passed as an argument, and the callback is expected to be called if the GlobalValue needs to be added to the ValuesToLink
and linked. Pass nullptr if there's no work to be done in such cases.IsPerformingImport
is true when this IR link is to perform ThinLTO function importing from Src. Definition at line 1770 of file IRMover.cpp.
References llvm::Module::dropTriviallyDeadConstantArrays().
Referenced by llvm::FunctionImporter::importFunctions().