ΒΆstd::unique_ptr<Module> CloneModule(
const llvm::Module& M,
llvm::ValueToValueMapTy& VMap,
function_ref<bool(const llvm::GlobalValue*)>
ShouldCloneDefinition)
std::unique_ptr<Module> CloneModule(
const llvm::Module& M,
llvm::ValueToValueMapTy& VMap,
function_ref<bool(const llvm::GlobalValue*)>
ShouldCloneDefinition)
Description
Return a copy of the specified module. The ShouldCloneDefinition function controls whether a specific GlobalValue's definition is cloned. If the function returns false, the module copy will contain an external reference in place of the global definition.
Declared at: llvm/include/llvm/Transforms/Utils/Cloning.h:60
Parameters
- const llvm::Module& M
- llvm::ValueToValueMapTy& VMap
- function_ref<bool(const llvm::GlobalValue*)> ShouldCloneDefinition