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=, #visibility, #visibility=

Methods inherited from Constant

#bitcast_to, #gep, null, null_ptr, undef

Methods inherited from User

#operands

Methods inherited from Value

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

Instance Method Details

#initializerObject



699
700
701
# File 'lib/llvm/core/value.rb', line 699

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

#initializer=(val) ⇒ Object



703
704
705
# File 'lib/llvm/core/value.rb', line 703

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

#thread_local=(local) ⇒ Object



714
715
716
# File 'lib/llvm/core/value.rb', line 714

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

#thread_local?Boolean

Returns:

  • (Boolean)


707
708
709
710
711
712
# File 'lib/llvm/core/value.rb', line 707

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