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?, #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?, to_ptr, #type, type, #undefined?

Methods included from PointerIdentity

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

Instance Method Details

#initializerObject



789
790
791
# File 'lib/llvm/core/value.rb', line 789

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

#initializer=(val) ⇒ Object



793
794
795
# File 'lib/llvm/core/value.rb', line 793

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

#thread_local=(local) ⇒ Object



804
805
806
# File 'lib/llvm/core/value.rb', line 804

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

#thread_local?Boolean

Returns:

  • (Boolean)


797
798
799
800
801
802
# File 'lib/llvm/core/value.rb', line 797

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