Class: LLVM::GlobalVariable
- Inherits:
-
GlobalValue
- Object
- Value
- User
- Constant
- GlobalValue
- LLVM::GlobalVariable
- Defined in:
- lib/llvm/core/value.rb
Instance Attribute Summary
Attributes included from PointerIdentity
Instance Method Summary collapse
- #externally_initialized=(boolean) ⇒ Object
-
#externally_initialized? ⇒ Boolean
: -> bool.
- #global_constant=(flag) ⇒ Object
-
#global_constant? ⇒ Boolean
: -> bool.
- #initializer ⇒ Object
- #initializer=(val) ⇒ Object
- #thread_local=(local) ⇒ Object
-
#thread_local? ⇒ Boolean
: -> bool.
Methods inherited from GlobalValue
#alignment, #alignment=, #declaration?, #dll_storage_class, #dll_storage_class=, #linkage, #linkage=, #section, #section=, #unnamed_addr=, #unnamed_addr?, #visibility, #visibility=
Methods inherited from Constant
#bitcast_to, #gep, #int_to_ptr, null, null_ptr, poison, #ptr_to_int, undef
Methods inherited from User
Methods inherited from Value
#add_attribute, #allocated_type, #allocated_type?, #constant?, #dump, from_ptr, from_ptr_kind, #gep_source_element_type, #gep_source_element_type?, #global_parent, #kind, #name, #name=, #null?, #poison?, #remove_attribute, to_ptr, #to_s, type, #type, #undef?
Methods included from PointerIdentity
Instance Method Details
#externally_initialized=(boolean) ⇒ Object
1261 1262 1263 |
# File 'lib/llvm/core/value.rb', line 1261 def externally_initialized=(boolean) C.set_externally_initialized(self, boolean) end |
#externally_initialized? ⇒ Boolean
: -> bool
1257 1258 1259 |
# File 'lib/llvm/core/value.rb', line 1257 def externally_initialized? C.is_externally_initialized(self) end |
#global_constant=(flag) ⇒ Object
1247 1248 1249 1250 1251 1252 1253 1254 |
# File 'lib/llvm/core/value.rb', line 1247 def global_constant=(flag) if flag.kind_of?(Integer) warn 'Warning: Passing Integer value to LLVM::GlobalValue#global_constant=(Boolean) is deprecated.' flag = !flag.zero? end C.set_global_constant(self, flag ? 1 : 0) end |
#global_constant? ⇒ Boolean
: -> bool
1243 1244 1245 |
# File 'lib/llvm/core/value.rb', line 1243 def global_constant? C.is_global_constant(self) end |
#initializer ⇒ Object
1223 1224 1225 |
# File 'lib/llvm/core/value.rb', line 1223 def initializer Value.from_ptr(C.get_initializer(self)) end |
#initializer=(val) ⇒ Object
1227 1228 1229 1230 1231 |
# File 'lib/llvm/core/value.rb', line 1227 def initializer=(val) raise ArgumentError unless val.is_a? Constant C.set_initializer(self, val) end |
#thread_local=(local) ⇒ Object
1238 1239 1240 |
# File 'lib/llvm/core/value.rb', line 1238 def thread_local=(local) C.set_thread_local(self, local ? 1 : 0) end |
#thread_local? ⇒ Boolean
: -> bool
1234 1235 1236 |
# File 'lib/llvm/core/value.rb', line 1234 def thread_local? C.is_thread_local(self) end |