diff options
author | Tom Stellard <thomas.stellard@amd.com> | 2014-10-01 17:14:57 +0000 |
---|---|---|
committer | Tom Stellard <thomas.stellard@amd.com> | 2014-10-01 17:14:57 +0000 |
commit | 0a4e9a3b25ceac87bede40e6b4f7cae01468a507 (patch) | |
tree | 9e5f8297fce30a8c444fb83b6860b6d0e99ebc80 /llvm/lib/Transforms/Utils/CloneModule.cpp | |
parent | 5afc869f9677210c0a2c2ff8239e3a386cd7db26 (diff) | |
download | llvm-0a4e9a3b25ceac87bede40e6b4f7cae01468a507.zip llvm-0a4e9a3b25ceac87bede40e6b4f7cae01468a507.tar.gz llvm-0a4e9a3b25ceac87bede40e6b4f7cae01468a507.tar.bz2 |
C API: Add LLVMCloneModule()
llvm-svn: 218775
Diffstat (limited to 'llvm/lib/Transforms/Utils/CloneModule.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/CloneModule.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/CloneModule.cpp b/llvm/lib/Transforms/Utils/CloneModule.cpp index 3f75b3e..d078c96 100644 --- a/llvm/lib/Transforms/Utils/CloneModule.cpp +++ b/llvm/lib/Transforms/Utils/CloneModule.cpp @@ -17,6 +17,7 @@ #include "llvm/IR/DerivedTypes.h" #include "llvm/IR/Module.h" #include "llvm/Transforms/Utils/ValueMapper.h" +#include "llvm-c/Core.h" using namespace llvm; /// CloneModule - Return an exact copy of the specified module. This is not as @@ -122,3 +123,11 @@ Module *llvm::CloneModule(const Module *M, ValueToValueMapTy &VMap) { return New; } + +extern "C" { + +LLVMModuleRef LLVMCloneModule(LLVMModuleRef M) { + return wrap(CloneModule(unwrap(M))); +} + +} |