aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Utils/CloneModule.cpp
diff options
context:
space:
mode:
authorTom Stellard <thomas.stellard@amd.com>2014-10-01 17:14:57 +0000
committerTom Stellard <thomas.stellard@amd.com>2014-10-01 17:14:57 +0000
commit0a4e9a3b25ceac87bede40e6b4f7cae01468a507 (patch)
tree9e5f8297fce30a8c444fb83b6860b6d0e99ebc80 /llvm/lib/Transforms/Utils/CloneModule.cpp
parent5afc869f9677210c0a2c2ff8239e3a386cd7db26 (diff)
downloadllvm-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.cpp9
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)));
+}
+
+}