CloneModule overloads
Synopses
Declared in <llvm/Transforms/Utils/Cloning.h>
Return an exact copy of the specified module.
std::unique_ptr<Module>
CloneModule(Module const& M);
Return a copy of the specified module, recording mappings in VMap.
std::unique_ptr<Module>
CloneModule(
Module const& M,
ValueToValueMapTy& VMap);
Return a copy of the specified module with selective definition cloning.
std::unique_ptr<Module>
CloneModule(
Module const& M,
ValueToValueMapTy& VMap,
function_ref<bool(xref:llvm/GlobalValue.adoc[GlobalValue const*)>] ShouldCloneDefinition);
Return Value
-
A new module that is an exact copy of
M. -
A new module that is a copy of
M. -
A new module whose definitions are filtered by
ShouldCloneDefinition.
Parameters
Name |
Description |
M |
Module to clone. |
VMap |
Mapping from original values to their clones; filled by this call. |
ShouldCloneDefinition |
Predicate that returns true when a global's definition should be cloned rather than left as an external declaration. |
Created with MrDocs