Class: LLVM::GlobalVariable

Inherits:
GlobalValue show all
Defined in:
lib/llvm/core/value.rb

Instance Method Summary collapse

Methods inherited from GlobalValue

#alignment, #alignment=, #declaration?, #dll_storage_class, #dll_storage_class=, #global_constant=, #global_constant?, #linkage, #linkage=, #section, #section=, #unnamed_addr=, #unnamed_addr?, #visibility, #visibility=

Methods inherited from Constant

#bitcast_to, #gep, null, null_ptr, #ptr_to_int, undef

Methods inherited from User

#operands

Methods inherited from Value

#add_attribute, #constant?, #dump, from_ptr, #name, #name=, #null?, #remove_attribute, to_ptr, #type, type, #undefined?

Methods included from PointerIdentity

#==, #eql?, #hash, #to_ptr

Instance Method Details

#initializerObject



911
912
913
# File 'lib/llvm/core/value.rb', line 911

def initializer
  Value.from_ptr(C.get_initializer(self))
end

#initializer=(val) ⇒ Object



915
916
917
# File 'lib/llvm/core/value.rb', line 915

def initializer=(val)
  C.set_initializer(self, val)
end

#thread_local=(local) ⇒ Object



926
927
928
# File 'lib/llvm/core/value.rb', line 926

def thread_local=(local)
  C.set_thread_local(self, local ? 1 : 0)
end

#thread_local?Boolean

Returns:

  • (Boolean)


919
920
921
922
923
924
# File 'lib/llvm/core/value.rb', line 919

def thread_local?
  case C.is_thread_local(self)
  when 0 then false
  else true
  end
end