Skip to content

Commit

Permalink
Fixed codegen for x86
Browse files Browse the repository at this point in the history
  • Loading branch information
asterite committed Jun 8, 2017
1 parent 293d06f commit 54415ff
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/compiler/crystal/codegen/fun.cr
Expand Up @@ -347,7 +347,9 @@ class Crystal::CodeGenVisitor
end

def abi_info(external : Def, node : Call)
llvm_args_types = node.args.map { |arg| llvm_c_type(arg.type) }
llvm_args_types = node.args.map_with_index do |arg, i|
llvm_c_type((external.args[i]? || arg).type)
end
llvm_return_type = llvm_c_return_type(external.type)
@abi.abi_info(llvm_args_types, llvm_return_type, !llvm_return_type.void?, llvm_context)
end
Expand Down

0 comments on commit 54415ff

Please sign in to comment.