diff options
| author | Rafael Ávila de Espíndola <[email protected]> | 2011-03-04 15:29:33 -0500 |
|---|---|---|
| committer | Rafael Ávila de Espíndola <[email protected]> | 2011-03-04 15:29:33 -0500 |
| commit | 95c0cefd32bc1af5e91857511187760010aaffc7 (patch) | |
| tree | 6d4b68c0ea632825cccd348de0b8bcf1d411fcda /src | |
| parent | Remove unused argument. (diff) | |
| download | rust-95c0cefd32bc1af5e91857511187760010aaffc7.tar.xz rust-95c0cefd32bc1af5e91857511187760010aaffc7.zip | |
Build empty wrappers. This lets us compile hello world, but so far it
just returns 0.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 1 | ||||
| -rw-r--r-- | src/comp/middle/trans.rs | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/Makefile b/src/Makefile index 49cc0456..2ec0f9d1 100644 --- a/src/Makefile +++ b/src/Makefile @@ -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 \ diff --git a/src/comp/middle/trans.rs b/src/comp/middle/trans.rs index d2fa0acc..2f45691a 100644 --- a/src/comp/middle/trans.rs +++ b/src/comp/middle/trans.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; |