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

Methods included from PointerIdentity

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

Instance Method Details

#alignmentObject



664
665
666
# File 'lib/llvm/core/value.rb', line 664

def alignment
  C.get_alignment(self)
end

#alignment=(bytes) ⇒ Object



668
669
670
# File 'lib/llvm/core/value.rb', line 668

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

#declaration?Boolean

Returns:

  • (Boolean)


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

def declaration?
  C.is_declaration(self)
end

#dll_storage_classObject



701
702
703
# File 'lib/llvm/core/value.rb', line 701

def dll_storage_class
  C.get_dll_storage_class(self)
end

#dll_storage_class=(klass) ⇒ Object



705
706
707
# File 'lib/llvm/core/value.rb', line 705

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

#global_constant=(flag) ⇒ Object



684
685
686
687
688
689
690
691
# File 'lib/llvm/core/value.rb', line 684

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)


680
681
682
# File 'lib/llvm/core/value.rb', line 680

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

#initializerObject



672
673
674
# File 'lib/llvm/core/value.rb', line 672

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

#initializer=(val) ⇒ Object



676
677
678
# File 'lib/llvm/core/value.rb', line 676

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

#linkageObject



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

def linkage
  C.get_linkage(self)
end

#linkage=(linkage) ⇒ Object



644
645
646
# File 'lib/llvm/core/value.rb', line 644

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

#sectionObject



648
649
650
# File 'lib/llvm/core/value.rb', line 648

def section
  C.get_section(self)
end

#section=(section) ⇒ Object



652
653
654
# File 'lib/llvm/core/value.rb', line 652

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

#unnamed_addr=(flag) ⇒ Object



697
698
699
# File 'lib/llvm/core/value.rb', line 697

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

#unnamed_addr?Boolean

Returns:

  • (Boolean)


693
694
695
# File 'lib/llvm/core/value.rb', line 693

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

#visibilityObject



656
657
658
# File 'lib/llvm/core/value.rb', line 656

def visibility
  C.get_visibility(self)
end

#visibility=(viz) ⇒ Object



660
661
662
# File 'lib/llvm/core/value.rb', line 660

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