Class: RLTK::CG::GlobalVariable

Inherits:
GlobalValue show all
Defined in:
lib/rltk/cg/value.rb

Overview

This class represents global variables.

Instance Attribute Summary

Attributes included from BindingClass

#ptr

Instance Method Summary collapse

Methods inherited from GlobalValue

#alignment, #alignment=, #declaration?, #externally_initialized=, #externally_initialized?, #global_constant=, #global_constant?, #initialize, #initializer, #initializer=, #linkage, #linkage=, #section, #section=, #thread_local_mode, #thread_local_mode=, #visibility, #visibility=

Methods inherited from Constant

#addr_space_cast, #bitcast_to, #get_element_ptr, #get_element_ptr_in_bounds, #initialize

Methods inherited from User

#operands

Methods inherited from Value

#==, #attributes, #bitcast, #constant?, #dump, #hash, #initialize, #name, #name=, #null?, #print, #trunc, #trunc_or_bitcast, #type, #undefined?, #zextend, #zextend_or_bitcast

Methods included from BindingClass

#==

Constructor Details

This class inherits a constructor from RLTK::CG::GlobalValue

Instance Method Details

#thread_local=(local) ⇒ void

This method returns an undefined value.

Set this global variable as thread local or not.

Parameters:

  • local (Boolean)


1243
1244
1245
# File 'lib/rltk/cg/value.rb', line 1243

def thread_local=(local)
	Bindings.set_thread_local(@ptr, local.to_i)
end

#thread_local?Boolean

Check to see if this global variable is thread local.

Returns:

  • (Boolean)


1234
1235
1236
# File 'lib/rltk/cg/value.rb', line 1234

def thread_local?
	Bindings.is_thread_local(@ptr).to_bool
end