Pass the abi of native functions all the way to codegen.

This commit is contained in:
Rafael Ávila de Espíndola 2011-02-25 15:58:08 -05:00
parent f8f6f078c5
commit 081c3aa76d
4 changed files with 51 additions and 32 deletions

View file

@ -1818,8 +1818,8 @@ impure fn parse_item_native_mod(parser p) -> @ast.item {
auto abi = ast.native_abi_cdecl;
if (p.peek() != token.MOD) {
auto t = parse_str_lit(p);
if (t == "cdecl") {
} else if (t == "rust") {
if (_str.eq(t, "cdecl")) {
} else if (_str.eq(t, "rust")) {
abi = ast.native_abi_rust;
} else {
p.err("unsupported abi: " + t);