CloneModule overloads
Declared in <llvm/Transforms/Utils/Cloning.h>
Return an exact copy of the specified module.
std::unique_ptr<Module>
CloneModule(Module const& M);
» more...
Return a copy of the specified module, recording mappings in VMap.
std::unique_ptr<Module>
CloneModule(
Module const& M,
ValueToValueMapTy& VMap);
» more...
Return a copy of the specified module with selective definition cloning.
std::unique_ptr<Module>
CloneModule(
Module const& M,
ValueToValueMapTy& VMap,
function_ref<bool(GlobalValue const*)> ShouldCloneDefinition);
» more...
M.M.ShouldCloneDefinition.| 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. |