llvm: convert attributes and non-intrinsic calls
This commit is contained in:
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -26,10 +26,13 @@ pub const Context = opaque {
|
||||
extern fn LLVMContextDispose(C: *Context) void;
|
||||
|
||||
pub const createEnumAttribute = LLVMCreateEnumAttribute;
|
||||
extern fn LLVMCreateEnumAttribute(*Context, KindID: c_uint, Val: u64) *Attribute;
|
||||
extern fn LLVMCreateEnumAttribute(C: *Context, KindID: c_uint, Val: u64) *Attribute;
|
||||
|
||||
pub const createTypeAttribute = LLVMCreateTypeAttribute;
|
||||
extern fn LLVMCreateTypeAttribute(C: *Context, KindID: c_uint, Type: *Type) *Attribute;
|
||||
|
||||
pub const createStringAttribute = LLVMCreateStringAttribute;
|
||||
extern fn LLVMCreateStringAttribute(*Context, Key: [*]const u8, Key_Len: c_uint, Value: [*]const u8, Value_Len: c_uint) *Attribute;
|
||||
extern fn LLVMCreateStringAttribute(C: *Context, Key: [*]const u8, Key_Len: c_uint, Value: [*]const u8, Value_Len: c_uint) *Attribute;
|
||||
|
||||
pub const pointerType = LLVMPointerTypeInContext;
|
||||
extern fn LLVMPointerTypeInContext(C: *Context, AddressSpace: c_uint) *Type;
|
||||
@@ -309,12 +312,18 @@ pub const Value = opaque {
|
||||
pub const setAlignment = LLVMSetAlignment;
|
||||
extern fn LLVMSetAlignment(V: *Value, Bytes: c_uint) void;
|
||||
|
||||
pub const getFunctionCallConv = LLVMGetFunctionCallConv;
|
||||
extern fn LLVMGetFunctionCallConv(Fn: *Value) CallConv;
|
||||
|
||||
pub const setFunctionCallConv = LLVMSetFunctionCallConv;
|
||||
extern fn LLVMSetFunctionCallConv(Fn: *Value, CC: CallConv) void;
|
||||
|
||||
pub const setInstructionCallConv = LLVMSetInstructionCallConv;
|
||||
extern fn LLVMSetInstructionCallConv(Instr: *Value, CC: CallConv) void;
|
||||
|
||||
pub const setTailCallKind = ZigLLVMSetTailCallKind;
|
||||
extern fn ZigLLVMSetTailCallKind(CallInst: *Value, TailCallKind: TailCallKind) void;
|
||||
|
||||
pub const addCallSiteAttribute = LLVMAddCallSiteAttribute;
|
||||
extern fn LLVMAddCallSiteAttribute(C: *Value, Idx: AttributeIndex, A: *Attribute) void;
|
||||
|
||||
pub const fnSetSubprogram = ZigLLVMFnSetSubprogram;
|
||||
extern fn ZigLLVMFnSetSubprogram(f: *Value, subprogram: *DISubprogram) void;
|
||||
|
||||
@@ -642,7 +651,17 @@ pub const Builder = opaque {
|
||||
Name: [*:0]const u8,
|
||||
) *Value;
|
||||
|
||||
pub const buildCall = ZigLLVMBuildCall;
|
||||
pub const buildCall = LLVMBuildCall2;
|
||||
extern fn LLVMBuildCall2(
|
||||
*Builder,
|
||||
*Type,
|
||||
Fn: *Value,
|
||||
Args: [*]const *Value,
|
||||
NumArgs: c_uint,
|
||||
Name: [*:0]const u8,
|
||||
) *Value;
|
||||
|
||||
pub const buildCallOld = ZigLLVMBuildCall;
|
||||
extern fn ZigLLVMBuildCall(
|
||||
*Builder,
|
||||
*Type,
|
||||
@@ -1605,6 +1624,13 @@ pub const CallAttr = enum(c_int) {
|
||||
AlwaysInline,
|
||||
};
|
||||
|
||||
pub const TailCallKind = enum(c_uint) {
|
||||
None,
|
||||
Tail,
|
||||
MustTail,
|
||||
NoTail,
|
||||
};
|
||||
|
||||
pub const DLLStorageClass = enum(c_uint) {
|
||||
Default,
|
||||
DLLImport,
|
||||
|
||||
Reference in New Issue
Block a user