Skip to content

Remove enum struct return workaround from LLVM bindings. #10684

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 27, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/librustc/lib/llvm.rs
Original file line number Diff line number Diff line change
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