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

#global_constant=(flag) ⇒ Object



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

def global_constant=(flag)
  C.set_global_constant(self, flag)
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)
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



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

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

#unnamed_addr?Boolean

Returns:

  • (Boolean)


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

def unnamed_addr?
  Support::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