From 313052aeb25b3de4501a062c963916e3455efbf1 Mon Sep 17 00:00:00 2001 From: Daniel Micay Date: Tue, 8 Oct 2013 09:03:43 -0400 Subject: [PATCH] rm useless fast_ffi attributes this is no longer used by the compiler --- src/librustc/lib/llvm.rs | 457 -------------------------- src/libstd/libc.rs | 14 - src/libstd/rt/local_heap.rs | 7 - src/libstd/rt/thread_local_storage.rs | 3 - src/test/bench/shootout-pidigits.rs | 9 - 5 files changed, 490 deletions(-) diff --git a/src/librustc/lib/llvm.rs b/src/librustc/lib/llvm.rs index 1c56f699c13..e0a5573d00b 100644 --- a/src/librustc/lib/llvm.rs +++ b/src/librustc/lib/llvm.rs @@ -302,533 +302,364 @@ pub mod llvm { #[abi = "cdecl"] extern { /* Create and destroy contexts. */ - #[fast_ffi] pub fn LLVMContextCreate() -> ContextRef; - #[fast_ffi] pub fn LLVMContextDispose(C: ContextRef); - #[fast_ffi] pub fn LLVMGetMDKindIDInContext(C: ContextRef, Name: *c_char, SLen: c_uint) -> c_uint; /* Create and destroy modules. */ - #[fast_ffi] pub fn LLVMModuleCreateWithNameInContext(ModuleID: *c_char, C: ContextRef) -> ModuleRef; - #[fast_ffi] pub fn LLVMGetModuleContext(M: ModuleRef) -> ContextRef; - #[fast_ffi] pub fn LLVMDisposeModule(M: ModuleRef); /** Data layout. See Module::getDataLayout. */ - #[fast_ffi] pub fn LLVMGetDataLayout(M: ModuleRef) -> *c_char; - #[fast_ffi] pub fn LLVMSetDataLayout(M: ModuleRef, Triple: *c_char); /** Target triple. See Module::getTargetTriple. */ - #[fast_ffi] pub fn LLVMGetTarget(M: ModuleRef) -> *c_char; - #[fast_ffi] pub fn LLVMSetTarget(M: ModuleRef, Triple: *c_char); /** See Module::dump. */ - #[fast_ffi] pub fn LLVMDumpModule(M: ModuleRef); /** See Module::setModuleInlineAsm. */ - #[fast_ffi] pub fn LLVMSetModuleInlineAsm(M: ModuleRef, Asm: *c_char); /** See llvm::LLVMTypeKind::getTypeID. */ pub fn LLVMGetTypeKind(Ty: TypeRef) -> TypeKind; /** See llvm::LLVMType::getContext. */ - #[fast_ffi] pub fn LLVMGetTypeContext(Ty: TypeRef) -> ContextRef; /* Operations on integer types */ - #[fast_ffi] pub fn LLVMInt1TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMInt8TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMInt16TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMInt32TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMInt64TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMIntTypeInContext(C: ContextRef, NumBits: c_uint) -> TypeRef; - #[fast_ffi] pub fn LLVMGetIntTypeWidth(IntegerTy: TypeRef) -> c_uint; /* Operations on real types */ - #[fast_ffi] pub fn LLVMFloatTypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMDoubleTypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMX86FP80TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMFP128TypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMPPCFP128TypeInContext(C: ContextRef) -> TypeRef; /* Operations on function types */ - #[fast_ffi] pub fn LLVMFunctionType(ReturnType: TypeRef, ParamTypes: *TypeRef, ParamCount: c_uint, IsVarArg: Bool) -> TypeRef; - #[fast_ffi] pub fn LLVMIsFunctionVarArg(FunctionTy: TypeRef) -> Bool; - #[fast_ffi] pub fn LLVMGetReturnType(FunctionTy: TypeRef) -> TypeRef; - #[fast_ffi] pub fn LLVMCountParamTypes(FunctionTy: TypeRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetParamTypes(FunctionTy: TypeRef, Dest: *TypeRef); /* Operations on struct types */ - #[fast_ffi] pub fn LLVMStructTypeInContext(C: ContextRef, ElementTypes: *TypeRef, ElementCount: c_uint, Packed: Bool) -> TypeRef; - #[fast_ffi] pub fn LLVMCountStructElementTypes(StructTy: TypeRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetStructElementTypes(StructTy: TypeRef, Dest: *mut TypeRef); - #[fast_ffi] pub fn LLVMIsPackedStruct(StructTy: TypeRef) -> Bool; /* Operations on array, pointer, and vector types (sequence types) */ - #[fast_ffi] pub fn LLVMArrayType(ElementType: TypeRef, ElementCount: c_uint) -> TypeRef; - #[fast_ffi] pub fn LLVMPointerType(ElementType: TypeRef, AddressSpace: c_uint) -> TypeRef; - #[fast_ffi] pub fn LLVMVectorType(ElementType: TypeRef, ElementCount: c_uint) -> TypeRef; - #[fast_ffi] pub fn LLVMGetElementType(Ty: TypeRef) -> TypeRef; - #[fast_ffi] pub fn LLVMGetArrayLength(ArrayTy: TypeRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetPointerAddressSpace(PointerTy: TypeRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetPointerToGlobal(EE: ExecutionEngineRef, V: ValueRef) -> *(); - #[fast_ffi] pub fn LLVMGetVectorSize(VectorTy: TypeRef) -> c_uint; /* Operations on other types */ - #[fast_ffi] pub fn LLVMVoidTypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMLabelTypeInContext(C: ContextRef) -> TypeRef; - #[fast_ffi] pub fn LLVMMetadataTypeInContext(C: ContextRef) -> TypeRef; /* Operations on all values */ - #[fast_ffi] pub fn LLVMTypeOf(Val: ValueRef) -> TypeRef; - #[fast_ffi] pub fn LLVMGetValueName(Val: ValueRef) -> *c_char; - #[fast_ffi] pub fn LLVMSetValueName(Val: ValueRef, Name: *c_char); - #[fast_ffi] pub fn LLVMDumpValue(Val: ValueRef); - #[fast_ffi] pub fn LLVMReplaceAllUsesWith(OldVal: ValueRef, NewVal: ValueRef); - #[fast_ffi] pub fn LLVMHasMetadata(Val: ValueRef) -> c_int; - #[fast_ffi] pub fn LLVMGetMetadata(Val: ValueRef, KindID: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMSetMetadata(Val: ValueRef, KindID: c_uint, Node: ValueRef); /* Operations on Uses */ - #[fast_ffi] pub fn LLVMGetFirstUse(Val: ValueRef) -> UseRef; - #[fast_ffi] pub fn LLVMGetNextUse(U: UseRef) -> UseRef; - #[fast_ffi] pub fn LLVMGetUser(U: UseRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetUsedValue(U: UseRef) -> ValueRef; /* Operations on Users */ - #[fast_ffi] pub fn LLVMGetNumOperands(Val: ValueRef) -> c_int; - #[fast_ffi] pub fn LLVMGetOperand(Val: ValueRef, Index: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMSetOperand(Val: ValueRef, Index: c_uint, Op: ValueRef); /* Operations on constants of any type */ - #[fast_ffi] pub fn LLVMConstNull(Ty: TypeRef) -> ValueRef; /* all zeroes */ - #[fast_ffi] pub fn LLVMConstAllOnes(Ty: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstICmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFCmp(Pred: c_ushort, V1: ValueRef, V2: ValueRef) -> ValueRef; /* only for int/vector */ - #[fast_ffi] pub fn LLVMGetUndef(Ty: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMIsConstant(Val: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMIsNull(Val: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMIsUndef(Val: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMConstPointerNull(Ty: TypeRef) -> ValueRef; /* Operations on metadata */ - #[fast_ffi] pub fn LLVMMDStringInContext(C: ContextRef, Str: *c_char, SLen: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMMDNodeInContext(C: ContextRef, Vals: *ValueRef, Count: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMAddNamedMetadataOperand(M: ModuleRef, Str: *c_char, Val: ValueRef); /* Operations on scalar constants */ - #[fast_ffi] pub fn LLVMConstInt(IntTy: TypeRef, N: c_ulonglong, SignExtend: Bool) -> ValueRef; - #[fast_ffi] pub fn LLVMConstIntOfString(IntTy: TypeRef, Text: *c_char, Radix: u8) -> ValueRef; - #[fast_ffi] pub fn LLVMConstIntOfStringAndSize(IntTy: TypeRef, Text: *c_char, SLen: c_uint, Radix: u8) -> ValueRef; - #[fast_ffi] pub fn LLVMConstReal(RealTy: TypeRef, N: f64) -> ValueRef; - #[fast_ffi] pub fn LLVMConstRealOfString(RealTy: TypeRef, Text: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMConstRealOfStringAndSize(RealTy: TypeRef, Text: *c_char, SLen: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstIntGetZExtValue(ConstantVal: ValueRef) -> c_ulonglong; - #[fast_ffi] pub fn LLVMConstIntGetSExtValue(ConstantVal: ValueRef) -> c_longlong; /* Operations on composite constants */ - #[fast_ffi] pub fn LLVMConstStringInContext(C: ContextRef, Str: *c_char, Length: c_uint, DontNullTerminate: Bool) -> ValueRef; - #[fast_ffi] pub fn LLVMConstStructInContext(C: ContextRef, ConstantVals: *ValueRef, Count: c_uint, Packed: Bool) -> ValueRef; - #[fast_ffi] pub fn LLVMConstArray(ElementTy: TypeRef, ConstantVals: *ValueRef, Length: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstVector(ScalarConstantVals: *ValueRef, Size: c_uint) -> ValueRef; /* Constant expressions */ - #[fast_ffi] pub fn LLVMAlignOf(Ty: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMSizeOf(Ty: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNeg(ConstantVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNSWNeg(ConstantVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNUWNeg(ConstantVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFNeg(ConstantVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNot(ConstantVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstAdd(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNSWAdd(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNUWAdd(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFAdd(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSub(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNSWSub(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNUWSub(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFSub(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstMul(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNSWMul(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstNUWMul(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFMul(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstUDiv(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSDiv(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstExactSDiv(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFDiv(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstURem(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSRem(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFRem(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstAnd(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstOr(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstXor(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstShl(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstLShr(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstAShr(LHSConstant: ValueRef, RHSConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstGEP(ConstantVal: ValueRef, ConstantIndices: *ValueRef, NumIndices: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstInBoundsGEP(ConstantVal: ValueRef, ConstantIndices: *ValueRef, NumIndices: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstTrunc(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSExt(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstZExt(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFPTrunc(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFPExt(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstUIToFP(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSIToFP(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFPToUI(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFPToSI(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstPtrToInt(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstIntToPtr(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstBitCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstZExtOrBitCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSExtOrBitCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstTruncOrBitCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstPointerCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstIntCast(ConstantVal: ValueRef, ToType: TypeRef, isSigned: Bool) -> ValueRef; - #[fast_ffi] pub fn LLVMConstFPCast(ConstantVal: ValueRef, ToType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstSelect(ConstantCondition: ValueRef, ConstantIfTrue: ValueRef, ConstantIfFalse: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstExtractElement(VectorConstant: ValueRef, IndexConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstInsertElement(VectorConstant: ValueRef, ElementValueConstant: ValueRef, IndexConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstShuffleVector(VectorAConstant: ValueRef, VectorBConstant: ValueRef, MaskConstant: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMConstExtractValue(AggConstant: ValueRef, IdxList: *c_uint, NumIdx: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstInsertValue(AggConstant: ValueRef, ElementValueConstant: ValueRef, IdxList: *c_uint, NumIdx: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMConstInlineAsm(Ty: TypeRef, AsmString: *c_char, Constraints: *c_char, HasSideEffects: Bool, IsAlignStack: Bool) -> ValueRef; - #[fast_ffi] pub fn LLVMBlockAddress(F: ValueRef, BB: BasicBlockRef) -> ValueRef; /* Operations on global variables, functions, and aliases (globals) */ - #[fast_ffi] pub fn LLVMGetGlobalParent(Global: ValueRef) -> ModuleRef; - #[fast_ffi] pub fn LLVMIsDeclaration(Global: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMGetLinkage(Global: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMSetLinkage(Global: ValueRef, Link: c_uint); - #[fast_ffi] pub fn LLVMGetSection(Global: ValueRef) -> *c_char; - #[fast_ffi] pub fn LLVMSetSection(Global: ValueRef, Section: *c_char); - #[fast_ffi] pub fn LLVMGetVisibility(Global: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMSetVisibility(Global: ValueRef, Viz: c_uint); - #[fast_ffi] pub fn LLVMGetAlignment(Global: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMSetAlignment(Global: ValueRef, Bytes: c_uint); /* Operations on global variables */ - #[fast_ffi] pub fn LLVMAddGlobal(M: ModuleRef, Ty: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMAddGlobalInAddressSpace(M: ModuleRef, Ty: TypeRef, Name: *c_char, AddressSpace: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNamedGlobal(M: ModuleRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMGetFirstGlobal(M: ModuleRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetLastGlobal(M: ModuleRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNextGlobal(GlobalVar: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetPreviousGlobal(GlobalVar: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDeleteGlobal(GlobalVar: ValueRef); - #[fast_ffi] pub fn LLVMGetInitializer(GlobalVar: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMSetInitializer(GlobalVar: ValueRef, ConstantVal: ValueRef); - #[fast_ffi] pub fn LLVMIsThreadLocal(GlobalVar: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMSetThreadLocal(GlobalVar: ValueRef, IsThreadLocal: Bool); - #[fast_ffi] pub fn LLVMIsGlobalConstant(GlobalVar: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMSetGlobalConstant(GlobalVar: ValueRef, IsConstant: Bool); /* Operations on aliases */ - #[fast_ffi] pub fn LLVMAddAlias(M: ModuleRef, Ty: TypeRef, Aliasee: ValueRef, @@ -836,245 +667,160 @@ pub fn LLVMAddAlias(M: ModuleRef, -> ValueRef; /* Operations on functions */ - #[fast_ffi] pub fn LLVMAddFunction(M: ModuleRef, Name: *c_char, FunctionTy: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNamedFunction(M: ModuleRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMGetFirstFunction(M: ModuleRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetLastFunction(M: ModuleRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNextFunction(Fn: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetPreviousFunction(Fn: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDeleteFunction(Fn: ValueRef); - #[fast_ffi] pub fn LLVMGetOrInsertFunction(M: ModuleRef, Name: *c_char, FunctionTy: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetIntrinsicID(Fn: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetFunctionCallConv(Fn: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMSetFunctionCallConv(Fn: ValueRef, CC: c_uint); - #[fast_ffi] pub fn LLVMGetGC(Fn: ValueRef) -> *c_char; - #[fast_ffi] pub fn LLVMSetGC(Fn: ValueRef, Name: *c_char); - #[fast_ffi] pub fn LLVMAddFunctionAttr(Fn: ValueRef, PA: c_uint); - #[fast_ffi] pub fn LLVMAddFunctionAttrString(Fn: ValueRef, Name: *c_char); - #[fast_ffi] pub fn LLVMGetFunctionAttr(Fn: ValueRef) -> c_ulonglong; - #[fast_ffi] pub fn LLVMAddReturnAttribute(Fn: ValueRef, PA: c_uint); - #[fast_ffi] pub fn LLVMRemoveReturnAttribute(Fn: ValueRef, PA: c_uint); - #[fast_ffi] pub fn LLVMRemoveFunctionAttr(Fn: ValueRef, PA: c_ulonglong, HighPA: c_ulonglong); /* Operations on parameters */ - #[fast_ffi] pub fn LLVMCountParams(Fn: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetParams(Fn: ValueRef, Params: *ValueRef); - #[fast_ffi] pub fn LLVMGetParam(Fn: ValueRef, Index: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMGetParamParent(Inst: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetFirstParam(Fn: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetLastParam(Fn: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNextParam(Arg: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetPreviousParam(Arg: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMAddAttribute(Arg: ValueRef, PA: c_uint); - #[fast_ffi] pub fn LLVMRemoveAttribute(Arg: ValueRef, PA: c_uint); - #[fast_ffi] pub fn LLVMGetAttribute(Arg: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMSetParamAlignment(Arg: ValueRef, align: c_uint); /* Operations on basic blocks */ - #[fast_ffi] pub fn LLVMBasicBlockAsValue(BB: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMValueIsBasicBlock(Val: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMValueAsBasicBlock(Val: ValueRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetBasicBlockParent(BB: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMCountBasicBlocks(Fn: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetBasicBlocks(Fn: ValueRef, BasicBlocks: *ValueRef); - #[fast_ffi] pub fn LLVMGetFirstBasicBlock(Fn: ValueRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetLastBasicBlock(Fn: ValueRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetNextBasicBlock(BB: BasicBlockRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetPreviousBasicBlock(BB: BasicBlockRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetEntryBasicBlock(Fn: ValueRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMAppendBasicBlockInContext(C: ContextRef, Fn: ValueRef, Name: *c_char) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMInsertBasicBlockInContext(C: ContextRef, BB: BasicBlockRef, Name: *c_char) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMDeleteBasicBlock(BB: BasicBlockRef); - #[fast_ffi] pub fn LLVMMoveBasicBlockAfter(BB: BasicBlockRef, MoveAfter: BasicBlockRef); - #[fast_ffi] pub fn LLVMMoveBasicBlockBefore(BB: BasicBlockRef, MoveBefore: BasicBlockRef); /* Operations on instructions */ - #[fast_ffi] pub fn LLVMGetInstructionParent(Inst: ValueRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMGetFirstInstruction(BB: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetLastInstruction(BB: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetNextInstruction(Inst: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMGetPreviousInstruction(Inst: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMInstructionEraseFromParent(Inst: ValueRef); /* Operations on call sites */ - #[fast_ffi] pub fn LLVMSetInstructionCallConv(Instr: ValueRef, CC: c_uint); - #[fast_ffi] pub fn LLVMGetInstructionCallConv(Instr: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMAddInstrAttribute(Instr: ValueRef, index: c_uint, IA: c_uint); - #[fast_ffi] pub fn LLVMRemoveInstrAttribute(Instr: ValueRef, index: c_uint, IA: c_uint); - #[fast_ffi] pub fn LLVMSetInstrParamAlignment(Instr: ValueRef, index: c_uint, align: c_uint); /* Operations on call instructions (only) */ - #[fast_ffi] pub fn LLVMIsTailCall(CallInst: ValueRef) -> Bool; - #[fast_ffi] pub fn LLVMSetTailCall(CallInst: ValueRef, IsTailCall: Bool); /* Operations on phi nodes */ - #[fast_ffi] pub fn LLVMAddIncoming(PhiNode: ValueRef, IncomingValues: *ValueRef, IncomingBlocks: *BasicBlockRef, Count: c_uint); - #[fast_ffi] pub fn LLVMCountIncoming(PhiNode: ValueRef) -> c_uint; - #[fast_ffi] pub fn LLVMGetIncomingValue(PhiNode: ValueRef, Index: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMGetIncomingBlock(PhiNode: ValueRef, Index: c_uint) -> BasicBlockRef; /* Instruction builders */ - #[fast_ffi] pub fn LLVMCreateBuilderInContext(C: ContextRef) -> BuilderRef; - #[fast_ffi] pub fn LLVMPositionBuilder(Builder: BuilderRef, Block: BasicBlockRef, Instr: ValueRef); - #[fast_ffi] pub fn LLVMPositionBuilderBefore(Builder: BuilderRef, Instr: ValueRef); - #[fast_ffi] pub fn LLVMPositionBuilderAtEnd(Builder: BuilderRef, Block: BasicBlockRef); - #[fast_ffi] pub fn LLVMGetInsertBlock(Builder: BuilderRef) -> BasicBlockRef; - #[fast_ffi] pub fn LLVMClearInsertionPosition(Builder: BuilderRef); - #[fast_ffi] pub fn LLVMInsertIntoBuilder(Builder: BuilderRef, Instr: ValueRef); - #[fast_ffi] pub fn LLVMInsertIntoBuilderWithName(Builder: BuilderRef, Instr: ValueRef, Name: *c_char); - #[fast_ffi] pub fn LLVMDisposeBuilder(Builder: BuilderRef); - #[fast_ffi] pub fn LLVMDisposeExecutionEngine(EE: ExecutionEngineRef); /* Metadata */ - #[fast_ffi] pub fn LLVMSetCurrentDebugLocation(Builder: BuilderRef, L: ValueRef); - #[fast_ffi] pub fn LLVMGetCurrentDebugLocation(Builder: BuilderRef) -> ValueRef; - #[fast_ffi] pub fn LLVMSetInstDebugLocation(Builder: BuilderRef, Inst: ValueRef); /* Terminators */ - #[fast_ffi] pub fn LLVMBuildRetVoid(B: BuilderRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildRet(B: BuilderRef, V: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildAggregateRet(B: BuilderRef, RetVals: *ValueRef, N: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildBr(B: BuilderRef, Dest: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildCondBr(B: BuilderRef, If: ValueRef, Then: BasicBlockRef, Else: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSwitch(B: BuilderRef, V: ValueRef, Else: BasicBlockRef, NumCases: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildIndirectBr(B: BuilderRef, Addr: ValueRef, NumDests: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildInvoke(B: BuilderRef, Fn: ValueRef, Args: *ValueRef, @@ -1083,382 +829,313 @@ pub fn LLVMBuildInvoke(B: BuilderRef, Catch: BasicBlockRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildLandingPad(B: BuilderRef, Ty: TypeRef, PersFn: ValueRef, NumClauses: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildResume(B: BuilderRef, Exn: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildUnreachable(B: BuilderRef) -> ValueRef; /* Add a case to the switch instruction */ - #[fast_ffi] pub fn LLVMAddCase(Switch: ValueRef, OnVal: ValueRef, Dest: BasicBlockRef); /* Add a destination to the indirectbr instruction */ - #[fast_ffi] pub fn LLVMAddDestination(IndirectBr: ValueRef, Dest: BasicBlockRef); /* Add a clause to the landing pad instruction */ - #[fast_ffi] pub fn LLVMAddClause(LandingPad: ValueRef, ClauseVal: ValueRef); /* Set the cleanup on a landing pad instruction */ - #[fast_ffi] pub fn LLVMSetCleanup(LandingPad: ValueRef, Val: Bool); /* Arithmetic */ - #[fast_ffi] pub fn LLVMBuildAdd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNSWAdd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNUWAdd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFAdd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSub(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNSWSub(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNUWSub(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFSub(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildMul(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNSWMul(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNUWMul(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFMul(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildUDiv(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSDiv(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildExactSDiv(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFDiv(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildURem(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSRem(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFRem(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildShl(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildLShr(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildAShr(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildAnd(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildOr(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildXor(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildBinOp(B: BuilderRef, Op: Opcode, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNeg(B: BuilderRef, V: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNSWNeg(B: BuilderRef, V: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNUWNeg(B: BuilderRef, V: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFNeg(B: BuilderRef, V: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildNot(B: BuilderRef, V: ValueRef, Name: *c_char) -> ValueRef; /* Memory */ - #[fast_ffi] pub fn LLVMBuildMalloc(B: BuilderRef, Ty: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildArrayMalloc(B: BuilderRef, Ty: TypeRef, Val: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildAlloca(B: BuilderRef, Ty: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildArrayAlloca(B: BuilderRef, Ty: TypeRef, Val: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFree(B: BuilderRef, PointerVal: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildLoad(B: BuilderRef, PointerVal: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildStore(B: BuilderRef, Val: ValueRef, Ptr: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildGEP(B: BuilderRef, Pointer: ValueRef, Indices: *ValueRef, NumIndices: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildInBoundsGEP(B: BuilderRef, Pointer: ValueRef, Indices: *ValueRef, NumIndices: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildStructGEP(B: BuilderRef, Pointer: ValueRef, Idx: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildGlobalString(B: BuilderRef, Str: *c_char, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildGlobalStringPtr(B: BuilderRef, Str: *c_char, Name: *c_char) -> ValueRef; /* Casts */ - #[fast_ffi] pub fn LLVMBuildTrunc(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildZExt(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSExt(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFPToUI(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFPToSI(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildUIToFP(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSIToFP(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFPTrunc(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFPExt(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildPtrToInt(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildIntToPtr(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildBitCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildZExtOrBitCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSExtOrBitCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildTruncOrBitCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildCast(B: BuilderRef, Op: Opcode, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildPointerCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildIntCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFPCast(B: BuilderRef, Val: ValueRef, DestTy: TypeRef, @@ -1466,14 +1143,12 @@ pub fn LLVMBuildFPCast(B: BuilderRef, -> ValueRef; /* Comparisons */ - #[fast_ffi] pub fn LLVMBuildICmp(B: BuilderRef, Op: c_uint, LHS: ValueRef, RHS: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildFCmp(B: BuilderRef, Op: c_uint, LHS: ValueRef, @@ -1482,56 +1157,47 @@ pub fn LLVMBuildFCmp(B: BuilderRef, -> ValueRef; /* Miscellaneous instructions */ - #[fast_ffi] pub fn LLVMBuildPhi(B: BuilderRef, Ty: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildCall(B: BuilderRef, Fn: ValueRef, Args: *ValueRef, NumArgs: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildSelect(B: BuilderRef, If: ValueRef, Then: ValueRef, Else: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildVAArg(B: BuilderRef, list: ValueRef, Ty: TypeRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildExtractElement(B: BuilderRef, VecVal: ValueRef, Index: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildInsertElement(B: BuilderRef, VecVal: ValueRef, EltVal: ValueRef, Index: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildShuffleVector(B: BuilderRef, V1: ValueRef, V2: ValueRef, Mask: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildExtractValue(B: BuilderRef, AggVal: ValueRef, Index: c_uint, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildInsertValue(B: BuilderRef, AggVal: ValueRef, EltVal: ValueRef, @@ -1539,13 +1205,10 @@ pub fn LLVMBuildInsertValue(B: BuilderRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildIsNull(B: BuilderRef, Val: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildIsNotNull(B: BuilderRef, Val: ValueRef, Name: *c_char) -> ValueRef; - #[fast_ffi] pub fn LLVMBuildPtrDiff(B: BuilderRef, LHS: ValueRef, RHS: ValueRef, @@ -1585,49 +1248,38 @@ pub fn LLVMBuildAtomicRMW(B: BuilderRef, /* Selected entries from the downcasts. */ - #[fast_ffi] pub fn LLVMIsATerminatorInst(Inst: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMIsAStoreInst(Inst: ValueRef) -> ValueRef; /** Writes a module to the specified path. Returns 0 on success. */ - #[fast_ffi] pub fn LLVMWriteBitcodeToFile(M: ModuleRef, Path: *c_char) -> c_int; /** Creates target data from a target layout string. */ - #[fast_ffi] pub fn LLVMCreateTargetData(StringRep: *c_char) -> TargetDataRef; /// Adds the target data to the given pass manager. The pass manager /// references the target data only weakly. - #[fast_ffi] pub fn LLVMAddTargetData(TD: TargetDataRef, PM: PassManagerRef); /** Number of bytes clobbered when doing a Store to *T. */ - #[fast_ffi] pub fn LLVMStoreSizeOfType(TD: TargetDataRef, Ty: TypeRef) -> c_ulonglong; /** Number of bytes clobbered when doing a Store to *T. */ - #[fast_ffi] pub fn LLVMSizeOfTypeInBits(TD: TargetDataRef, Ty: TypeRef) -> c_ulonglong; /** Distance between successive elements in an array of T. Includes ABI padding. */ - #[fast_ffi] pub fn LLVMABISizeOfType(TD: TargetDataRef, Ty: TypeRef) -> c_uint; /** Returns the preferred alignment of a type. */ - #[fast_ffi] pub fn LLVMPreferredAlignmentOfType(TD: TargetDataRef, Ty: TypeRef) -> c_uint; /** Returns the minimum alignment of a type. */ - #[fast_ffi] pub fn LLVMABIAlignmentOfType(TD: TargetDataRef, Ty: TypeRef) -> c_uint; /// Computes the byte offset of the indexed struct element for a /// target. - #[fast_ffi] pub fn LLVMOffsetOfElement(TD: TargetDataRef, StructTy: TypeRef, Element: c_uint) @@ -1636,251 +1288,173 @@ pub fn LLVMOffsetOfElement(TD: TargetDataRef, /** * Returns the minimum alignment of a type when part of a call frame. */ - #[fast_ffi] pub fn LLVMCallFrameAlignmentOfType(TD: TargetDataRef, Ty: TypeRef) -> c_uint; /** Disposes target data. */ - #[fast_ffi] pub fn LLVMDisposeTargetData(TD: TargetDataRef); /** Creates a pass manager. */ - #[fast_ffi] pub fn LLVMCreatePassManager() -> PassManagerRef; /** Creates a function-by-function pass manager */ - #[fast_ffi] pub fn LLVMCreateFunctionPassManagerForModule(M: ModuleRef) -> PassManagerRef; /** Disposes a pass manager. */ - #[fast_ffi] pub fn LLVMDisposePassManager(PM: PassManagerRef); /** Runs a pass manager on a module. */ - #[fast_ffi] pub fn LLVMRunPassManager(PM: PassManagerRef, M: ModuleRef) -> Bool; /** Runs the function passes on the provided function. */ - #[fast_ffi] pub fn LLVMRunFunctionPassManager(FPM: PassManagerRef, F: ValueRef) -> Bool; /** Initializes all the function passes scheduled in the manager */ - #[fast_ffi] pub fn LLVMInitializeFunctionPassManager(FPM: PassManagerRef) -> Bool; /** Finalizes all the function passes scheduled in the manager */ - #[fast_ffi] pub fn LLVMFinalizeFunctionPassManager(FPM: PassManagerRef) -> Bool; - #[fast_ffi] pub fn LLVMInitializePasses(); /** Adds a verification pass. */ - #[fast_ffi] pub fn LLVMAddVerifierPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddGlobalOptimizerPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddIPSCCPPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddDeadArgEliminationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddInstructionCombiningPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddCFGSimplificationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddFunctionInliningPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddFunctionAttrsPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddScalarReplAggregatesPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddScalarReplAggregatesPassSSA(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddJumpThreadingPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddConstantPropagationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddReassociatePass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLoopRotatePass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLICMPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLoopUnswitchPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLoopDeletionPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLoopUnrollPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddGVNPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddMemCpyOptPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddSCCPPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddDeadStoreEliminationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddStripDeadPrototypesPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddConstantMergePass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddArgumentPromotionPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddTailCallEliminationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddIndVarSimplifyPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddAggressiveDCEPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddGlobalDCEPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddCorrelatedValuePropagationPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddPruneEHPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddSimplifyLibCallsPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddLoopIdiomPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddEarlyCSEPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddTypeBasedAliasAnalysisPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMAddBasicAliasAnalysisPass(PM: PassManagerRef); - #[fast_ffi] pub fn LLVMPassManagerBuilderCreate() -> PassManagerBuilderRef; - #[fast_ffi] pub fn LLVMPassManagerBuilderDispose(PMB: PassManagerBuilderRef); - #[fast_ffi] pub fn LLVMPassManagerBuilderSetOptLevel(PMB: PassManagerBuilderRef, OptimizationLevel: c_uint); - #[fast_ffi] pub fn LLVMPassManagerBuilderSetSizeLevel(PMB: PassManagerBuilderRef, Value: Bool); - #[fast_ffi] pub fn LLVMPassManagerBuilderSetDisableUnitAtATime( PMB: PassManagerBuilderRef, Value: Bool); - #[fast_ffi] pub fn LLVMPassManagerBuilderSetDisableUnrollLoops( PMB: PassManagerBuilderRef, Value: Bool); - #[fast_ffi] pub fn LLVMPassManagerBuilderSetDisableSimplifyLibCalls( PMB: PassManagerBuilderRef, Value: Bool); - #[fast_ffi] pub fn LLVMPassManagerBuilderUseInlinerWithThreshold( PMB: PassManagerBuilderRef, threshold: c_uint); - #[fast_ffi] pub fn LLVMPassManagerBuilderPopulateModulePassManager( PMB: PassManagerBuilderRef, PM: PassManagerRef); - #[fast_ffi] pub fn LLVMPassManagerBuilderPopulateFunctionPassManager( PMB: PassManagerBuilderRef, PM: PassManagerRef); /** Destroys a memory buffer. */ - #[fast_ffi] pub fn LLVMDisposeMemoryBuffer(MemBuf: MemoryBufferRef); /* Stuff that's in rustllvm/ because it's not upstream yet. */ /** Opens an object file. */ - #[fast_ffi] pub fn LLVMCreateObjectFile(MemBuf: MemoryBufferRef) -> ObjectFileRef; /** Closes an object file. */ - #[fast_ffi] pub fn LLVMDisposeObjectFile(ObjFile: ObjectFileRef); /** Enumerates the sections in an object file. */ - #[fast_ffi] pub fn LLVMGetSections(ObjFile: ObjectFileRef) -> SectionIteratorRef; /** Destroys a section iterator. */ - #[fast_ffi] pub fn LLVMDisposeSectionIterator(SI: SectionIteratorRef); /** Returns true if the section iterator is at the end of the section list: */ - #[fast_ffi] pub fn LLVMIsSectionIteratorAtEnd(ObjFile: ObjectFileRef, SI: SectionIteratorRef) -> Bool; /** Moves the section iterator to point to the next section. */ - #[fast_ffi] pub fn LLVMMoveToNextSection(SI: SectionIteratorRef); /** Returns the current section name. */ - #[fast_ffi] pub fn LLVMGetSectionName(SI: SectionIteratorRef) -> *c_char; /** Returns the current section size. */ - #[fast_ffi] pub fn LLVMGetSectionSize(SI: SectionIteratorRef) -> c_ulonglong; /** Returns the current section contents as a string buffer. */ - #[fast_ffi] pub fn LLVMGetSectionContents(SI: SectionIteratorRef) -> *c_char; /** Reads the given file and returns it as a memory buffer. Use LLVMDisposeMemoryBuffer() to get rid of it. */ - #[fast_ffi] pub fn LLVMRustCreateMemoryBufferWithContentsOfFile(Path: *c_char) -> MemoryBufferRef; /** Returns a string describing the last error caused by an LLVMRust* call. */ - #[fast_ffi] pub fn LLVMRustGetLastError() -> *c_char; /** Prepare the JIT. Returns a memory manager that can load crates. */ - #[fast_ffi] pub fn LLVMRustPrepareJIT(__morestack: *()) -> *(); /** Load a crate into the memory manager. */ - #[fast_ffi] pub fn LLVMRustLoadCrate(MM: *(), Filename: *c_char) -> bool; /** Execute the JIT engine. */ - #[fast_ffi] pub fn LLVMRustBuildJIT(MM: *(), M: ModuleRef, EnableSegmentedStacks: bool) -> ExecutionEngineRef; /// Print the pass timings since static dtors aren't picking them up. - #[fast_ffi] pub fn LLVMRustPrintPassTimings(); - #[fast_ffi] pub fn LLVMRustStartMultithreading() -> bool; - #[fast_ffi] pub fn LLVMStructCreateNamed(C: ContextRef, Name: *c_char) -> TypeRef; - #[fast_ffi] pub fn LLVMStructSetBody(StructTy: TypeRef, ElementTypes: *TypeRef, ElementCount: c_uint, Packed: Bool); - #[fast_ffi] pub fn LLVMConstNamedStruct(S: TypeRef, ConstantVals: *ValueRef, Count: c_uint) -> ValueRef; /** Enables LLVM debug output. */ - #[fast_ffi] pub fn LLVMSetDebug(Enabled: c_int); /** Prepares inline assembly. */ - #[fast_ffi] pub fn LLVMInlineAsm(Ty: TypeRef, AsmString: *c_char, Constraints: *c_char, @@ -1890,16 +1464,12 @@ pub fn LLVMInlineAsm(Ty: TypeRef, -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreate(M: ModuleRef) -> DIBuilderRef; - #[fast_ffi] pub fn LLVMDIBuilderDispose(Builder: DIBuilderRef); - #[fast_ffi] pub fn LLVMDIBuilderFinalize(Builder: DIBuilderRef); - #[fast_ffi] pub fn LLVMDIBuilderCreateCompileUnit(Builder: DIBuilderRef, Lang: c_uint, File: *c_char, @@ -1910,19 +1480,16 @@ pub fn LLVMDIBuilderCreateCompileUnit(Builder: DIBuilderRef, RuntimeVer: c_uint, SplitName: *c_char); - #[fast_ffi] pub fn LLVMDIBuilderCreateFile(Builder: DIBuilderRef, Filename: *c_char, Directory: *c_char) -> DIFile; - #[fast_ffi] pub fn LLVMDIBuilderCreateSubroutineType(Builder: DIBuilderRef, File: DIFile, ParameterTypes: DIArray) -> DICompositeType; - #[fast_ffi] pub fn LLVMDIBuilderCreateFunction(Builder: DIBuilderRef, Scope: DIDescriptor, Name: *c_char, @@ -1940,7 +1507,6 @@ pub fn LLVMDIBuilderCreateFunction(Builder: DIBuilderRef, Decl: ValueRef) -> DISubprogram; - #[fast_ffi] pub fn LLVMDIBuilderCreateBasicType(Builder: DIBuilderRef, Name: *c_char, SizeInBits: c_ulonglong, @@ -1948,7 +1514,6 @@ pub fn LLVMDIBuilderCreateBasicType(Builder: DIBuilderRef, Encoding: c_uint) -> DIBasicType; - #[fast_ffi] pub fn LLVMDIBuilderCreatePointerType(Builder: DIBuilderRef, PointeeTy: DIType, SizeInBits: c_ulonglong, @@ -1956,7 +1521,6 @@ pub fn LLVMDIBuilderCreatePointerType(Builder: DIBuilderRef, Name: *c_char) -> DIDerivedType; - #[fast_ffi] pub fn LLVMDIBuilderCreateStructType(Builder: DIBuilderRef, Scope: DIDescriptor, Name: *c_char, @@ -1972,7 +1536,6 @@ pub fn LLVMDIBuilderCreateStructType(Builder: DIBuilderRef, UniqueId: *c_char) -> DICompositeType; - #[fast_ffi] pub fn LLVMDIBuilderCreateMemberType(Builder: DIBuilderRef, Scope: DIDescriptor, Name: *c_char, @@ -1985,7 +1548,6 @@ pub fn LLVMDIBuilderCreateMemberType(Builder: DIBuilderRef, Ty: DIType) -> DIDerivedType; - #[fast_ffi] pub fn LLVMDIBuilderCreateLexicalBlock(Builder: DIBuilderRef, Scope: DIDescriptor, File: DIFile, @@ -1993,7 +1555,6 @@ pub fn LLVMDIBuilderCreateLexicalBlock(Builder: DIBuilderRef, Col: c_uint) -> DILexicalBlock; - #[fast_ffi] pub fn LLVMDIBuilderCreateLocalVariable(Builder: DIBuilderRef, Tag: c_uint, Scope: DIDescriptor, @@ -2006,7 +1567,6 @@ pub fn LLVMDIBuilderCreateLocalVariable(Builder: DIBuilderRef, ArgNo: c_uint) -> DIVariable; - #[fast_ffi] pub fn LLVMDIBuilderCreateArrayType(Builder: DIBuilderRef, Size: c_ulonglong, AlignInBits: c_ulonglong, @@ -2014,7 +1574,6 @@ pub fn LLVMDIBuilderCreateArrayType(Builder: DIBuilderRef, Subscripts: DIArray) -> DIType; - #[fast_ffi] pub fn LLVMDIBuilderCreateVectorType(Builder: DIBuilderRef, Size: c_ulonglong, AlignInBits: c_ulonglong, @@ -2022,39 +1581,33 @@ pub fn LLVMDIBuilderCreateVectorType(Builder: DIBuilderRef, Subscripts: DIArray) -> DIType; - #[fast_ffi] pub fn LLVMDIBuilderGetOrCreateSubrange(Builder: DIBuilderRef, Lo: c_longlong, Count: c_longlong) -> DISubrange; - #[fast_ffi] pub fn LLVMDIBuilderGetOrCreateArray(Builder: DIBuilderRef, Ptr: *DIDescriptor, Count: c_uint) -> DIArray; - #[fast_ffi] pub fn LLVMDIBuilderInsertDeclareAtEnd(Builder: DIBuilderRef, Val: ValueRef, VarInfo: DIVariable, InsertAtEnd: BasicBlockRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderInsertDeclareBefore(Builder: DIBuilderRef, Val: ValueRef, VarInfo: DIVariable, InsertBefore: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateEnumerator(Builder: DIBuilderRef, Name: *c_char, Val: c_ulonglong) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateEnumerationType(Builder: DIBuilderRef, Scope: ValueRef, Name: *c_char, @@ -2066,7 +1619,6 @@ pub fn LLVMDIBuilderCreateEnumerationType(Builder: DIBuilderRef, ClassType: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateUnionType(Builder: DIBuilderRef, Scope: ValueRef, Name: *c_char, @@ -2079,10 +1631,8 @@ pub fn LLVMDIBuilderCreateUnionType(Builder: DIBuilderRef, RunTimeLang: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMSetUnnamedAddr(GlobalVar: ValueRef, UnnamedAddr: Bool); - #[fast_ffi] pub fn LLVMDIBuilderCreateTemplateTypeParameter(Builder: DIBuilderRef, Scope: ValueRef, Name: *c_char, @@ -2092,13 +1642,10 @@ pub fn LLVMDIBuilderCreateTemplateTypeParameter(Builder: DIBuilderRef, ColumnNo: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateOpDeref(IntType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateOpPlus(IntType: TypeRef) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateComplexVariable(Builder: DIBuilderRef, Tag: c_uint, Scope: ValueRef, @@ -2111,7 +1658,6 @@ pub fn LLVMDIBuilderCreateComplexVariable(Builder: DIBuilderRef, ArgNo: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMDIBuilderCreateNameSpace(Builder: DIBuilderRef, Scope: ValueRef, Name: *c_char, @@ -2119,13 +1665,10 @@ pub fn LLVMDIBuilderCreateNameSpace(Builder: DIBuilderRef, LineNo: c_uint) -> ValueRef; - #[fast_ffi] pub fn LLVMDICompositeTypeSetTypeArray(CompositeType: ValueRef, TypeArray: ValueRef); - #[fast_ffi] pub fn LLVMIsAArgument(value_ref: ValueRef) -> ValueRef; - #[fast_ffi] pub fn LLVMIsAAllocaInst(value_ref: ValueRef) -> ValueRef; pub fn LLVMInitializeX86TargetInfo(); diff --git a/src/libstd/libc.rs b/src/libstd/libc.rs index e772ade135e..5b56b15e601 100644 --- a/src/libstd/libc.rs +++ b/src/libstd/libc.rs @@ -2708,12 +2708,9 @@ pub fn setvbuf(stream: *FILE, pub fn setbuf(stream: *FILE, buf: *c_char); // Omitted: printf and scanf variants. pub fn fgetc(stream: *FILE) -> c_int; - #[fast_ffi] pub fn fgets(buf: *mut c_char, n: c_int, stream: *FILE) -> *c_char; - #[fast_ffi] pub fn fputc(c: c_int, stream: *FILE) -> c_int; - #[fast_ffi] pub fn fputs(s: *c_char, stream: *FILE) -> *c_char; // Omitted: getc, getchar (might be macros). @@ -2723,13 +2720,11 @@ pub fn fgets(buf: *mut c_char, n: c_int, stream: *FILE) // Omitted: putc, putchar (might be macros). pub fn puts(s: *c_char) -> c_int; pub fn ungetc(c: c_int, stream: *FILE) -> c_int; - #[fast_ffi] pub fn fread(ptr: *mut c_void, size: size_t, nobj: size_t, stream: *FILE) -> size_t; - #[fast_ffi] pub fn fwrite(ptr: *c_void, size: size_t, nobj: size_t, @@ -2766,13 +2761,9 @@ pub fn strtol(s: *c_char, endp: **c_char, base: c_int) -> c_long; pub fn strtoul(s: *c_char, endp: **c_char, base: c_int) -> c_ulong; - #[fast_ffi] pub fn calloc(nobj: size_t, size: size_t) -> *c_void; - #[fast_ffi] pub fn malloc(size: size_t) -> *c_void; - #[fast_ffi] pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void; - #[fast_ffi] pub fn free(p: *c_void); pub fn abort() -> !; pub fn exit(status: c_int) -> !; @@ -2865,7 +2856,6 @@ pub mod stdio { #[link_name = "_pclose"] pub fn pclose(stream: *FILE) -> c_int; #[link_name = "_fdopen"] - #[fast_ffi] pub fn fdopen(fd: c_int, mode: *c_char) -> *FILE; #[link_name = "_fileno"] pub fn fileno(stream: *FILE) -> c_int; @@ -2933,7 +2923,6 @@ pub fn lseek(fd: c_int, offset: c_long, origin: c_int) pub fn pipe(fds: *mut c_int, psize: c_uint, textmode: c_int) -> c_int; #[link_name = "_read"] - #[fast_ffi] pub fn read(fd: c_int, buf: *mut c_void, count: c_uint) -> c_int; #[link_name = "_rmdir"] @@ -2941,7 +2930,6 @@ pub fn read(fd: c_int, buf: *mut c_void, count: c_uint) #[link_name = "_unlink"] pub fn unlink(c: *c_char) -> c_int; #[link_name = "_write"] - #[fast_ffi] pub fn write(fd: c_int, buf: *c_void, count: c_uint) -> c_int; } } @@ -3095,7 +3083,6 @@ pub fn lseek(fd: c_int, offset: off_t, whence: c_int) pub fn pathconf(path: *c_char, name: c_int) -> c_long; pub fn pause() -> c_int; pub fn pipe(fds: *mut c_int) -> c_int; - #[fast_ffi] pub fn read(fd: c_int, buf: *mut c_void, count: size_t) -> ssize_t; pub fn rmdir(path: *c_char) -> c_int; @@ -3108,7 +3095,6 @@ pub fn read(fd: c_int, buf: *mut c_void, count: size_t) pub fn tcgetpgrp(fd: c_int) -> pid_t; pub fn ttyname(fd: c_int) -> *c_char; pub fn unlink(c: *c_char) -> c_int; - #[fast_ffi] pub fn write(fd: c_int, buf: *c_void, count: size_t) -> ssize_t; } diff --git a/src/libstd/rt/local_heap.rs b/src/libstd/rt/local_heap.rs index 9d0a0e0ac25..f863ccacaf5 100644 --- a/src/libstd/rt/local_heap.rs +++ b/src/libstd/rt/local_heap.rs @@ -107,25 +107,18 @@ pub fn live_allocs() -> *raw::Box<()> { } extern { - #[fast_ffi] fn rust_new_memory_region(detailed_leaks: uintptr_t, poison_on_free: uintptr_t) -> *MemoryRegion; - #[fast_ffi] fn rust_delete_memory_region(region: *MemoryRegion); - #[fast_ffi] fn rust_new_boxed_region(region: *MemoryRegion, poison_on_free: uintptr_t) -> *BoxedRegion; - #[fast_ffi] fn rust_delete_boxed_region(region: *BoxedRegion); - #[fast_ffi] fn rust_boxed_region_malloc(region: *BoxedRegion, td: *TypeDesc, size: size_t) -> *OpaqueBox; - #[fast_ffi] fn rust_boxed_region_realloc(region: *BoxedRegion, ptr: *OpaqueBox, size: size_t) -> *OpaqueBox; - #[fast_ffi] fn rust_boxed_region_free(region: *BoxedRegion, box: *OpaqueBox); } diff --git a/src/libstd/rt/thread_local_storage.rs b/src/libstd/rt/thread_local_storage.rs index b2c2c670b55..26eabca2d9d 100644 --- a/src/libstd/rt/thread_local_storage.rs +++ b/src/libstd/rt/thread_local_storage.rs @@ -52,11 +52,8 @@ pub unsafe fn get(key: Key) -> *mut c_void { #[cfg(unix)] extern { - #[fast_ffi] fn pthread_key_create(key: *mut pthread_key_t, dtor: *u8) -> c_int; - #[fast_ffi] fn pthread_setspecific(key: pthread_key_t, value: *mut c_void) -> c_int; - #[fast_ffi] fn pthread_getspecific(key: pthread_key_t) -> *mut c_void; } diff --git a/src/test/bench/shootout-pidigits.rs b/src/test/bench/shootout-pidigits.rs index e84a4ea4327..d56fb98cab0 100644 --- a/src/test/bench/shootout-pidigits.rs +++ b/src/test/bench/shootout-pidigits.rs @@ -24,31 +24,22 @@ fn new() -> mpz_t { #[link_args="-lgmp"] extern { - #[fast_ffi] #[link_name="__gmpz_add"] fn mpz_add(x: *mpz_t, y: *mpz_t, z: *mpz_t); - #[fast_ffi] #[link_name="__gmpz_cmp"] fn mpz_cmp(x: *mpz_t, y: *mpz_t) -> c_int; - #[fast_ffi] #[link_name="__gmpz_fdiv_qr"] fn mpz_fdiv_qr(a: *mpz_t, b: *mpz_t, c: *mpz_t, d: *mpz_t); - #[fast_ffi] #[link_name="__gmpz_get_ui"] fn mpz_get_ui(x: *mpz_t) -> c_uint; - #[fast_ffi] #[link_name="__gmpz_init"] fn mpz_init(x: *mpz_t); - #[fast_ffi] #[link_name="__gmpz_init_set_ui"] fn mpz_init_set_ui(x: *mpz_t, y: c_uint); - #[fast_ffi] #[link_name="__gmpz_mul_2exp"] fn mpz_mul_2exp(x: *mpz_t, y: *mpz_t, z: c_uint); - #[fast_ffi] #[link_name="__gmpz_mul_ui"] fn mpz_mul_ui(x: *mpz_t, y: *mpz_t, z: c_uint); - #[fast_ffi] #[link_name="__gmpz_submul_ui"] fn mpz_submul_ui(x: *mpz_t, y: *mpz_t, z: c_uint); }