Method: LLVM::Attribute.string

Defined in:
lib/llvm/core/attribute.rb

.string(key, value, context = Context.global) ⇒ Object

create string attribute with key and value : (untyped, untyped, ?Context) -> Attribute?



46
47
48
49
50
51
# File 'lib/llvm/core/attribute.rb', line 46

def string(key, value, context = Context.global)
  key = key.to_s
  value = value.to_s
  ptr = C.create_string_attribute(context, key, key.size, value, value.size)
  from_ptr(ptr)
end