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

Methods included from PointerIdentity

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

Instance Method Details

#alignmentObject



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

def alignment
  C.get_alignment(self)
end

#alignment=(bytes) ⇒ Object



684
685
686
# File 'lib/llvm/core/value.rb', line 684

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

#declaration?Boolean

Returns:

  • (Boolean)


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

def declaration?
  C.is_declaration(self)
end

#dll_storage_classObject



717
718
719
# File 'lib/llvm/core/value.rb', line 717

def dll_storage_class
  C.get_dll_storage_class(self)
end

#dll_storage_class=(klass) ⇒ Object



721
722
723
# File 'lib/llvm/core/value.rb', line 721

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

#global_constant=(flag) ⇒ Object



700
701
702
703
704
705
706
707
# File 'lib/llvm/core/value.rb', line 700

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)


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

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

#initializerObject



688
689
690
# File 'lib/llvm/core/value.rb', line 688

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

#initializer=(val) ⇒ Object



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

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

#linkageObject



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

def linkage
  C.get_linkage(self)
end

#linkage=(linkage) ⇒ Object



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

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

#sectionObject



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

def section
  C.get_section(self)
end

#section=(section) ⇒ Object



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

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

#unnamed_addr=(flag) ⇒ Object



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

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

#unnamed_addr?Boolean

Returns:

  • (Boolean)


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

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

#visibilityObject



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

def visibility
  C.get_visibility(self)
end

#visibility=(viz) ⇒ Object



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

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