From 023e4b9fedbbd2e81ec684a359b040a3a6fd065e Mon Sep 17 00:00:00 2001 From: Lee Cannon Date: Thu, 30 Sep 2021 19:51:05 +0100 Subject: stage2 - add llvm bindings to create attributes with string values --- src/codegen/llvm/bindings.zig | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/codegen/llvm/bindings.zig') diff --git a/src/codegen/llvm/bindings.zig b/src/codegen/llvm/bindings.zig index 29a46a81ee..ab4cf97350 100644 --- a/src/codegen/llvm/bindings.zig +++ b/src/codegen/llvm/bindings.zig @@ -28,6 +28,9 @@ pub const Context = opaque { pub const createEnumAttribute = LLVMCreateEnumAttribute; extern fn LLVMCreateEnumAttribute(*const Context, KindID: c_uint, Val: u64) *const Attribute; + pub const createStringAttribute = LLVMCreateStringAttribute; + extern fn LLVMCreateStringAttribute(*const Context, Key: [*]const u8, Key_Len: c_uint, Value: [*]const u8, Value_Len: c_uint) *const Attribute; + pub const intType = LLVMIntTypeInContext; extern fn LLVMIntTypeInContext(C: *const Context, NumBits: c_uint) *const Type; -- cgit v1.2.3