mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Merge pull request #2861 from seventh-chord/master
llvm: specify calling convention on call
This commit is contained in:
@@ -891,6 +891,9 @@ gb_internal lbValue lb_emit_call_internal(lbProcedure *p, lbValue value, lbValue
|
|||||||
|
|
||||||
LLVMValueRef ret = LLVMBuildCall2(p->builder, fnp, fn, args, arg_count, "");
|
LLVMValueRef ret = LLVMBuildCall2(p->builder, fnp, fn, args, arg_count, "");
|
||||||
|
|
||||||
|
auto llvm_cc = lb_calling_convention_map[proc_type->Proc.calling_convention];
|
||||||
|
LLVMSetInstructionCallConv(ret, llvm_cc);
|
||||||
|
|
||||||
LLVMAttributeIndex param_offset = LLVMAttributeIndex_FirstArgIndex;
|
LLVMAttributeIndex param_offset = LLVMAttributeIndex_FirstArgIndex;
|
||||||
if (return_ptr.value != nullptr) {
|
if (return_ptr.value != nullptr) {
|
||||||
param_offset += 1;
|
param_offset += 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user