File tree Expand file tree Collapse file tree 3 files changed +1
-7
lines changed Expand file tree Collapse file tree 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>(
123123 // arguments. We do however need to declare them with their correct return type.
124124 // We already figured the correct return type out in our frontend, when generating the outer_fn,
125125 // 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) ;
127127 let ret_ty = llvm:: LLVMGetReturnType ( fn_ty) ;
128128
129129 // 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" {
1111 pub fn LLVMRustDIGetInstMetadata ( I : & Value ) -> & Metadata ;
1212 pub fn LLVMRustEraseInstFromParent ( V : & Value ) ;
1313 pub fn LLVMRustGetTerminator < ' a > ( B : & BasicBlock ) -> & ' a Value ;
14- pub fn LLVMRustGetFunctionType ( fnc : & Value ) -> & Type ;
1514
1615 pub fn LLVMGetReturnType ( T : & Type ) -> & Type ;
1716 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) {
399399 }
400400}
401401
402- extern " C" LLVMTypeRef LLVMRustGetFunctionType (LLVMValueRef Fn) {
403- auto Ftype = unwrap<Function>(Fn)->getFunctionType ();
404- return wrap (Ftype);
405- }
406-
407402extern " C" LLVMAttributeRef
408403LLVMRustCreateAttrNoValue (LLVMContextRef C, LLVMRustAttributeKind RustAttr) {
409404 return wrap (Attribute::get (*unwrap (C), fromRust (RustAttr)));
You can’t perform that action at this time.
0 commit comments