File tree 3 files changed +1
-7
lines changed
3 files changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -123,7 +123,7 @@ pub(crate) fn generate_enzyme_call<'ll>(
123
123
// arguments. We do however need to declare them with their correct return type.
124
124
// We already figured the correct return type out in our frontend, when generating the outer_fn,
125
125
// so we can now just go ahead and use that. FIXME(ZuseZ4): This doesn't handle sret yet.
126
- let fn_ty = llvm:: LLVMRustGetFunctionType ( outer_fn) ;
126
+ let fn_ty = llvm:: LLVMGlobalGetValueType ( outer_fn) ;
127
127
let ret_ty = llvm:: LLVMGetReturnType ( fn_ty) ;
128
128
129
129
// LLVM can figure out the input types on it's own, so we take a shortcut here.
Original file line number Diff line number Diff line change @@ -11,7 +11,6 @@ extern "C" {
11
11
pub fn LLVMRustDIGetInstMetadata ( I : & Value ) -> & Metadata ;
12
12
pub fn LLVMRustEraseInstFromParent ( V : & Value ) ;
13
13
pub fn LLVMRustGetTerminator < ' a > ( B : & BasicBlock ) -> & ' a Value ;
14
- pub fn LLVMRustGetFunctionType ( fnc : & Value ) -> & Type ;
15
14
16
15
pub fn LLVMGetReturnType ( T : & Type ) -> & Type ;
17
16
pub fn LLVMDumpModule ( M : & Module ) ;
Original file line number Diff line number Diff line change @@ -399,11 +399,6 @@ extern "C" void LLVMRustEraseInstFromParent(LLVMValueRef Instr) {
399
399
}
400
400
}
401
401
402
- extern " C" LLVMTypeRef LLVMRustGetFunctionType (LLVMValueRef Fn) {
403
- auto Ftype = unwrap<Function>(Fn)->getFunctionType ();
404
- return wrap (Ftype);
405
- }
406
-
407
402
extern " C" LLVMAttributeRef
408
403
LLVMRustCreateAttrNoValue (LLVMContextRef C, LLVMRustAttributeKind RustAttr) {
409
404
return wrap (Attribute::get (*unwrap (C), fromRust (RustAttr)));
You can’t perform that action at this time.
0 commit comments