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, #allocated_type, #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



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

def alignment
  C.get_alignment(self)
end

#alignment=(bytes) ⇒ Object



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

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

#declaration?Boolean

Returns:

  • (Boolean)


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

def declaration?
  C.is_declaration(self)
end

#dll_storage_classObject



733
734
735
# File 'lib/llvm/core/value.rb', line 733

def dll_storage_class
  C.get_dll_storage_class(self)
end

#dll_storage_class=(klass) ⇒ Object



737
738
739
# File 'lib/llvm/core/value.rb', line 737

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

#global_constant=(flag) ⇒ Object



716
717
718
719
720
721
722
723
# File 'lib/llvm/core/value.rb', line 716

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)


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

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

#initializerObject



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

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

#initializer=(val) ⇒ Object



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

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

#linkageObject



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

def linkage
  C.get_linkage(self)
end

#linkage=(linkage) ⇒ Object



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

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

#sectionObject



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

def section
  C.get_section(self)
end

#section=(section) ⇒ Object



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

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

#unnamed_addr=(flag) ⇒ Object



729
730
731
# File 'lib/llvm/core/value.rb', line 729

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

#unnamed_addr?Boolean

Returns:

  • (Boolean)


725
726
727
# File 'lib/llvm/core/value.rb', line 725

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

#visibilityObject



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

def visibility
  C.get_visibility(self)
end

#visibility=(viz) ⇒ Object



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

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