LLVM 20.0.0git
Classes | Public Types | Public Member Functions | List of all members
llvm::IRMover Class Reference

#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.
 
ModulegetModule ()
 

Detailed Description

Definition at line 26 of file IRMover.h.

Member Typedef Documentation

◆ LazyCallback

Definition at line 66 of file IRMover.h.

◆ ValueAdder

typedef std::function<void(GlobalValue &)> llvm::IRMover::ValueAdder

Definition at line 65 of file IRMover.h.

Constructor & Destructor Documentation

◆ IRMover()

IRMover::IRMover ( Module M)

Member Function Documentation

◆ getModule()

Module & llvm::IRMover::getModule ( )
inline

Definition at line 81 of file IRMover.h.

◆ move()

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().


The documentation for this class was generated from the following files: