Skip to content

Commit

Permalink
Remove enum struct return workaround from LLVM bindings.
Browse files Browse the repository at this point in the history
  • Loading branch information
jld committed Nov 27, 2013
1 parent e03f17e commit 57c1a01
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions src/librustc/lib/llvm.rs
Expand Up @@ -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)]
Expand Down

9 comments on commit 57c1a01

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jld@57c1a01

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jld/rust/unstruct-unhack-typekind = 57c1a01 into auto

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jld/rust/unstruct-unhack-typekind = 57c1a01 merged ok, testing candidate = dba17966

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

saw approval from alexcrichton
at jld@57c1a01

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

merging jld/rust/unstruct-unhack-typekind = 57c1a01 into auto

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jld/rust/unstruct-unhack-typekind = 57c1a01 merged ok, testing candidate = 23674be

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bors
Copy link
Contributor

@bors bors commented on 57c1a01 Nov 27, 2013

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fast-forwarding master to auto = 23674be

Please sign in to comment.