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.
| 33 | /// references, respectively) refer to the right globals. |
| 34 | /// |
| 35 | std::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 | |
| 42 | std::unique_ptr<Module> llvm::CloneModule(const Module &M, |
| 43 | ValueToValueMapTy &VMap) { |
nothing calls this directly
no test coverage detected