aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRafael Ávila de Espíndola <[email protected]>2011-02-22 17:37:11 -0500
committerRafael Ávila de Espíndola <[email protected]>2011-02-22 17:37:11 -0500
commitb389611ce772d65ed135d6e52fecb9ca2238e902 (patch)
tree2c67fb5c27e7c87e49d3d50794a02992f91f98ec /src
parentFix typo in rust_task::start. Should be copying 1 fewer initial arg. (diff)
downloadrust-b389611ce772d65ed135d6e52fecb9ca2238e902.tar.xz
rust-b389611ce772d65ed135d6e52fecb9ca2238e902.zip
Finish the type of native functions. We now get
declare i32 @write(i32, i8*, i32)
Diffstat (limited to 'src')
-rw-r--r--src/comp/middle/trans.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs
index 35fefc10..9da7e009 100644
--- a/src/comp/middle/trans.rs
+++ b/src/comp/middle/trans.rs
@@ -514,7 +514,7 @@ fn type_of_fn(@crate_ctxt cx,
fn type_of_native_fn(@crate_ctxt cx, vec[ty.arg] inputs,
@ty.t output) -> TypeRef {
let vec[TypeRef] atys = type_of_explicit_args(cx, inputs);
- ret T_fn(atys, llvm.LLVMVoidType());
+ ret T_fn(atys, type_of(cx, output));
}
fn type_of_inner(@crate_ctxt cx, @ty.t t) -> TypeRef {
@@ -4305,7 +4305,7 @@ fn decl_native_fn_and_pair(@crate_ctxt cx,
auto llpairty = node_type(cx, ann);
auto llfty = get_pair_fn_ty(llpairty);
- let ValueRef llfn = decl_fastcall_fn(cx.llmod, name, llfty);
+ let ValueRef llfn = decl_cdecl_fn(cx.llmod, name, llfty);
cx.item_ids.insert(id, llfn);
}