diff options
| author | Graydon Hoare <[email protected]> | 2010-09-23 17:16:34 -0700 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-09-23 17:16:34 -0700 |
| commit | 2db1f864e23e38d26b6dfb1e0a00829122a6aefd (patch) | |
| tree | a202f8803da270d30401db8d39b0f01b6632df86 /src/comp/lib | |
| parent | Resolve constant types through to their definitions. (diff) | |
| download | rust-2db1f864e23e38d26b6dfb1e0a00829122a6aefd.tar.xz rust-2db1f864e23e38d26b6dfb1e0a00829122a6aefd.zip | |
Declare the global and upcall glues as ValueRefs in rustc's trans.
Diffstat (limited to 'src/comp/lib')
| -rw-r--r-- | src/comp/lib/llvm.rs | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/src/comp/lib/llvm.rs b/src/comp/lib/llvm.rs index f0c4428c..e5db62c7 100644 --- a/src/comp/lib/llvm.rs +++ b/src/comp/lib/llvm.rs @@ -25,8 +25,19 @@ type LongLong = i64; type Long = i32; type Bool = int; -fn True() -> Bool { ret 1; } -fn False() -> Bool { ret 0; } + +const Bool True = 1; +const Bool False = 0; + +// Consts for the LLVM CallConv type, pre-cast to uint. +// FIXME: figure out a way to merge these with the native +// typedef and/or a tag type in the native module below. + +const uint LLVMCCallConv = 0u; +const uint LLVMFastCallConv = 8u; +const uint LLVMColdCallConv = 9u; +const uint LLVMX86StdcallCallConv = 64u; +const uint LLVMX86FastcallCallConv = 65u; native mod llvm = llvm_lib { |