MCPcopy Create free account
hub / github.com/GANGE666/xVMP / CloneModule

Method CloneModule

src/lib/Transforms/Utils/CloneModule.cpp:35–40  ·  view source on GitHub ↗

This is not as easy as it might seem because we have to worry about making copies of global variables and functions, and making their (initializers and references, respectively) refer to the right globals.

Source from the content-addressed store, hash-verified

33/// references, respectively) refer to the right globals.
34///
35std::unique_ptr<Module> llvm::CloneModule(const Module &M) {
36 // Create the value map that maps things from the old module over to the new
37 // module.
38 ValueToValueMapTy VMap;
39 return CloneModule(M, VMap);
40}
41
42std::unique_ptr<Module> llvm::CloneModule(const Module &M,
43 ValueToValueMapTy &VMap) {

Callers

nothing calls this directly

Calls 15

CloneModuleClass · 0.85
MapValueFunction · 0.85
MapMetadataFunction · 0.85
copyComdatFunction · 0.85
getModuleIdentifierMethod · 0.80
setSourceFileNameMethod · 0.80
setModuleInlineAsmMethod · 0.80
getThreadLocalModeMethod · 0.80
isFunctionTyMethod · 0.80
isDeclarationMethod · 0.80
setPersonalityFnMethod · 0.80
getPersonalityFnMethod · 0.80

Tested by

no test coverage detected