From 2db1f864e23e38d26b6dfb1e0a00829122a6aefd Mon Sep 17 00:00:00 2001 From: Graydon Hoare Date: Thu, 23 Sep 2010 17:16:34 -0700 Subject: Declare the global and upcall glues as ValueRefs in rustc's trans. --- src/comp/lib/llvm.rs | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/comp/lib') 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 { -- cgit v1.2.3