Build empty wrappers. This lets us compile hello world, but so far it

just returns 0.
上级 2ff67ed9
......@@ -484,7 +484,6 @@ TEST_XFAILS_RUSTC := $(CONST_TAG_XFAILS) \
mlist-cycle.rs \
mlist.rs \
mutable-alias-vec.rs \
native2.rs \
native-opaque-type.rs \
obj-as.rs \
obj-dtor.rs \
......
......@@ -4829,6 +4829,11 @@ fn decl_native_fn_and_pair(@crate_ctxt cx,
let str s = cx.names.next("_rust_wrapper") + sep() + name;
let ValueRef wrapper_fn = decl_fastcall_fn(cx.llmod, s, wrapper_type);
// Build the wrapper.
auto fcx = new_fn_ctxt(cx, wrapper_fn);
auto bcx = new_top_block_ctxt(fcx);
bcx.build.RetVoid();
// Declare the global constant pair that points to it.
auto wrapper_pair_type = T_fn_pair(cx.tn, wrapper_type);
let str ps = cx.names.next("_rust_wrapper_pair") + sep() + name;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册