rustllvm: Add a GetOrInsertFunction wrapper
Fixes issue #1161 Test-case-by: Brian Anderson <banderson@mozilla.com> Signed-off-by: Haitao Li <lihaitao@gmail.com>
This commit is contained in:
@@ -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)));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user