]> git.lizzy.rs Git - rust.git/commitdiff
Remove enum struct return workaround from LLVM bindings.
authorJed Davis <jld@panix.com>
Tue, 26 Nov 2013 18:54:20 +0000 (10:54 -0800)
committerJed Davis <jld@panix.com>
Wed, 27 Nov 2013 01:47:49 +0000 (17:47 -0800)
src/librustc/lib/llvm.rs

index 160bc5111688a1fe98695f690f9d6abec2ae2ad3..50f29a05af24fe661b74770ca2bb4698e1da2dec 100644 (file)
@@ -128,22 +128,62 @@ pub enum RealPredicate {
 
 // The LLVM TypeKind type - must stay in sync with the def of
 // LLVMTypeKind in llvm/include/llvm-c/Core.h
+#[cfg(not(stage0))]
+#[deriving(Eq)]
+#[repr(C)]
+pub enum TypeKind {
+    Void      = 0,
+    Half      = 1,
+    Float     = 2,
+    Double    = 3,
+    X86_FP80  = 4,
+    FP128     = 5,
+    PPC_FP128 = 6,
+    Label     = 7,
+    Integer   = 8,
+    Function  = 9,
+    Struct    = 10,
+    Array     = 11,
+    Pointer   = 12,
+    Vector    = 13,
+    Metadata  = 14,
+    X86_MMX   = 15,
+}
+
+// NOTE remove these after snapshot.  (See also #10308.)
+#[cfg(stage0)]
 pub type TypeKind = u32;
+#[cfg(stage0)]
 pub static Void: TypeKind      = 0;
+#[cfg(stage0)]
 pub static Half: TypeKind      = 1;
+#[cfg(stage0)]
 pub static Float: TypeKind     = 2;
+#[cfg(stage0)]
 pub static Double: TypeKind    = 3;
+#[cfg(stage0)]
 pub static X86_FP80: TypeKind  = 4;
+#[cfg(stage0)]
 pub static FP128: TypeKind     = 5;
+#[cfg(stage0)]
 pub static PPC_FP128: TypeKind = 6;
+#[cfg(stage0)]
 pub static Label: TypeKind     = 7;
+#[cfg(stage0)]
 pub static Integer: TypeKind   = 8;
+#[cfg(stage0)]
 pub static Function: TypeKind  = 9;
+#[cfg(stage0)]
 pub static Struct: TypeKind    = 10;
+#[cfg(stage0)]
 pub static Array: TypeKind     = 11;
+#[cfg(stage0)]
 pub static Pointer: TypeKind   = 12;
+#[cfg(stage0)]
 pub static Vector: TypeKind    = 13;
+#[cfg(stage0)]
 pub static Metadata: TypeKind  = 14;
+#[cfg(stage0)]
 pub static X86_MMX: TypeKind   = 15;
 
 #[repr(C)]