diff options
Diffstat (limited to 'src/comp/front')
| -rw-r--r-- | src/comp/front/ast.rs | 1 | ||||
| -rw-r--r-- | src/comp/front/creader.rs | 1 | ||||
| -rw-r--r-- | src/comp/front/parser.rs | 2 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/comp/front/ast.rs b/src/comp/front/ast.rs index b1dbd80e..c4c1a56b 100644 --- a/src/comp/front/ast.rs +++ b/src/comp/front/ast.rs @@ -346,6 +346,7 @@ type _mod = rec(vec[@view_item] view_items, tag native_abi { native_abi_rust; native_abi_cdecl; + native_abi_llvm; } type native_mod = rec(str native_name, diff --git a/src/comp/front/creader.rs b/src/comp/front/creader.rs index 6a864053..f1003cb6 100644 --- a/src/comp/front/creader.rs +++ b/src/comp/front/creader.rs @@ -162,6 +162,7 @@ impure fn parse_sty(@pstate st, str_def sd) -> ty.sty { alt (next(st) as char) { case ('r') {abi = ast.native_abi_rust;} case ('c') {abi = ast.native_abi_cdecl;} + case ('l') {abi = ast.native_abi_llvm;} } auto func = parse_ty_fn(st, sd); ret ty.ty_native_fn(abi,func._0,func._1); diff --git a/src/comp/front/parser.rs b/src/comp/front/parser.rs index c8130b0b..4a9f37f0 100644 --- a/src/comp/front/parser.rs +++ b/src/comp/front/parser.rs @@ -1964,6 +1964,8 @@ impure fn parse_item_native_mod(parser p) -> @ast.item { if (_str.eq(t, "cdecl")) { } else if (_str.eq(t, "rust")) { abi = ast.native_abi_rust; + } else if (_str.eq(t, "llvm")) { + abi = ast.native_abi_llvm; } else { p.err("unsupported abi: " + t); fail; |