Class: LLVM::GlobalValue

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

Direct Known Subclasses

Function, GlobalAlias, GlobalVariable

Instance Method Summary collapse

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

#alignmentObject


625
626
627
# File 'lib/llvm/core/value.rb', line 625

def alignment
  C.get_alignment(self)
end

#alignment=(bytes) ⇒ Object


629
630
631
# File 'lib/llvm/core/value.rb', line 629

def alignment=(bytes)
  C.set_alignment(self, bytes)
end

#declaration?Boolean

Returns:

  • (Boolean)

597
598
599
# File 'lib/llvm/core/value.rb', line 597

def declaration?
  C.is_declaration(self)
end

#dll_storage_classObject


662
663
664
# File 'lib/llvm/core/value.rb', line 662

def dll_storage_class
  C.get_dll_storage_class(self)
end

#dll_storage_class=(klass) ⇒ Object


666
667
668
# File 'lib/llvm/core/value.rb', line 666

def dll_storage_class=(klass)
  C.set_dll_storage_class(self, klass)
end

#global_constant=(flag) ⇒ Object


645
646
647
648
649
650
651
652
# File 'lib/llvm/core/value.rb', line 645

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

Returns:

  • (Boolean)

641
642
643
# File 'lib/llvm/core/value.rb', line 641

def global_constant?
  C.is_global_constant(self) != 0
end

#initializerObject


633
634
635
# File 'lib/llvm/core/value.rb', line 633

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

#initializer=(val) ⇒ Object


637
638
639
# File 'lib/llvm/core/value.rb', line 637

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

#linkageObject


601
602
603
# File 'lib/llvm/core/value.rb', line 601

def linkage
  C.get_linkage(self)
end

#linkage=(linkage) ⇒ Object


605
606
607
# File 'lib/llvm/core/value.rb', line 605

def linkage=(linkage)
  C.set_linkage(self, linkage)
end

#sectionObject


609
610
611
# File 'lib/llvm/core/value.rb', line 609

def section
  C.get_section(self)
end

#section=(section) ⇒ Object


613
614
615
# File 'lib/llvm/core/value.rb', line 613

def section=(section)
  C.set_section(self, section)
end

#unnamed_addr=(flag) ⇒ Object


658
659
660
# File 'lib/llvm/core/value.rb', line 658

def unnamed_addr=(flag)
  C.set_unnamed_addr(self, flag ? 1 : 0)
end

#unnamed_addr?Boolean

Returns:

  • (Boolean)

654
655
656
# File 'lib/llvm/core/value.rb', line 654

def unnamed_addr?
  C.has_unnamed_addr(self) != 0
end

#visibilityObject


617
618
619
# File 'lib/llvm/core/value.rb', line 617

def visibility
  C.get_visibility(self)
end

#visibility=(viz) ⇒ Object


621
622
623
# File 'lib/llvm/core/value.rb', line 621

def visibility=(viz)
  C.set_visibility(self, viz)
end