about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 26d0764934e..c0553b3c1d9 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -141,3 +141,9 @@ extern "C" void LLVMRustEnableSegmentedStacks() {
   EnableSegmentedStacks = true;
 }
 
+extern "C" LLVMValueRef LLVMGetOrInsertFunction(LLVMModuleRef M,
+                                                const char* Name,
+                                                LLVMTypeRef FunctionTy) {
+  return wrap(unwrap(M)->getOrInsertFunction(Name,
+                                             unwrap<FunctionType>(FunctionTy)));
+}