| ... | ... | @@ -1,7 +1,7 @@ |
| 1 | 1 | //! We do this instead of @cImport because the self-hosted compiler is easier |
| 2 | 2 | //! to bootstrap if it does not depend on translate-c. |
| 3 | 3 | |
| 4 | | const LLVMBool = bool; |
| 4 | const Bool = bool; |
| 5 | 5 | pub const AttributeIndex = c_uint; |
| 6 | 6 | |
| 7 | 7 | /// Make sure to use the *InContext functions instead of the global ones. |
| ... | ... | @@ -22,13 +22,13 @@ pub const Context = opaque { |
| 22 | 22 | extern fn LLVMVoidTypeInContext(C: *const Context) *const Type; |
| 23 | 23 | |
| 24 | 24 | pub const structType = LLVMStructTypeInContext; |
| 25 | | extern fn LLVMStructTypeInContext(C: *const Context, ElementTypes: [*]*const Type, ElementCount: c_uint, Packed: LLVMBool) *const Type; |
| 25 | extern fn LLVMStructTypeInContext(C: *const Context, ElementTypes: [*]*const Type, ElementCount: c_uint, Packed: Bool) *const Type; |
| 26 | 26 | |
| 27 | 27 | pub const constString = LLVMConstStringInContext; |
| 28 | | extern fn LLVMConstStringInContext(C: *const Context, Str: [*]const u8, Length: c_uint, DontNullTerminate: LLVMBool) *const Value; |
| 28 | extern fn LLVMConstStringInContext(C: *const Context, Str: [*]const u8, Length: c_uint, DontNullTerminate: Bool) *const Value; |
| 29 | 29 | |
| 30 | 30 | pub const constStruct = LLVMConstStructInContext; |
| 31 | | extern fn LLVMConstStructInContext(C: *const Context, ConstantVals: [*]*const Value, Count: c_uint, Packed: LLVMBool) *const Value; |
| 31 | extern fn LLVMConstStructInContext(C: *const Context, ConstantVals: [*]*const Value, Count: c_uint, Packed: Bool) *const Value; |
| 32 | 32 | |
| 33 | 33 | pub const createBasicBlock = LLVMCreateBasicBlockInContext; |
| 34 | 34 | extern fn LLVMCreateBasicBlockInContext(C: *const Context, Name: [*:0]const u8) *const BasicBlock; |
| ... | ... | @@ -59,7 +59,7 @@ pub const Value = opaque { |
| 59 | 59 | |
| 60 | 60 | pub const Type = opaque { |
| 61 | 61 | pub const functionType = LLVMFunctionType; |
| 62 | | extern fn LLVMFunctionType(ReturnType: *const Type, ParamTypes: ?[*]*const Type, ParamCount: c_uint, IsVarArg: LLVMBool) *const Type; |
| 62 | extern fn LLVMFunctionType(ReturnType: *const Type, ParamTypes: ?[*]*const Type, ParamCount: c_uint, IsVarArg: Bool) *const Type; |
| 63 | 63 | |
| 64 | 64 | pub const constNull = LLVMConstNull; |
| 65 | 65 | extern fn LLVMConstNull(Ty: *const Type) *const Value; |
| ... | ... | @@ -68,7 +68,7 @@ pub const Type = opaque { |
| 68 | 68 | extern fn LLVMConstAllOnes(Ty: *const Type) *const Value; |
| 69 | 69 | |
| 70 | 70 | pub const constInt = LLVMConstInt; |
| 71 | | extern fn LLVMConstInt(IntTy: *const Type, N: c_ulonglong, SignExtend: LLVMBool) *const Value; |
| 71 | extern fn LLVMConstInt(IntTy: *const Type, N: c_ulonglong, SignExtend: Bool) *const Value; |
| 72 | 72 | |
| 73 | 73 | pub const constArray = LLVMConstArray; |
| 74 | 74 | extern fn LLVMConstArray(ElementTy: *const Type, ConstantVals: ?[*]*const Value, Length: c_uint) *const Value; |
| ... | ... | @@ -91,7 +91,7 @@ pub const Module = opaque { |
| 91 | 91 | extern fn LLVMDisposeModule(*const Module) void; |
| 92 | 92 | |
| 93 | 93 | pub const verify = LLVMVerifyModule; |
| 94 | | extern fn LLVMVerifyModule(*const Module, Action: VerifierFailureAction, OutMessage: *[*:0]const u8) LLVMBool; |
| 94 | extern fn LLVMVerifyModule(*const Module, Action: VerifierFailureAction, OutMessage: *[*:0]const u8) Bool; |
| 95 | 95 | |
| 96 | 96 | pub const addFunction = LLVMAddFunction; |
| 97 | 97 | extern fn LLVMAddFunction(*const Module, Name: [*:0]const u8, FunctionTy: *const Type) *const Value; |
| ... | ... | @@ -191,7 +191,7 @@ pub const Builder = opaque { |
| 191 | 191 | extern fn LLVMBuildNUWSub(*const Builder, LHS: *const Value, RHS: *const Value, Name: [*:0]const u8) *const Value; |
| 192 | 192 | |
| 193 | 193 | pub const buildIntCast2 = LLVMBuildIntCast2; |
| 194 | | extern fn LLVMBuildIntCast2(*const Builder, Val: *const Value, DestTy: *const Type, IsSigned: LLVMBool, Name: [*:0]const u8) *const Value; |
| 194 | extern fn LLVMBuildIntCast2(*const Builder, Val: *const Value, DestTy: *const Type, IsSigned: Bool, Name: [*:0]const u8) *const Value; |
| 195 | 195 | |
| 196 | 196 | pub const buildBitCast = LLVMBuildBitCast; |
| 197 | 197 | extern fn LLVMBuildBitCast(*const Builder, Val: *const Value, DestTy: *const Type, Name: [*:0]const u8) *const Value; |
| ... | ... | @@ -258,7 +258,7 @@ pub const TargetMachine = opaque { |
| 258 | 258 | Filename: [*:0]const u8, |
| 259 | 259 | codegen: CodeGenFileType, |
| 260 | 260 | ErrorMessage: *[*:0]const u8, |
| 261 | | ) LLVMBool; |
| 261 | ) Bool; |
| 262 | 262 | }; |
| 263 | 263 | |
| 264 | 264 | pub const CodeMode = extern enum { |
| ... | ... | @@ -295,7 +295,7 @@ pub const CodeGenFileType = extern enum { |
| 295 | 295 | |
| 296 | 296 | pub const Target = opaque { |
| 297 | 297 | pub const getFromTriple = LLVMGetTargetFromTriple; |
| 298 | | extern fn LLVMGetTargetFromTriple(Triple: [*:0]const u8, T: **const Target, ErrorMessage: *[*:0]const u8) LLVMBool; |
| 298 | extern fn LLVMGetTargetFromTriple(Triple: [*:0]const u8, T: **const Target, ErrorMessage: *[*:0]const u8) Bool; |
| 299 | 299 | }; |
| 300 | 300 | |
| 301 | 301 | extern fn LLVMInitializeAArch64TargetInfo() void; |