Module: LLVM::PointerIdentity

Included in:
Attribute, Module, PassManagerBuilder, Target, TargetMachine, Type, Value
Defined in:
lib/llvm.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#ptrObject (readonly)

: as FFI::Pointer



13
14
15
# File 'lib/llvm.rb', line 13

def ptr
  @ptr
end

Instance Method Details

#==(other) ⇒ Object

Checks if the value is equal to other. : (untyped) -> bool



23
24
25
26
# File 'lib/llvm.rb', line 23

def ==(other)
  other.respond_to?(:to_ptr) &&
      ptr == other.to_ptr
end

#eql?(other) ⇒ Boolean

Checks if the value is equivalent to other. : (untyped) -> bool

Returns:

  • (Boolean)


36
37
38
# File 'lib/llvm.rb', line 36

def eql?(other)
  self == other
end

#hashObject

Computes hash. : -> Integer



30
31
32
# File 'lib/llvm.rb', line 30

def hash
  ptr.address.hash
end

#to_ptrObject

: -> FFI::Pointer



17
18
19
# File 'lib/llvm.rb', line 17

def to_ptr
  ptr #: FFI::Pointer
end