aboutsummaryrefslogtreecommitdiff
path: root/src/comp/lib
diff options
context:
space:
mode:
authorGraydon Hoare <[email protected]>2010-09-23 17:16:34 -0700
committerGraydon Hoare <[email protected]>2010-09-23 17:16:34 -0700
commit2db1f864e23e38d26b6dfb1e0a00829122a6aefd (patch)
treea202f8803da270d30401db8d39b0f01b6632df86 /src/comp/lib
parentResolve constant types through to their definitions. (diff)
downloadrust-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.rs15
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 {