Module: LLVM::C

Extended by:
FFI::Library
Defined in:
lib/llvm/target.rb,
lib/llvm/core_ffi.rb,
lib/llvm/linker_ffi.rb,
lib/llvm/target_ffi.rb,
lib/llvm/core_ffi_v2.rb,
lib/llvm/analysis_ffi.rb,
lib/llvm/pass_builder.rb,
lib/llvm/core/bitcode_ffi.rb,
lib/llvm/execution_engine_ffi.rb

Defined Under Namespace

Classes: MCJITCompilerOptions, OpaqueExecutionEngine, OpaqueGenericValue, OpaqueMCJITMemoryManager, OpaqueTargetData, OpaqueTargetLibraryInfotData, OpaqueTargetMachine, Target

Class Method Summary collapse

Class Method Details

._callback_diagnostic_handler_(diagnostic_info_ref, void) ⇒ FFI::Pointer(DiagnosticInfoRef)

Contexts are execution states for the core LLVM IR system.

Most types are tied to a context instance. Multiple contexts can exist simultaneously. A single context is not thread safe. However, different contexts can execute on different threads simultaneously.

@{

This entry is only for documentation and no real method.

Parameters:

  • diagnostic_info_ref (FFI::Pointer(DiagnosticInfoRef))
  • void (FFI::Pointer(*Void))

Returns:

  • (FFI::Pointer(DiagnosticInfoRef))


809
# File 'lib/llvm/core_ffi.rb', line 809

callback :diagnostic_handler, [:pointer, :pointer], :pointer

._callback_memory_manager_allocate_code_section_callback_(uint8_t, opaque, size, alignment, section_id, section_name) ⇒ Integer

– Operations on memory managers ————————————-===

This entry is only for documentation and no real method.

Parameters:

  • uint8_t (Integer)
  • opaque (FFI::Pointer(*Void))
  • size (Integer)
  • alignment (Integer)
  • section_id (Integer)
  • section_name (String)

Returns:

  • (Integer)


358
# File 'lib/llvm/execution_engine_ffi.rb', line 358

callback :memory_manager_allocate_code_section_callback, [:uchar, :pointer, :ulong, :uint, :uint, :string], :uchar

._callback_memory_manager_allocate_data_section_callback_(uint8_t, opaque, size, alignment, section_id, section_name, is_read_only) ⇒ Integer

(Not documented)

This entry is only for documentation and no real method.

Parameters:

  • uint8_t (Integer)
  • opaque (FFI::Pointer(*Void))
  • size (Integer)
  • alignment (Integer)
  • section_id (Integer)
  • section_name (String)
  • is_read_only (Integer)

Returns:

  • (Integer)


374
# File 'lib/llvm/execution_engine_ffi.rb', line 374

callback :memory_manager_allocate_data_section_callback, [:uchar, :pointer, :ulong, :uint, :uint, :string, :int], :uchar

._callback_memory_manager_finalize_memory_callback_(bool, opaque, err_msg) ⇒ Integer

(Not documented)

This entry is only for documentation and no real method.

Parameters:

  • bool (Integer)
  • opaque (FFI::Pointer(*Void))
  • err_msg (FFI::Pointer(**CharS))

Returns:

  • (Integer)


386
# File 'lib/llvm/execution_engine_ffi.rb', line 386

callback :memory_manager_finalize_memory_callback, [:int, :pointer, :pointer], :int

._callback_yield_callback_(context_ref, void) ⇒ FFI::Pointer(ContextRef)

(Not documented)

This entry is only for documentation and no real method.

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • void (FFI::Pointer(*Void))

Returns:

  • (FFI::Pointer(ContextRef))


820
# File 'lib/llvm/core_ffi.rb', line 820

callback :yield_callback, [:pointer, :pointer], :pointer

._enum_atomic_ordering_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:atomic_ordering).

Options:

:not_atomic
:unordered

< A load or store which is not atomic

:monotonic

< Lowest level of atomicity, guarantees

somewhat sane results, lock free.
:acquire

< guarantees that if you take all the

operations affecting a specific address,
a consistent ordering exists
:release

< Acquire provides a barrier of the sort

necessary to acquire a lock to access other
memory with normal loads and stores.
:acquire_release

< Release is similar to Acquire, but with

a barrier of the sort necessary to release
a lock.
:sequentially_consistent

< provides both an Acquire and a

Release barrier (for fences and
operations which both read and write
 memory).

Returns:

  • (Symbol)


731
732
733
734
735
736
737
738
739
# File 'lib/llvm/core_ffi.rb', line 731

enum :atomic_ordering, [
  :not_atomic, 0,
  :unordered, 1,
  :monotonic, 2,
  :acquire, 4,
  :release, 5,
  :acquire_release, 6,
  :sequentially_consistent, 7
]

._enum_atomic_rmw_bin_op_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:atomic_rmw_bin_op).

Options:

:xchg
:add

< Set the new value and return the one old

:sub

< Add a value and return the old one

:and_

< Subtract a value and return the old one

:nand

< And a value and return the old one

:or_

< Not-And a value and return the old one

:xor

< OR a value and return the old one

:max

< Xor a value and return the old one

:min

< Sets the value if it’s greater than the

original using a signed comparison and return
the old one
:u_max

< Sets the value if it’s Smaller than the

original using a signed comparison and return
the old one
:u_min

< Sets the value if it’s greater than the

original using an unsigned comparison and return
the old one

Returns:

  • (Symbol)


243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
# File 'lib/llvm/core_ffi_v2.rb', line 243

enum :atomic_rmw_bin_op, [
  :xchg,
  :add,
  :sub,
  :and,
  :nand,
  :or,
  :xor,
  :max,
  :min,
  :umax,
  :umin,
  :fadd,
  :fsub,
  :fmax,
  :fmin,
  :uincwrap,
  :udecwrap,
]

._enum_attribute_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:attribute).

Options:

:z_ext_attribute
:s_ext_attribute
:no_return_attribute
:in_reg_attribute
:struct_ret_attribute
:no_unwind_attribute
:no_alias_attribute
:by_val_attribute
:nest_attribute
:read_none_attribute
:read_only_attribute
:no_inline_attribute
:always_inline_attribute
:optimize_for_size_attribute
:stack_protect_attribute
:stack_protect_req_attribute
:alignment
:no_capture_attribute
:no_red_zone_attribute
:no_implicit_float_attribute
:naked_attribute
:inline_hint_attribute
:stack_alignment
:returns_twice
:uw_table
:non_lazy_bind

Returns:

  • (Symbol)


111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# File 'lib/llvm/core_ffi.rb', line 111

enum :attribute, [
  :z_ext_attribute, 1,
  :s_ext_attribute, 2,
  :no_return_attribute, 4,
  :in_reg_attribute, 8,
  :struct_ret_attribute, 16,
  :no_unwind_attribute, 32,
  :no_alias_attribute, 64,
  :by_val_attribute, 128,
  :nest_attribute, 256,
  :read_none_attribute, 512,
  :read_only_attribute, 1024,
  :no_inline_attribute, 2048,
  :always_inline_attribute, 4096,
  :optimize_for_size_attribute, 8192,
  :stack_protect_attribute, 16384,
  :stack_protect_req_attribute, 32768,
  :alignment, 2031616,
  :no_capture_attribute, 2097152,
  :no_red_zone_attribute, 4194304,
  :no_implicit_float_attribute, 8388608,
  :naked_attribute, 16777216,
  :inline_hint_attribute, 33554432,
  :stack_alignment, 469762048,
  :returns_twice, 536870912,
  :uw_table, 1073741824,
  :non_lazy_bind, 2147483648
]

._enum_byte_ordering_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:byte_ordering).

Options:

:big_endian
:little_endian

Returns:

  • (Symbol)


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

enum :byte_ordering, [
  :big_endian, 0,
  :little_endian, 1
]

._enum_call_conv_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:call_conv).

Options:

:c
:fast
:cold
:web_kit_js
:any_reg
:x86_stdcall
:x86_fastcall

Returns:

  • (Symbol)


541
542
543
544
545
546
547
548
549
# File 'lib/llvm/core_ffi.rb', line 541

enum :call_conv, [
  :c, 0,
  :fast, 8,
  :cold, 9,
  :web_kit_js, 12,
  :any_reg, 13,
  :x86_stdcall, 64,
  :x86_fastcall, 65
]

._enum_code_gen_file_type_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:code_gen_file_type).

Options:

:assembly
:object

Returns:

  • (Symbol)


401
402
403
404
# File 'lib/llvm/target_ffi.rb', line 401

enum :code_gen_file_type, [
  :assembly, 0,
  :object, 1
]

._enum_code_gen_opt_level_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:code_gen_opt_level).

Options:

:none
:less
:default
:aggressive

Returns:

  • (Symbol)


327
328
329
330
331
332
# File 'lib/llvm/target_ffi.rb', line 327

enum :code_gen_opt_level, [
  :none, 0,
  :less, 1,
  :default, 2,
  :aggressive, 3
]

._enum_code_model_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:code_model).

Options:

:default
:jit_default
:small
:kernel
:medium
:large

Returns:

  • (Symbol)


379
380
381
382
383
384
385
386
# File 'lib/llvm/target_ffi.rb', line 379

enum :code_model, [
  :default, 0,
  :jit_default, 1,
  :small, 2,
  :kernel, 3,
  :medium, 4,
  :large, 5
]

._enum_diagnostic_severity_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:diagnostic_severity).

Options:

:ds_error
:ds_warning
:ds_remark
:ds_note

Returns:

  • (Symbol)


758
759
760
761
762
763
# File 'lib/llvm/core_ffi.rb', line 758

enum :diagnostic_severity, [
  :ds_error, 0,
  :ds_warning, 1,
  :ds_remark, 2,
  :ds_note, 3
]

._enum_dll_storage_class_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:dll_storage_class).

Options:

:default
:dll_import
:dll_export

< Function to be imported from DLL.

Returns:

  • (Symbol)


512
513
514
515
516
# File 'lib/llvm/core_ffi.rb', line 512

enum :dll_storage_class, [
  :default, 0,
  :dll_import, 1,
  :dll_export, 2
]

._enum_int_predicate_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:int_predicate).

Options:

:eq
:ne

< equal

:ugt

< not equal

:uge

< unsigned greater than

:ult

< unsigned greater or equal

:ule

< unsigned less than

:sgt

< unsigned less or equal

:sge

< signed greater than

:slt

< signed greater or equal

:sle

< signed less than

Returns:

  • (Symbol)


580
581
582
583
584
585
586
587
588
589
590
591
# File 'lib/llvm/core_ffi.rb', line 580

enum :int_predicate, [
  :eq, 32,
  :ne, 33,
  :ugt, 34,
  :uge, 35,
  :ult, 36,
  :ule, 37,
  :sgt, 38,
  :sge, 39,
  :slt, 40,
  :sle, 41
]

._enum_landing_pad_clause_ty_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:landing_pad_clause_ty).

Options:

:catch
:filter

< A catch clause

Returns:

  • (Symbol)


666
667
668
669
# File 'lib/llvm/core_ffi.rb', line 666

enum :landing_pad_clause_ty, [
  :catch, 0,
  :filter, 1
]

._enum_linkage_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linkage).

Options:

:external
:available_externally

< Externally visible function

:link_once_any
:link_once_odr

< Keep one copy of function when linking (inline)

:link_once_odr_auto_hide

< Same, but only replaced by something

equivalent.
:weak_any

< Obsolete

:weak_odr

< Keep one copy of function when linking (weak)

:appending

< Same, but only replaced by something

equivalent.
:internal

< Special purpose, only applies to global arrays

:private

< Rename collisions when linking (static

functions)
:dll_import

< Like Internal, but omit from symbol table

:dll_export

< Obsolete

:external_weak

< Obsolete

:ghost

< ExternalWeak linkage description

:common

< Obsolete

:linker_private

< Tentative definitions

:linker_private_weak

< Like Private, but linker removes.

Returns:

  • (Symbol)


456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
# File 'lib/llvm/core_ffi.rb', line 456

enum :linkage, [
  :external, 0,
  :available_externally, 1,
  :link_once_any, 2,
  :link_once_odr, 3,
  :link_once_odr_auto_hide, 4,
  :weak_any, 5,
  :weak_odr, 6,
  :appending, 7,
  :internal, 8,
  :private, 9,
  :dll_import, 10,
  :dll_export, 11,
  :external_weak, 12,
  :ghost, 13,
  :common, 14,
  :linker_private, 15,
  :linker_private_weak, 16
]

._enum_linker_mode_Symbol

This enum is provided for backwards-compatibility only. It has no effect.

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:linker_mode).

Options:

:destroy_source
:preserve_source_removed

This is the default behavior.

Returns:

  • (Symbol)


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

enum :linker_mode, [
  :destroy_source, 0,
  :preserve_source_removed, 1
]

._enum_opcode_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:opcode).

Options:

:ret

Terminator Instructions

:br
:switch
:indirect_br
:invoke
:unreachable

removed 6 due to API changes

:add

Standard Binary Operators

:f_add
:sub
:f_sub
:mul
:f_mul
:u_div
:s_div
:f_div
:u_rem
:s_rem
:f_rem
:shl

Logical Operators

:l_shr
:a_shr
:and_
:or_
:xor
:alloca

Memory Operators

:load
:store
:get_element_ptr
:trunc

Cast Operators

:z_ext
:s_ext
:fp_to_ui
:fp_to_si
:ui_to_fp
:si_to_fp
:fp_trunc
:fp_ext
:ptr_to_int
:int_to_ptr
:bit_cast
:addr_space_cast
:i_cmp

Other Operators

:f_cmp
:phi
:call
:select
:user_op1
:user_op2
:va_arg
:extract_element
:insert_element
:shuffle_vector
:extract_value
:insert_value
:fence

Atomic operators

:atomic_cmp_xchg
:atomic_rmw
:resume

Exception Handling Operators

:landing_pad
:cleanup_ret
:catch_ret
:catch_pad
:cleanup_pad
:catch_switch

Returns:

  • (Symbol)


277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
# File 'lib/llvm/core_ffi.rb', line 277

enum :opcode, [
  :ret, 1,
  :br, 2,
  :switch, 3,
  :indirect_br, 4,
  :invoke, 5,
  :unreachable, 7,
  :add, 8,
  :f_add, 9,
  :sub, 10,
  :f_sub, 11,
  :mul, 12,
  :f_mul, 13,
  :u_div, 14,
  :s_div, 15,
  :f_div, 16,
  :u_rem, 17,
  :s_rem, 18,
  :f_rem, 19,
  :shl, 20,
  :l_shr, 21,
  :a_shr, 22,
  :and_, 23,
  :or_, 24,
  :xor, 25,
  :alloca, 26,
  :load, 27,
  :store, 28,
  :get_element_ptr, 29,
  :trunc, 30,
  :z_ext, 31,
  :s_ext, 32,
  :fp_to_ui, 33,
  :fp_to_si, 34,
  :ui_to_fp, 35,
  :si_to_fp, 36,
  :fp_trunc, 37,
  :fp_ext, 38,
  :ptr_to_int, 39,
  :int_to_ptr, 40,
  :bit_cast, 41,
  :addr_space_cast, 60,
  :i_cmp, 42,
  :f_cmp, 43,
  :phi, 44,
  :call, 45,
  :select, 46,
  :user_op1, 47,
  :user_op2, 48,
  :va_arg, 49,
  :extract_element, 50,
  :insert_element, 51,
  :shuffle_vector, 52,
  :extract_value, 53,
  :insert_value, 54,
  :fence, 55,
  :atomic_cmp_xchg, 56,
  :atomic_rmw, 57,
  :resume, 58,
  :landing_pad, 59,
  :cleanup_ret, 61,
  :catch_ret, 62,
  :catch_pad, 63,
  :cleanup_pad, 64,
  :catch_switch, 65
]

._enum_real_predicate_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:real_predicate).

Options:

:predicate_false
:oeq

< Always false (always folded)

:ogt

< True if ordered and equal

:oge

< True if ordered and greater than

:olt

< True if ordered and greater than or equal

:ole

< True if ordered and less than

:one

< True if ordered and less than or equal

:ord

< True if ordered and operands are unequal

:uno

< True if ordered (no nans)

:ueq

< True if unordered: isnan(X) | isnan(Y)

:ugt

< True if unordered or equal

:uge

< True if unordered or greater than

:ult

< True if unordered, greater than, or equal

:ule

< True if unordered or less than

:une

< True if unordered, less than, or equal

:predicate_true

< True if unordered or not equal

Returns:

  • (Symbol)


634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
# File 'lib/llvm/core_ffi.rb', line 634

enum :real_predicate, [
  :predicate_false, 0,
  :oeq, 1,
  :ogt, 2,
  :oge, 3,
  :olt, 4,
  :ole, 5,
  :one, 6,
  :ord, 7,
  :uno, 8,
  :ueq, 9,
  :ugt, 10,
  :uge, 11,
  :ult, 12,
  :ule, 13,
  :une, 14,
  :predicate_true, 15
]

._enum_reloc_mode_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:reloc_mode).

Options:

:default
:static
:pic
:dynamic_no_pic

Returns:

  • (Symbol)


351
352
353
354
355
356
# File 'lib/llvm/target_ffi.rb', line 351

enum :reloc_mode, [
  :default, 0,
  :static, 1,
  :pic, 2,
  :dynamic_no_pic, 3
]

._enum_thread_local_mode_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:thread_local_mode).

Options:

:not_thread_local
:general_dynamic_tls_model
:local_dynamic_tls_model
:initial_exec_tls_model
:local_exec_tls_model

Returns:

  • (Symbol)


690
691
692
693
694
695
696
# File 'lib/llvm/core_ffi.rb', line 690

enum :thread_local_mode, [
  :not_thread_local, 0,
  :general_dynamic_tls_model, 1,
  :local_dynamic_tls_model, 2,
  :initial_exec_tls_model, 3,
  :local_exec_tls_model, 4
]

._enum_type_kind_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:type_kind).

Options:

:void
:half

< type with no size

:float

< 16 bit floating point type

:double

< 32 bit floating point type

:x86_fp80

< 64 bit floating point type

:fp128

< 80 bit floating point type (X87)

:ppc_fp128

< 128 bit floating point type (112-bit mantissa)

:label

< 128 bit floating point type (two 64-bits)

:integer

< Labels

:function

< Arbitrary bit width integers

:struct

< Functions

:array

< Structures

:pointer

< Arrays

:vector

< Pointers

:metadata

< SIMD ‘packed’ format, or other vector type

:x86_mmx

< Metadata

:token

< X86 MMX

Returns:

  • (Symbol)


387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
# File 'lib/llvm/core_ffi.rb', line 387

enum :type_kind, [
  :void, 0,
  :half, 1,
  :float, 2,
  :double, 3,
  :x86_fp80, 4,
  :fp128, 5,
  :ppc_fp128, 6,
  :label, 7,
  :integer, 8,
  :function, 9,
  :struct, 10,
  :array, 11,
  :pointer, 12,
  :vector, 13,
  :metadata, 14,
  :x86_mmx, 15,
  :token, 16,
  :scalable_vector, 17,
  :bfloat, 18,
  :x86_amx, 19,
]

._enum_verifier_failure_action_Symbol

@{

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:verifier_failure_action).

Options:

:abort_process
:print_message

verifier will print to stderr and abort()

:return_status

verifier will print to stderr and return 1

Returns:

  • (Symbol)


27
28
29
30
31
# File 'lib/llvm/analysis_ffi.rb', line 27

enum :verifier_failure_action, [
  :abort_process, 0,
  :print_message, 1,
  :return_status, 2
]

._enum_visibility_Symbol

(Not documented)

This entry is only for documentation and no real method. The FFI::Enum can be accessed via #enum_type(:visibility).

Options:

:default
:hidden

< The GV is visible

:protected

< The GV is hidden

Returns:

  • (Symbol)


491
492
493
494
495
# File 'lib/llvm/core_ffi.rb', line 491

enum :visibility, [
  :default, 0,
  :hidden, 1,
  :protected, 2
]

.abi_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


252
# File 'lib/llvm/target_ffi.rb', line 252

attach_function :abi_alignment_of_type, :LLVMABIAlignmentOfType, [OpaqueTargetData, :pointer], :uint

.abi_size_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


243
# File 'lib/llvm/target_ffi.rb', line 243

attach_function :abi_size_of_type, :LLVMABISizeOfType, [OpaqueTargetData, :pointer], :ulong_long

.add_analysis_passes(t, pm) ⇒ nil

Adds the target-specific analysis passes to the pass manager.

Parameters:

Returns:

  • (nil)


601
# File 'lib/llvm/target_ffi.rb', line 601

attach_function :add_analysis_passes, :LLVMAddAnalysisPasses, [OpaqueTargetMachine, :pointer], :void

.add_case(switch, on_val, dest) ⇒ nil

Add a case to the switch instruction

Parameters:

  • switch (FFI::Pointer(ValueRef))
  • on_val (FFI::Pointer(ValueRef))
  • dest (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)


4369
# File 'lib/llvm/core_ffi.rb', line 4369

attach_function :add_case, :LLVMAddCase, [:pointer, :pointer, :pointer], :void

.add_clause(landing_pad, clause_val) ⇒ nil

Add a catch or filter clause to the landingpad instruction

Parameters:

  • landing_pad (FFI::Pointer(ValueRef))
  • clause_val (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4387
# File 'lib/llvm/core_ffi.rb', line 4387

attach_function :add_clause, :LLVMAddClause, [:pointer, :pointer], :void

.add_destination(indirect_br, dest) ⇒ nil

Add a destination to the indirectbr instruction

Parameters:

  • indirect_br (FFI::Pointer(ValueRef))
  • dest (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)


4378
# File 'lib/llvm/core_ffi.rb', line 4378

attach_function :add_destination, :LLVMAddDestination, [:pointer, :pointer], :void

.add_function(m, name, function_ty) ⇒ FFI::Pointer(ValueRef)

Add a function to a module under a specified name.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)
  • function_ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Functionllvm::Function::Create()


1115
# File 'lib/llvm/core_ffi.rb', line 1115

attach_function :add_function, :LLVMAddFunction, [:pointer, :string, :pointer], :pointer

.add_global(m, ty, name) ⇒ FFI::Pointer(ValueRef)

This group contains functions that operate on global variable values.

@{

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::GlobalVariable


3166
# File 'lib/llvm/core_ffi.rb', line 3166

attach_function :add_global, :LLVMAddGlobal, [:pointer, :pointer, :string], :pointer

.add_global_in_address_space(m, ty, name, address_space) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)
  • address_space (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3177
# File 'lib/llvm/core_ffi.rb', line 3177

attach_function :add_global_in_address_space, :LLVMAddGlobalInAddressSpace, [:pointer, :pointer, :string, :uint], :pointer

.add_global_mapping(ee, global, addr) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


316
# File 'lib/llvm/execution_engine_ffi.rb', line 316

attach_function :add_global_mapping, :LLVMAddGlobalMapping, [OpaqueExecutionEngine, :pointer, :pointer], :void

.add_incoming(phi_node, incoming_values, incoming_blocks, count) ⇒ nil

Add an incoming value to the end of a PHI list.

Parameters:

  • phi_node (FFI::Pointer(ValueRef))
  • incoming_values (FFI::Pointer(*ValueRef))
  • incoming_blocks (FFI::Pointer(*BasicBlockRef))
  • count (Integer)

Returns:

  • (nil)


4119
# File 'lib/llvm/core_ffi.rb', line 4119

attach_function :add_incoming, :LLVMAddIncoming, [:pointer, :pointer, :pointer, :uint], :void

.add_module(ee, m) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


260
# File 'lib/llvm/execution_engine_ffi.rb', line 260

attach_function :add_module, :LLVMAddModule, [OpaqueExecutionEngine, :pointer], :void

.add_named_metadata_operand(m, name, val) ⇒ nil

Add an operand to named metadata.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)
  • val (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Modulellvm::Module::getNamedMetadata()
  • llvmllvm::MDNodellvm::MDNode::addOperand()


1103
# File 'lib/llvm/core_ffi.rb', line 1103

attach_function :add_named_metadata_operand, :LLVMAddNamedMetadataOperand, [:pointer, :string, :pointer], :void

.add_symbol(symbol_name, symbol_value) ⇒ nil

(Not documented)

Parameters:

  • symbol_name (String)
  • symbol_value (FFI::Pointer(*Void))

Returns:

  • (nil)


48
# File 'lib/llvm/core_ffi.rb', line 48

attach_function :add_symbol, :LLVMAddSymbol, [:string, :pointer], :void

.add_target_dependent_function_attr(fn, a, v) ⇒ nil

Add a target-dependent attribute to a function

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • a (String)
  • v (String)

Returns:

  • (nil)

See Also:

  • llvmllvm::AttrBuilderllvm::AttrBuilder::addAttribute()


3403
# File 'lib/llvm/core_ffi.rb', line 3403

attach_function :add_target_dependent_function_attr, :LLVMAddTargetDependentFunctionAttr, [:pointer, :string, :string], :void

.add_target_library_info(tli, pm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


147
# File 'lib/llvm/target_ffi.rb', line 147

attach_function :add_target_library_info, :LLVMAddTargetLibraryInfo, [OpaqueTargetLibraryInfotData, :pointer], :void

.align_of(ty) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2801
# File 'lib/llvm/core_ffi.rb', line 2801

attach_function :align_of, :LLVMAlignOf, [:pointer], :pointer

.append_basic_block(fn, name) ⇒ FFI::Pointer(BasicBlockRef)

Append a basic block to the end of a function using the global context.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::Create()


3745
# File 'lib/llvm/core_ffi.rb', line 3745

attach_function :append_basic_block, :LLVMAppendBasicBlock, [:pointer, :string], :pointer

.append_basic_block_in_context(c, fn, name) ⇒ FFI::Pointer(BasicBlockRef)

Append a basic block to the end of a function.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • fn (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::Create()


3733
# File 'lib/llvm/core_ffi.rb', line 3733

attach_function :append_basic_block_in_context, :LLVMAppendBasicBlockInContext, [:pointer, :pointer, :string], :pointer

.array_type(element_type, element_count) ⇒ FFI::Pointer(TypeRef)

Create a fixed size array type that refers to a specific type.

The created type will exist in the context that its element type exists in.

Parameters:

  • element_type (FFI::Pointer(TypeRef))
  • element_count (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::ArrayTypellvm::ArrayType::get()


1612
# File 'lib/llvm/core_ffi.rb', line 1612

attach_function :array_type, :LLVMArrayType, [:pointer, :uint], :pointer

.basic_block_as_value(bb) ⇒ FFI::Pointer(ValueRef)

Convert a basic block instance to a value type.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


3606
# File 'lib/llvm/core_ffi.rb', line 3606

attach_function :basic_block_as_value, :LLVMBasicBlockAsValue, [:pointer], :pointer

.block_address(f, bb) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • f (FFI::Pointer(ValueRef))
  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


3017
# File 'lib/llvm/core_ffi.rb', line 3017

attach_function :block_address, :LLVMBlockAddress, [:pointer, :pointer], :pointer

.build_a_shr(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4638
# File 'lib/llvm/core_ffi.rb', line 4638

attach_function :build_a_shr, :LLVMBuildAShr, [:pointer, :pointer, :pointer, :string], :pointer

.build_add(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

Arithmetic

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4407
# File 'lib/llvm/core_ffi.rb', line 4407

attach_function :build_add, :LLVMBuildAdd, [:pointer, :pointer, :pointer, :string], :pointer

.build_addr_space_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4991
# File 'lib/llvm/core_ffi.rb', line 4991

attach_function :build_addr_space_cast, :LLVMBuildAddrSpaceCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_aggregate_ret(builder_ref, ret_vals, n) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ret_vals (FFI::Pointer(*ValueRef))
  • n (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


4289
# File 'lib/llvm/core_ffi.rb', line 4289

attach_function :build_aggregate_ret, :LLVMBuildAggregateRet, [:pointer, :pointer, :uint], :pointer

.build_alloca(builder_ref, ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4764
# File 'lib/llvm/core_ffi.rb', line 4764

attach_function :build_alloca, :LLVMBuildAlloca, [:pointer, :pointer, :string], :pointer

.build_and(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4649
# File 'lib/llvm/core_ffi.rb', line 4649

attach_function :build_and, :LLVMBuildAnd, [:pointer, :pointer, :pointer, :string], :pointer

.build_array_alloca(builder_ref, ty, val, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • val (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4775
# File 'lib/llvm/core_ffi.rb', line 4775

attach_function :build_array_alloca, :LLVMBuildArrayAlloca, [:pointer, :pointer, :pointer, :string], :pointer

.build_array_malloc(builder_ref, ty, val, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • val (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4754
# File 'lib/llvm/core_ffi.rb', line 4754

attach_function :build_array_malloc, :LLVMBuildArrayMalloc, [:pointer, :pointer, :pointer, :string], :pointer

.build_atomic_rmw(b, op, ptr, val, ordering, single_thread) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(ValueRef))


274
# File 'lib/llvm/core_ffi_v2.rb', line 274

attach_function :build_atomic_rmw, :LLVMBuildAtomicRMW, [:pointer, :atomic_rmw_bin_op, :pointer, :pointer, :atomic_ordering, :int], :pointer

.build_bin_op(b, op, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • op (Symbol from _enum_opcode_)
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4683
# File 'lib/llvm/core_ffi.rb', line 4683

attach_function :build_bin_op, :LLVMBuildBinOp, [:pointer, :opcode, :pointer, :pointer, :string], :pointer

.build_bit_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4980
# File 'lib/llvm/core_ffi.rb', line 4980

attach_function :build_bit_cast, :LLVMBuildBitCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_br(builder_ref, dest) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • dest (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


4298
# File 'lib/llvm/core_ffi.rb', line 4298

attach_function :build_br, :LLVMBuildBr, [:pointer, :pointer], :pointer

.build_cast(b, op, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • op (Symbol from _enum_opcode_)
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5036
# File 'lib/llvm/core_ffi.rb', line 5036

attach_function :build_cast, :LLVMBuildCast, [:pointer, :opcode, :pointer, :pointer, :string], :pointer

.build_cond_br(builder_ref, if_, then_, else_) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • if_ (FFI::Pointer(ValueRef))
  • then_ (FFI::Pointer(BasicBlockRef))
  • else_ (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


4309
# File 'lib/llvm/core_ffi.rb', line 4309

attach_function :build_cond_br, :LLVMBuildCondBr, [:pointer, :pointer, :pointer, :pointer], :pointer

.build_exact_s_div(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4561
# File 'lib/llvm/core_ffi.rb', line 4561

attach_function :build_exact_s_div, :LLVMBuildExactSDiv, [:pointer, :pointer, :pointer, :string], :pointer

.build_extract_element(builder_ref, vec_val, index, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • vec_val (FFI::Pointer(ValueRef))
  • index (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5137
# File 'lib/llvm/core_ffi.rb', line 5137

attach_function :build_extract_element, :LLVMBuildExtractElement, [:pointer, :pointer, :pointer, :string], :pointer

.build_extract_value(builder_ref, agg_val, index, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • agg_val (FFI::Pointer(ValueRef))
  • index (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5172
# File 'lib/llvm/core_ffi.rb', line 5172

attach_function :build_extract_value, :LLVMBuildExtractValue, [:pointer, :pointer, :uint, :string], :pointer

.build_f_add(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4440
# File 'lib/llvm/core_ffi.rb', line 4440

attach_function :build_f_add, :LLVMBuildFAdd, [:pointer, :pointer, :pointer, :string], :pointer

.build_f_cmp(builder_ref, op, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • op (Symbol from _enum_real_predicate_)
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5093
# File 'lib/llvm/core_ffi.rb', line 5093

attach_function :build_f_cmp, :LLVMBuildFCmp, [:pointer, :real_predicate, :pointer, :pointer, :string], :pointer

.build_f_div(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4572
# File 'lib/llvm/core_ffi.rb', line 4572

attach_function :build_f_div, :LLVMBuildFDiv, [:pointer, :pointer, :pointer, :string], :pointer

.build_f_mul(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4528
# File 'lib/llvm/core_ffi.rb', line 4528

attach_function :build_f_mul, :LLVMBuildFMul, [:pointer, :pointer, :pointer, :string], :pointer

.build_f_neg(builder_ref, v, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4723
# File 'lib/llvm/core_ffi.rb', line 4723

attach_function :build_f_neg, :LLVMBuildFNeg, [:pointer, :pointer, :string], :pointer

.build_f_rem(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4605
# File 'lib/llvm/core_ffi.rb', line 4605

attach_function :build_f_rem, :LLVMBuildFRem, [:pointer, :pointer, :pointer, :string], :pointer

.build_f_sub(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4484
# File 'lib/llvm/core_ffi.rb', line 4484

attach_function :build_f_sub, :LLVMBuildFSub, [:pointer, :pointer, :pointer, :string], :pointer

.build_fence(b, ordering, single_thread, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • ordering (Symbol from _enum_atomic_ordering_)
  • single_thread (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5215
# File 'lib/llvm/core_ffi.rb', line 5215

attach_function :build_fence, :LLVMBuildFence, [:pointer, :atomic_ordering, :int, :string], :pointer

.build_fp_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5069
# File 'lib/llvm/core_ffi.rb', line 5069

attach_function :build_fp_cast, :LLVMBuildFPCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_fp_ext(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4947
# File 'lib/llvm/core_ffi.rb', line 4947

attach_function :build_fp_ext, :LLVMBuildFPExt, [:pointer, :pointer, :pointer, :string], :pointer

.build_fp_to_si(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4903
# File 'lib/llvm/core_ffi.rb', line 4903

attach_function :build_fp_to_si, :LLVMBuildFPToSI, [:pointer, :pointer, :pointer, :string], :pointer

.build_fp_to_ui(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4892
# File 'lib/llvm/core_ffi.rb', line 4892

attach_function :build_fp_to_ui, :LLVMBuildFPToUI, [:pointer, :pointer, :pointer, :string], :pointer

.build_fp_trunc(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4936
# File 'lib/llvm/core_ffi.rb', line 4936

attach_function :build_fp_trunc, :LLVMBuildFPTrunc, [:pointer, :pointer, :pointer, :string], :pointer

.build_free(builder_ref, pointer_val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • pointer_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


4784
# File 'lib/llvm/core_ffi.rb', line 4784

attach_function :build_free, :LLVMBuildFree, [:pointer, :pointer], :pointer

.build_global_string(b, str, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • str (String)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4804
# File 'lib/llvm/core_ffi.rb', line 4804

attach_function :build_global_string, :LLVMBuildGlobalString, [:pointer, :string, :string], :pointer

.build_global_string_ptr(b, str, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • str (String)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4814
# File 'lib/llvm/core_ffi.rb', line 4814

attach_function :build_global_string_ptr, :LLVMBuildGlobalStringPtr, [:pointer, :string, :string], :pointer

.build_i_cmp(builder_ref, op, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

Comparisons

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • op (Symbol from _enum_int_predicate_)
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5081
# File 'lib/llvm/core_ffi.rb', line 5081

attach_function :build_i_cmp, :LLVMBuildICmp, [:pointer, :int_predicate, :pointer, :pointer, :string], :pointer

.build_indirect_br(b, addr, num_dests) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • addr (FFI::Pointer(ValueRef))
  • num_dests (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


4330
# File 'lib/llvm/core_ffi.rb', line 4330

attach_function :build_indirect_br, :LLVMBuildIndirectBr, [:pointer, :pointer, :uint], :pointer

.build_insert_element(builder_ref, vec_val, elt_val, index, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • vec_val (FFI::Pointer(ValueRef))
  • elt_val (FFI::Pointer(ValueRef))
  • index (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5149
# File 'lib/llvm/core_ffi.rb', line 5149

attach_function :build_insert_element, :LLVMBuildInsertElement, [:pointer, :pointer, :pointer, :pointer, :string], :pointer

.build_insert_value(builder_ref, agg_val, elt_val, index, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • agg_val (FFI::Pointer(ValueRef))
  • elt_val (FFI::Pointer(ValueRef))
  • index (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5184
# File 'lib/llvm/core_ffi.rb', line 5184

attach_function :build_insert_value, :LLVMBuildInsertValue, [:pointer, :pointer, :pointer, :uint, :string], :pointer

.build_int_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5058
# File 'lib/llvm/core_ffi.rb', line 5058

attach_function :build_int_cast, :LLVMBuildIntCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_int_to_ptr(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4969
# File 'lib/llvm/core_ffi.rb', line 4969

attach_function :build_int_to_ptr, :LLVMBuildIntToPtr, [:pointer, :pointer, :pointer, :string], :pointer

.build_is_not_null(builder_ref, val, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5204
# File 'lib/llvm/core_ffi.rb', line 5204

attach_function :build_is_not_null, :LLVMBuildIsNotNull, [:pointer, :pointer, :string], :pointer

.build_is_null(builder_ref, val, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5194
# File 'lib/llvm/core_ffi.rb', line 5194

attach_function :build_is_null, :LLVMBuildIsNull, [:pointer, :pointer, :string], :pointer

.build_l_shr(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4627
# File 'lib/llvm/core_ffi.rb', line 4627

attach_function :build_l_shr, :LLVMBuildLShr, [:pointer, :pointer, :pointer, :string], :pointer

.build_landing_pad(b, ty, pers_fn, num_clauses, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • pers_fn (FFI::Pointer(ValueRef))
  • num_clauses (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4342
# File 'lib/llvm/core_ffi.rb', line 4342

attach_function :build_landing_pad, :LLVMBuildLandingPad, [:pointer, :pointer, :pointer, :uint, :string], :pointer

.build_malloc(builder_ref, ty, name) ⇒ FFI::Pointer(ValueRef)

Memory

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4743
# File 'lib/llvm/core_ffi.rb', line 4743

attach_function :build_malloc, :LLVMBuildMalloc, [:pointer, :pointer, :string], :pointer

.build_mul(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4495
# File 'lib/llvm/core_ffi.rb', line 4495

attach_function :build_mul, :LLVMBuildMul, [:pointer, :pointer, :pointer, :string], :pointer

.build_neg(builder_ref, v, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4693
# File 'lib/llvm/core_ffi.rb', line 4693

attach_function :build_neg, :LLVMBuildNeg, [:pointer, :pointer, :string], :pointer

.build_not(builder_ref, v, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4733
# File 'lib/llvm/core_ffi.rb', line 4733

attach_function :build_not, :LLVMBuildNot, [:pointer, :pointer, :string], :pointer

.build_nsw_add(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4418
# File 'lib/llvm/core_ffi.rb', line 4418

attach_function :build_nsw_add, :LLVMBuildNSWAdd, [:pointer, :pointer, :pointer, :string], :pointer

.build_nsw_mul(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4506
# File 'lib/llvm/core_ffi.rb', line 4506

attach_function :build_nsw_mul, :LLVMBuildNSWMul, [:pointer, :pointer, :pointer, :string], :pointer

.build_nsw_neg(b, v, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4703
# File 'lib/llvm/core_ffi.rb', line 4703

attach_function :build_nsw_neg, :LLVMBuildNSWNeg, [:pointer, :pointer, :string], :pointer

.build_nsw_sub(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4462
# File 'lib/llvm/core_ffi.rb', line 4462

attach_function :build_nsw_sub, :LLVMBuildNSWSub, [:pointer, :pointer, :pointer, :string], :pointer

.build_nuw_add(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4429
# File 'lib/llvm/core_ffi.rb', line 4429

attach_function :build_nuw_add, :LLVMBuildNUWAdd, [:pointer, :pointer, :pointer, :string], :pointer

.build_nuw_mul(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4517
# File 'lib/llvm/core_ffi.rb', line 4517

attach_function :build_nuw_mul, :LLVMBuildNUWMul, [:pointer, :pointer, :pointer, :string], :pointer

.build_nuw_neg(b, v, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4713
# File 'lib/llvm/core_ffi.rb', line 4713

attach_function :build_nuw_neg, :LLVMBuildNUWNeg, [:pointer, :pointer, :string], :pointer

.build_nuw_sub(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4473
# File 'lib/llvm/core_ffi.rb', line 4473

attach_function :build_nuw_sub, :LLVMBuildNUWSub, [:pointer, :pointer, :pointer, :string], :pointer

.build_or(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4660
# File 'lib/llvm/core_ffi.rb', line 4660

attach_function :build_or, :LLVMBuildOr, [:pointer, :pointer, :pointer, :string], :pointer

.build_phi(builder_ref, ty, name) ⇒ FFI::Pointer(ValueRef)

Miscellaneous instructions

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5103
# File 'lib/llvm/core_ffi.rb', line 5103

attach_function :build_phi, :LLVMBuildPhi, [:pointer, :pointer, :string], :pointer

.build_pointer_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5047
# File 'lib/llvm/core_ffi.rb', line 5047

attach_function :build_pointer_cast, :LLVMBuildPointerCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_ptr_to_int(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4958
# File 'lib/llvm/core_ffi.rb', line 4958

attach_function :build_ptr_to_int, :LLVMBuildPtrToInt, [:pointer, :pointer, :pointer, :string], :pointer

.build_resume(b, exn) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • exn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


4351
# File 'lib/llvm/core_ffi.rb', line 4351

attach_function :build_resume, :LLVMBuildResume, [:pointer, :pointer], :pointer

.build_ret(builder_ref, v) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


4279
# File 'lib/llvm/core_ffi.rb', line 4279

attach_function :build_ret, :LLVMBuildRet, [:pointer, :pointer], :pointer

.build_ret_void(builder_ref) ⇒ FFI::Pointer(ValueRef)

Terminators

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))

Returns:

  • (FFI::Pointer(ValueRef))


4270
# File 'lib/llvm/core_ffi.rb', line 4270

attach_function :build_ret_void, :LLVMBuildRetVoid, [:pointer], :pointer

.build_s_div(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4550
# File 'lib/llvm/core_ffi.rb', line 4550

attach_function :build_s_div, :LLVMBuildSDiv, [:pointer, :pointer, :pointer, :string], :pointer

.build_s_ext(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4881
# File 'lib/llvm/core_ffi.rb', line 4881

attach_function :build_s_ext, :LLVMBuildSExt, [:pointer, :pointer, :pointer, :string], :pointer

.build_s_ext_or_bit_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5013
# File 'lib/llvm/core_ffi.rb', line 5013

attach_function :build_s_ext_or_bit_cast, :LLVMBuildSExtOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_s_rem(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4594
# File 'lib/llvm/core_ffi.rb', line 4594

attach_function :build_s_rem, :LLVMBuildSRem, [:pointer, :pointer, :pointer, :string], :pointer

.build_select(builder_ref, if_, then_, else_, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • if_ (FFI::Pointer(ValueRef))
  • then_ (FFI::Pointer(ValueRef))
  • else_ (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5115
# File 'lib/llvm/core_ffi.rb', line 5115

attach_function :build_select, :LLVMBuildSelect, [:pointer, :pointer, :pointer, :pointer, :string], :pointer

.build_shl(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4616
# File 'lib/llvm/core_ffi.rb', line 4616

attach_function :build_shl, :LLVMBuildShl, [:pointer, :pointer, :pointer, :string], :pointer

.build_shuffle_vector(builder_ref, v1, v2, mask, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v1 (FFI::Pointer(ValueRef))
  • v2 (FFI::Pointer(ValueRef))
  • mask (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5161
# File 'lib/llvm/core_ffi.rb', line 5161

attach_function :build_shuffle_vector, :LLVMBuildShuffleVector, [:pointer, :pointer, :pointer, :pointer, :string], :pointer

.build_si_to_fp(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4925
# File 'lib/llvm/core_ffi.rb', line 4925

attach_function :build_si_to_fp, :LLVMBuildSIToFP, [:pointer, :pointer, :pointer, :string], :pointer

.build_store(builder_ref, val, ptr) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • ptr (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


4794
# File 'lib/llvm/core_ffi.rb', line 4794

attach_function :build_store, :LLVMBuildStore, [:pointer, :pointer, :pointer], :pointer

.build_sub(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4451
# File 'lib/llvm/core_ffi.rb', line 4451

attach_function :build_sub, :LLVMBuildSub, [:pointer, :pointer, :pointer, :string], :pointer

.build_switch(builder_ref, v, else_, num_cases) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • v (FFI::Pointer(ValueRef))
  • else_ (FFI::Pointer(BasicBlockRef))
  • num_cases (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


4320
# File 'lib/llvm/core_ffi.rb', line 4320

attach_function :build_switch, :LLVMBuildSwitch, [:pointer, :pointer, :pointer, :uint], :pointer

.build_trunc(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

Casts

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4859
# File 'lib/llvm/core_ffi.rb', line 4859

attach_function :build_trunc, :LLVMBuildTrunc, [:pointer, :pointer, :pointer, :string], :pointer

.build_trunc_or_bit_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5024
# File 'lib/llvm/core_ffi.rb', line 5024

attach_function :build_trunc_or_bit_cast, :LLVMBuildTruncOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer

.build_u_div(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4539
# File 'lib/llvm/core_ffi.rb', line 4539

attach_function :build_u_div, :LLVMBuildUDiv, [:pointer, :pointer, :pointer, :string], :pointer

.build_u_rem(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4583
# File 'lib/llvm/core_ffi.rb', line 4583

attach_function :build_u_rem, :LLVMBuildURem, [:pointer, :pointer, :pointer, :string], :pointer

.build_ui_to_fp(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4914
# File 'lib/llvm/core_ffi.rb', line 4914

attach_function :build_ui_to_fp, :LLVMBuildUIToFP, [:pointer, :pointer, :pointer, :string], :pointer

.build_unreachable(builder_ref) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))

Returns:

  • (FFI::Pointer(ValueRef))


4359
# File 'lib/llvm/core_ffi.rb', line 4359

attach_function :build_unreachable, :LLVMBuildUnreachable, [:pointer], :pointer

.build_va_arg(builder_ref, list, ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • list (FFI::Pointer(ValueRef))
  • ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5126
# File 'lib/llvm/core_ffi.rb', line 5126

attach_function :build_va_arg, :LLVMBuildVAArg, [:pointer, :pointer, :pointer, :string], :pointer

.build_xor(builder_ref, lhs, rhs, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • lhs (FFI::Pointer(ValueRef))
  • rhs (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4671
# File 'lib/llvm/core_ffi.rb', line 4671

attach_function :build_xor, :LLVMBuildXor, [:pointer, :pointer, :pointer, :string], :pointer

.build_z_ext(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


4870
# File 'lib/llvm/core_ffi.rb', line 4870

attach_function :build_z_ext, :LLVMBuildZExt, [:pointer, :pointer, :pointer, :string], :pointer

.build_z_ext_or_bit_cast(builder_ref, val, dest_ty, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • val (FFI::Pointer(ValueRef))
  • dest_ty (FFI::Pointer(TypeRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


5002
# File 'lib/llvm/core_ffi.rb', line 5002

attach_function :build_z_ext_or_bit_cast, :LLVMBuildZExtOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer

.byte_order(td) ⇒ Symbol from _enum_byte_ordering_

(Not documented)

Parameters:

Returns:



163
# File 'lib/llvm/target_ffi.rb', line 163

attach_function :byte_order, :LLVMByteOrder, [OpaqueTargetData], :byte_ordering

.call_frame_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


261
# File 'lib/llvm/target_ffi.rb', line 261

attach_function :call_frame_alignment_of_type, :LLVMCallFrameAlignmentOfType, [OpaqueTargetData, :pointer], :uint

.clear_insertion_position(builder) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))

Returns:

  • (nil)


4209
# File 'lib/llvm/core_ffi.rb', line 4209

attach_function :clear_insertion_position, :LLVMClearInsertionPosition, [:pointer], :void

.clone_module(m) ⇒ FFI::Pointer(ModuleRef)

Return an exact copy of the specified module.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ModuleRef))


944
# File 'lib/llvm/core_ffi.rb', line 944

attach_function :clone_module, :LLVMCloneModule, [:pointer], :pointer

.const_add(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2850
# File 'lib/llvm/core_ffi.rb', line 2850

attach_function :const_add, :LLVMConstAdd, [:pointer, :pointer], :pointer

.const_addr_space_cast(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2949
# File 'lib/llvm/core_ffi.rb', line 2949

attach_function :const_addr_space_cast, :LLVMConstAddrSpaceCast, [:pointer, :pointer], :pointer

.const_all_ones(ty) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value referring to the instance of a type consisting of all ones.

This is only valid for integer types.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Constantllvm::Constant::getAllOnesValue()


2526
# File 'lib/llvm/core_ffi.rb', line 2526

attach_function :const_all_ones, :LLVMConstAllOnes, [:pointer], :pointer

.const_array(element_ty, constant_vals, length) ⇒ FFI::Pointer(ValueRef)

Create a ConstantArray from values.

Parameters:

  • element_ty (FFI::Pointer(TypeRef))
  • constant_vals (FFI::Pointer(*ValueRef))
  • length (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantArrayllvm::ConstantArray::get()


2745
# File 'lib/llvm/core_ffi.rb', line 2745

attach_function :const_array, :LLVMConstArray, [:pointer, :pointer, :uint], :pointer

.const_bit_cast(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2940
# File 'lib/llvm/core_ffi.rb', line 2940

attach_function :const_bit_cast, :LLVMConstBitCast, [:pointer, :pointer], :pointer

.const_extract_element(vector_constant, index_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • vector_constant (FFI::Pointer(ValueRef))
  • index_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2976
# File 'lib/llvm/core_ffi.rb', line 2976

attach_function :const_extract_element, :LLVMConstExtractElement, [:pointer, :pointer], :pointer

.const_inline_asm(ty, asm_string, constraints, has_side_effects, is_align_stack) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • ty (FFI::Pointer(TypeRef))
  • asm_string (String)
  • constraints (String)
  • has_side_effects (Integer)
  • is_align_stack (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3008
# File 'lib/llvm/core_ffi.rb', line 3008

attach_function :const_inline_asm, :LLVMConstInlineAsm, [:pointer, :string, :string, :int, :int], :pointer

.const_insert_element(vector_constant, element_value_constant, index_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • vector_constant (FFI::Pointer(ValueRef))
  • element_value_constant (FFI::Pointer(ValueRef))
  • index_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2986
# File 'lib/llvm/core_ffi.rb', line 2986

attach_function :const_insert_element, :LLVMConstInsertElement, [:pointer, :pointer, :pointer], :pointer

.const_int(int_ty, n, sign_extend) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value for an integer type.

The returned value corresponds to a llvm::ConstantInt.

Parameters:

  • IntTy

    Integer type to obtain value of.

  • N

    The value the returned instance should refer to.

  • SignExtend

    Whether to sign extend the produced value.

  • int_ty (FFI::Pointer(TypeRef))
  • n (Integer)
  • sign_extend (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::get()


2563
# File 'lib/llvm/core_ffi.rb', line 2563

attach_function :const_int, :LLVMConstInt, [:pointer, :ulong_long, :int], :pointer

.const_int_get_s_ext_value(constant_val) ⇒ Integer

Obtain the sign extended value for an integer constant value.

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::getSExtValue()


2656
# File 'lib/llvm/core_ffi.rb', line 2656

attach_function :const_int_get_s_ext_value, :LLVMConstIntGetSExtValue, [:pointer], :long_long

.const_int_get_z_ext_value(constant_val) ⇒ Integer

Obtain the zero extended value for an integer constant value.

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::getZExtValue()


2646
# File 'lib/llvm/core_ffi.rb', line 2646

attach_function :const_int_get_z_ext_value, :LLVMConstIntGetZExtValue, [:pointer], :ulong_long

.const_int_of_arbitrary_precision(int_ty, num_words, words) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value for an integer of arbitrary precision.

Parameters:

  • int_ty (FFI::Pointer(TypeRef))
  • num_words (Integer)
  • words (FFI::Pointer(*U_long))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::get()


2575
# File 'lib/llvm/core_ffi.rb', line 2575

attach_function :const_int_of_arbitrary_precision, :LLVMConstIntOfArbitraryPrecision, [:pointer, :uint, :pointer], :pointer

.const_int_of_string(int_ty, text, radix) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value for an integer parsed from a string.

A similar API, LLVMConstIntOfStringAndSize is also available. If the string’s length is available, it is preferred to call that function instead.

Parameters:

  • int_ty (FFI::Pointer(TypeRef))
  • text (String)
  • radix (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::get()


2591
# File 'lib/llvm/core_ffi.rb', line 2591

attach_function :const_int_of_string, :LLVMConstIntOfString, [:pointer, :string, :uchar], :pointer

.const_int_of_string_and_size(int_ty, text, s_len, radix) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value for an integer parsed from a string with specified length.

Parameters:

  • int_ty (FFI::Pointer(TypeRef))
  • text (String)
  • s_len (Integer)
  • radix (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantIntllvm::ConstantInt::get()


2605
# File 'lib/llvm/core_ffi.rb', line 2605

attach_function :const_int_of_string_and_size, :LLVMConstIntOfStringAndSize, [:pointer, :string, :uint, :uchar], :pointer

.const_int_to_ptr(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2931
# File 'lib/llvm/core_ffi.rb', line 2931

attach_function :const_int_to_ptr, :LLVMConstIntToPtr, [:pointer, :pointer], :pointer

.const_named_struct(struct_ty, constant_vals, count) ⇒ FFI::Pointer(ValueRef)

Create a non-anonymous ConstantStruct from values.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))
  • constant_vals (FFI::Pointer(*ValueRef))
  • count (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantStructllvm::ConstantStruct::get()


2757
# File 'lib/llvm/core_ffi.rb', line 2757

attach_function :const_named_struct, :LLVMConstNamedStruct, [:pointer, :pointer, :uint], :pointer

.const_neg(constant_val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2817
# File 'lib/llvm/core_ffi.rb', line 2817

attach_function :const_neg, :LLVMConstNeg, [:pointer], :pointer

.const_not(constant_val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2841
# File 'lib/llvm/core_ffi.rb', line 2841

attach_function :const_not, :LLVMConstNot, [:pointer], :pointer

.const_nsw_add(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2859
# File 'lib/llvm/core_ffi.rb', line 2859

attach_function :const_nsw_add, :LLVMConstNSWAdd, [:pointer, :pointer], :pointer

.const_nsw_neg(constant_val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2825
# File 'lib/llvm/core_ffi.rb', line 2825

attach_function :const_nsw_neg, :LLVMConstNSWNeg, [:pointer], :pointer

.const_nsw_sub(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2886
# File 'lib/llvm/core_ffi.rb', line 2886

attach_function :const_nsw_sub, :LLVMConstNSWSub, [:pointer, :pointer], :pointer

.const_null(ty) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value referring to the null instance of a type.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Constantllvm::Constant::getNullValue()


2513
# File 'lib/llvm/core_ffi.rb', line 2513

attach_function :const_null, :LLVMConstNull, [:pointer], :pointer

.const_nuw_add(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2868
# File 'lib/llvm/core_ffi.rb', line 2868

attach_function :const_nuw_add, :LLVMConstNUWAdd, [:pointer, :pointer], :pointer

.const_nuw_neg(constant_val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2833
# File 'lib/llvm/core_ffi.rb', line 2833

attach_function :const_nuw_neg, :LLVMConstNUWNeg, [:pointer], :pointer

.const_nuw_sub(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2895
# File 'lib/llvm/core_ffi.rb', line 2895

attach_function :const_nuw_sub, :LLVMConstNUWSub, [:pointer, :pointer], :pointer

.const_pointer_cast(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2967
# File 'lib/llvm/core_ffi.rb', line 2967

attach_function :const_pointer_cast, :LLVMConstPointerCast, [:pointer, :pointer], :pointer

.const_pointer_null(ty) ⇒ FFI::Pointer(ValueRef)

Obtain a constant that is a constant pointer pointing to NULL for a specified type.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2545
# File 'lib/llvm/core_ffi.rb', line 2545

attach_function :const_pointer_null, :LLVMConstPointerNull, [:pointer], :pointer

.const_ptr_to_int(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2922
# File 'lib/llvm/core_ffi.rb', line 2922

attach_function :const_ptr_to_int, :LLVMConstPtrToInt, [:pointer, :pointer], :pointer

.const_real(real_ty, n) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value referring to a double floating point value.

Parameters:

  • real_ty (FFI::Pointer(TypeRef))
  • n (Float)

Returns:

  • (FFI::Pointer(ValueRef))


2614
# File 'lib/llvm/core_ffi.rb', line 2614

attach_function :const_real, :LLVMConstReal, [:pointer, :double], :pointer

.const_real_get_double(constant_val, loses_info) ⇒ Float

Obtain the double value for an floating point constant value. losesInfo indicates if some precision was lost in the conversion.

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • loses_info (FFI::Pointer(*Bool))

Returns:

See Also:

  • llvmllvm::ConstantFPllvm::ConstantFP::getDoubleValue


2668
# File 'lib/llvm/core_ffi.rb', line 2668

attach_function :const_real_get_double, :LLVMConstRealGetDouble, [:pointer, :pointer], :double

.const_real_of_string(real_ty, text) ⇒ FFI::Pointer(ValueRef)

Obtain a constant for a floating point value parsed from a string.

A similar API, LLVMConstRealOfStringAndSize is also available. It should be used if the input string’s length is known.

Parameters:

  • real_ty (FFI::Pointer(TypeRef))
  • text (String)

Returns:

  • (FFI::Pointer(ValueRef))


2626
# File 'lib/llvm/core_ffi.rb', line 2626

attach_function :const_real_of_string, :LLVMConstRealOfString, [:pointer, :string], :pointer

.const_real_of_string_and_size(real_ty, text, s_len) ⇒ FFI::Pointer(ValueRef)

Obtain a constant for a floating point value parsed from a string.

Parameters:

  • real_ty (FFI::Pointer(TypeRef))
  • text (String)
  • s_len (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


2636
# File 'lib/llvm/core_ffi.rb', line 2636

attach_function :const_real_of_string_and_size, :LLVMConstRealOfStringAndSize, [:pointer, :string, :uint], :pointer

.const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • vector_a_constant (FFI::Pointer(ValueRef))
  • vector_b_constant (FFI::Pointer(ValueRef))
  • mask_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2996
# File 'lib/llvm/core_ffi.rb', line 2996

attach_function :const_shuffle_vector, :LLVMConstShuffleVector, [:pointer, :pointer, :pointer], :pointer

.const_string(str, length, dont_null_terminate) ⇒ FFI::Pointer(ValueRef)

Create a ConstantDataSequential with string content in the global context.

This is the same as LLVMConstStringInContext except it operates on the global context.

Parameters:

  • str (String)
  • length (Integer)
  • dont_null_terminate (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • LLVMConstStringInContext()
  • llvmllvm::ConstantDataArrayllvm::ConstantDataArray::getString()


2684
# File 'lib/llvm/core_ffi.rb', line 2684

attach_function :const_string, :LLVMConstString, [:string, :uint, :int], :pointer

.const_string_in_context(c, str, length, dont_null_terminate) ⇒ FFI::Pointer(ValueRef)

Create a ConstantDataSequential and initialize it with a string.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • str (String)
  • length (Integer)
  • dont_null_terminate (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantDataArrayllvm::ConstantDataArray::getString()


287
# File 'lib/llvm/core_ffi_v2.rb', line 287

attach_function :const_string_in_context2, :LLVMConstStringInContext2, [:pointer, :string, :size_t, :int], :pointer

.const_struct(constant_vals, count, packed) ⇒ FFI::Pointer(ValueRef)

Create a ConstantStruct in the global Context.

This is the same as LLVMConstStructInContext except it operates on the global Context.

Parameters:

  • constant_vals (FFI::Pointer(*ValueRef))
  • count (Integer)
  • packed (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • LLVMConstStructInContext()


2733
# File 'lib/llvm/core_ffi.rb', line 2733

attach_function :const_struct, :LLVMConstStruct, [:pointer, :uint, :int], :pointer

.const_struct_in_context(c, constant_vals, count, packed) ⇒ FFI::Pointer(ValueRef)

Create an anonymous ConstantStruct with the specified values.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • constant_vals (FFI::Pointer(*ValueRef))
  • count (Integer)
  • packed (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantStructllvm::ConstantStruct::getAnon()


2718
# File 'lib/llvm/core_ffi.rb', line 2718

attach_function :const_struct_in_context, :LLVMConstStructInContext, [:pointer, :pointer, :uint, :int], :pointer

.const_sub(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2877
# File 'lib/llvm/core_ffi.rb', line 2877

attach_function :const_sub, :LLVMConstSub, [:pointer, :pointer], :pointer

.const_trunc(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2913
# File 'lib/llvm/core_ffi.rb', line 2913

attach_function :const_trunc, :LLVMConstTrunc, [:pointer, :pointer], :pointer

.const_trunc_or_bit_cast(constant_val, to_type) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • to_type (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2958
# File 'lib/llvm/core_ffi.rb', line 2958

attach_function :const_trunc_or_bit_cast, :LLVMConstTruncOrBitCast, [:pointer, :pointer], :pointer

.const_vector(scalar_constant_vals, size) ⇒ FFI::Pointer(ValueRef)

Create a ConstantVector from values.

Parameters:

  • scalar_constant_vals (FFI::Pointer(*ValueRef))
  • size (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::ConstantVectorllvm::ConstantVector::get()


2779
# File 'lib/llvm/core_ffi.rb', line 2779

attach_function :const_vector, :LLVMConstVector, [:pointer, :uint], :pointer

.const_xor(lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2904
# File 'lib/llvm/core_ffi.rb', line 2904

attach_function :const_xor, :LLVMConstXor, [:pointer, :pointer], :pointer

.context_createFFI::Pointer(ContextRef)

Create a new context.

Every call to this function should be paired with a call to LLVMContextDispose() or the context will leak memory.

Returns:

  • (FFI::Pointer(ContextRef))


830
# File 'lib/llvm/core_ffi.rb', line 830

attach_function :context_create, :LLVMContextCreate, [], :pointer

.context_dispose(c) ⇒ nil

Destroy a context instance.

This should be called for every call to LLVMContextCreate() or memory will be leaked.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (nil)


870
# File 'lib/llvm/core_ffi.rb', line 870

attach_function :context_dispose, :LLVMContextDispose, [:pointer], :void

.context_set_diagnostic_handler(c, handler, diagnostic_context) ⇒ nil

Set the diagnostic handler for this context.

Parameters:

Returns:

  • (nil)


847
# File 'lib/llvm/core_ffi.rb', line 847

attach_function :context_set_diagnostic_handler, :LLVMContextSetDiagnosticHandler, [:pointer, :diagnostic_handler, :pointer], :void

.context_set_yield_callback(c, callback, opaque_handle) ⇒ nil

Set the yield callback function for this context.

Parameters:

Returns:

  • (nil)

See Also:

  • LLVMContext::setYieldCallback()


859
# File 'lib/llvm/core_ffi.rb', line 859

attach_function :context_set_yield_callback, :LLVMContextSetYieldCallback, [:pointer, :yield_callback, :pointer], :void

.copy_string_rep_of_target_data(td) ⇒ String

(Not documented)

Parameters:

Returns:

  • (String)


155
# File 'lib/llvm/target_ffi.rb', line 155

attach_function :copy_string_rep_of_target_data, :LLVMCopyStringRepOfTargetData, [OpaqueTargetData], :string

.count_basic_blocks(fn) ⇒ Integer

Obtain the number of basic blocks in a function.

Parameters:

  • Fn

    Function value to operate on.

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3657
# File 'lib/llvm/core_ffi.rb', line 3657

attach_function :count_basic_blocks, :LLVMCountBasicBlocks, [:pointer], :uint

.count_incoming(phi_node) ⇒ Integer

Obtain the number of incoming basic blocks to a PHI node.

Parameters:

  • phi_node (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


4127
# File 'lib/llvm/core_ffi.rb', line 4127

attach_function :count_incoming, :LLVMCountIncoming, [:pointer], :uint

.count_param_types(function_ty) ⇒ Integer

Obtain the number of parameters this function accepts.

Parameters:

  • function_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)


1470
# File 'lib/llvm/core_ffi.rb', line 1470

attach_function :count_param_types, :LLVMCountParamTypes, [:pointer], :uint

.count_params(fn) ⇒ Integer

Obtain the number of parameters in a function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Functionllvm::Function::arg_size()


3413
# File 'lib/llvm/core_ffi.rb', line 3413

attach_function :count_params, :LLVMCountParams, [:pointer], :uint

.count_struct_element_types(struct_ty) ⇒ Integer

Get the number of elements defined inside the structure.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::StructTypellvm::StructType::getNumElements()


1559
# File 'lib/llvm/core_ffi.rb', line 1559

attach_function :count_struct_element_types, :LLVMCountStructElementTypes, [:pointer], :uint

.create_builderFFI::Pointer(BuilderRef)

(Not documented)

Returns:

  • (FFI::Pointer(BuilderRef))


4165
# File 'lib/llvm/core_ffi.rb', line 4165

attach_function :create_builder, :LLVMCreateBuilder, [], :pointer

.create_builder_in_context(c) ⇒ FFI::Pointer(BuilderRef)

An instruction builder represents a point within a basic block and is the exclusive means of building instructions using the C interface.

@{

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(BuilderRef))


4158
# File 'lib/llvm/core_ffi.rb', line 4158

attach_function :create_builder_in_context, :LLVMCreateBuilderInContext, [:pointer], :pointer

.create_execution_engine_for_module(out_ee, m, out_error) ⇒ Integer

– Operations on execution engines ———————————–===

Parameters:

  • out_ee (FFI::Pointer(*ExecutionEngineRef))
  • m (FFI::Pointer(ModuleRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


139
# File 'lib/llvm/execution_engine_ffi.rb', line 139

attach_function :create_execution_engine_for_module, :LLVMCreateExecutionEngineForModule, [:pointer, :pointer, :pointer], :int

.create_function_pass_manager(mp) ⇒ FFI::Pointer(PassManagerRef)

Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.

Parameters:

  • mp (FFI::Pointer(ModuleProviderRef))

Returns:

  • (FFI::Pointer(PassManagerRef))


5326
# File 'lib/llvm/core_ffi.rb', line 5326

attach_function :create_function_pass_manager, :LLVMCreateFunctionPassManager, [:pointer], :pointer

.create_function_pass_manager_for_module(m) ⇒ FFI::Pointer(PassManagerRef)

Constructs a new function-by-function pass pipeline over the module

provider. It does not take ownership of the module provider. This type of
pipeline is suitable for code generation and JIT compilation tasks.
@see llvm::FunctionPassManager::FunctionPassManager

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(PassManagerRef))


5318
# File 'lib/llvm/core_ffi.rb', line 5318

attach_function :create_function_pass_manager_for_module, :LLVMCreateFunctionPassManagerForModule, [:pointer], :pointer

.create_generic_value_of_float(ty, n) ⇒ OpaqueGenericValue

(Not documented)

Parameters:

  • ty (FFI::Pointer(TypeRef))
  • n (Float)

Returns:



87
# File 'lib/llvm/execution_engine_ffi.rb', line 87

attach_function :create_generic_value_of_float, :LLVMCreateGenericValueOfFloat, [:pointer, :double], OpaqueGenericValue

.create_generic_value_of_int(ty, n, is_signed) ⇒ OpaqueGenericValue

– Operations on generic values ————————————–===

Parameters:

  • ty (FFI::Pointer(TypeRef))
  • n (Integer)
  • is_signed (Integer)

Returns:



70
# File 'lib/llvm/execution_engine_ffi.rb', line 70

attach_function :create_generic_value_of_int, :LLVMCreateGenericValueOfInt, [:pointer, :ulong_long, :int], OpaqueGenericValue

.create_generic_value_of_pointer(p) ⇒ OpaqueGenericValue

(Not documented)

Parameters:

  • p (FFI::Pointer(*Void))

Returns:



78
# File 'lib/llvm/execution_engine_ffi.rb', line 78

attach_function :create_generic_value_of_pointer, :LLVMCreateGenericValueOfPointer, [:pointer], OpaqueGenericValue

.create_interpreter_for_module(out_interp, m, out_error) ⇒ Integer

(Not documented)

Parameters:

  • out_interp (FFI::Pointer(*ExecutionEngineRef))
  • m (FFI::Pointer(ModuleRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


149
# File 'lib/llvm/execution_engine_ffi.rb', line 149

attach_function :create_interpreter_for_module, :LLVMCreateInterpreterForModule, [:pointer, :pointer, :pointer], :int

.create_jit_compiler_for_module(out_jit, m, opt_level, out_error) ⇒ Integer

(Not documented)

Parameters:

  • out_jit (FFI::Pointer(*ExecutionEngineRef))
  • m (FFI::Pointer(ModuleRef))
  • opt_level (Integer)
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


160
# File 'lib/llvm/execution_engine_ffi.rb', line 160

attach_function :create_jit_compiler_for_module, :LLVMCreateJITCompilerForModule, [:pointer, :pointer, :uint, :pointer], :int

.create_mcjit_compiler_for_module(out_jit, m, options, size_of_options, out_error) ⇒ Integer

Create an MCJIT execution engine for a module, with the given options. It is the responsibility of the caller to ensure that all fields in Options up to the given SizeOfOptions are initialized. It is correct to pass a smaller value of SizeOfOptions that omits some fields. The canonical way of using this is:

LLVMMCJITCompilerOptions options; LLVMInitializeMCJITCompilerOptions(&options, sizeof(options)); … fill in those options you care about LLVMCreateMCJITCompilerForModule(&jit, mod, &options, sizeof(options),

&error);

Note that this is also correct, though possibly suboptimal:

LLVMCreateMCJITCompilerForModule(&jit, mod, 0, 0, &error);

Parameters:

  • out_jit (FFI::Pointer(*ExecutionEngineRef))
  • m (FFI::Pointer(ModuleRef))
  • options (MCJITCompilerOptions)
  • size_of_options (Integer)
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


195
# File 'lib/llvm/execution_engine_ffi.rb', line 195

attach_function :create_mcjit_compiler_for_module, :LLVMCreateMCJITCompilerForModule, [:pointer, :pointer, MCJITCompilerOptions, :ulong, :pointer], :int

.create_memory_buffer_with_contents_of_file(path, out_mem_buf, out_message) ⇒ Integer

@{

Parameters:

  • path (String)
  • out_mem_buf (FFI::Pointer(*MemoryBufferRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


5244
# File 'lib/llvm/core_ffi.rb', line 5244

attach_function :create_memory_buffer_with_contents_of_file, :LLVMCreateMemoryBufferWithContentsOfFile, [:string, :pointer, :pointer], :int

.create_memory_buffer_with_memory_range(input_data, input_data_length, buffer_name, requires_null_terminator) ⇒ FFI::Pointer(MemoryBufferRef)

(Not documented)

Parameters:

  • input_data (String)
  • input_data_length (Integer)
  • buffer_name (String)
  • requires_null_terminator (Integer)

Returns:

  • (FFI::Pointer(MemoryBufferRef))


5264
# File 'lib/llvm/core_ffi.rb', line 5264

attach_function :create_memory_buffer_with_memory_range, :LLVMCreateMemoryBufferWithMemoryRange, [:string, :ulong, :string, :int], :pointer

.create_memory_buffer_with_memory_range_copy(input_data, input_data_length, buffer_name) ⇒ FFI::Pointer(MemoryBufferRef)

(Not documented)

Parameters:

  • input_data (String)
  • input_data_length (Integer)
  • buffer_name (String)

Returns:

  • (FFI::Pointer(MemoryBufferRef))


5274
# File 'lib/llvm/core_ffi.rb', line 5274

attach_function :create_memory_buffer_with_memory_range_copy, :LLVMCreateMemoryBufferWithMemoryRangeCopy, [:string, :ulong, :string], :pointer

.create_memory_buffer_with_stdin(out_mem_buf, out_message) ⇒ Integer

(Not documented)

Parameters:

  • out_mem_buf (FFI::Pointer(*MemoryBufferRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


5253
# File 'lib/llvm/core_ffi.rb', line 5253

attach_function :create_memory_buffer_with_stdin, :LLVMCreateMemoryBufferWithSTDIN, [:pointer, :pointer], :int

.create_message(message) ⇒ String

– Error handling —————————————————-===

Parameters:

  • message (String)

Returns:

  • (String)


782
# File 'lib/llvm/core_ffi.rb', line 782

attach_function :create_message, :LLVMCreateMessage, [:string], :string

.create_module_provider_for_existing_module(m) ⇒ FFI::Pointer(ModuleProviderRef)

Changes the type of M so it can be passed to FunctionPassManagers and the JIT. They take ModuleProviders for historical reasons.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ModuleProviderRef))


5224
# File 'lib/llvm/core_ffi.rb', line 5224

attach_function :create_module_provider_for_existing_module, :LLVMCreateModuleProviderForExistingModule, [:pointer], :pointer

.create_pass_managerFFI::Pointer(PassManagerRef)

Constructs a new whole-module pass pipeline. This type of pipeline is

suitable for link-time optimization and whole-module transformations.
@see llvm::PassManager::PassManager

Returns:

  • (FFI::Pointer(PassManagerRef))


5307
# File 'lib/llvm/core_ffi.rb', line 5307

attach_function :create_pass_manager, :LLVMCreatePassManager, [], :pointer

.create_simple_mcjit_memory_manager(opaque, allocate_code_section, allocate_data_section, finalize_memory, destroy) ⇒ OpaqueMCJITMemoryManager

Create a simple custom MCJIT memory manager. This memory manager can intercept allocations in a module-oblivious way. This will return NULL if any of the passed functions are NULL.

Parameters:

Returns:



406
# File 'lib/llvm/execution_engine_ffi.rb', line 406

attach_function :create_simple_mcjit_memory_manager, :LLVMCreateSimpleMCJITMemoryManager, [:pointer, :memory_manager_allocate_code_section_callback, :memory_manager_allocate_data_section_callback, :memory_manager_finalize_memory_callback, :pointer], OpaqueMCJITMemoryManager

.create_target_data(string_rep) ⇒ OpaqueTargetData

(Not documented)

Parameters:

  • string_rep (String)

Returns:



130
# File 'lib/llvm/target_ffi.rb', line 130

attach_function :create_target_data, :LLVMCreateTargetData, [:string], OpaqueTargetData

.create_target_data_layout(t) ⇒ OpaqueTargetData

Create a DataLayout based on the targetMachine.

Parameters:

Returns:



549
# File 'lib/llvm/target_ffi.rb', line 549

attach_function :create_target_data_layout, :LLVMCreateTargetDataLayout, [OpaqueTargetMachine], OpaqueTargetData

.create_target_machine(t, triple, cpu, features, level, reloc, code_model) ⇒ OpaqueTargetMachine

Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine

Parameters:

Returns:



494
# File 'lib/llvm/target_ffi.rb', line 494

attach_function :create_target_machine, :LLVMCreateTargetMachine, [Target, :string, :string, :string, :code_gen_opt_level, :reloc_mode, :code_model], OpaqueTargetMachine

.delete_basic_block(bb) ⇒ nil

Remove a basic block from a function and delete it.

This deletes the basic block from its containing function and deletes the basic block itself.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::eraseFromParent()


3784
# File 'lib/llvm/core_ffi.rb', line 3784

attach_function :delete_basic_block, :LLVMDeleteBasicBlock, [:pointer], :void

.delete_function(fn) ⇒ nil

This group contains function that operate on global alias values.

@{

Remove a function from its containing module and deletes it.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::GlobalAlias
  • llvmllvm::Functionllvm::Function::eraseFromParent()


3313
# File 'lib/llvm/core_ffi.rb', line 3313

attach_function :delete_function, :LLVMDeleteFunction, [:pointer], :void

.delete_global(global_var) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (nil)


3226
# File 'lib/llvm/core_ffi.rb', line 3226

attach_function :delete_global, :LLVMDeleteGlobal, [:pointer], :void

.dispose_builder(builder) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))

Returns:

  • (nil)


4236
# File 'lib/llvm/core_ffi.rb', line 4236

attach_function :dispose_builder, :LLVMDisposeBuilder, [:pointer], :void

.dispose_execution_engine(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


203
# File 'lib/llvm/execution_engine_ffi.rb', line 203

attach_function :dispose_execution_engine, :LLVMDisposeExecutionEngine, [OpaqueExecutionEngine], :void

.dispose_generic_value(gen_val) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


129
# File 'lib/llvm/execution_engine_ffi.rb', line 129

attach_function :dispose_generic_value, :LLVMDisposeGenericValue, [OpaqueGenericValue], :void

.dispose_mcjit_memory_manager(mm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


414
# File 'lib/llvm/execution_engine_ffi.rb', line 414

attach_function :dispose_mcjit_memory_manager, :LLVMDisposeMCJITMemoryManager, [OpaqueMCJITMemoryManager], :void

.dispose_memory_buffer(mem_buf) ⇒ nil

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))

Returns:

  • (nil)


5298
# File 'lib/llvm/core_ffi.rb', line 5298

attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [:pointer], :void

.dispose_message(message) ⇒ nil

(Not documented)

Parameters:

  • message (String)

Returns:

  • (nil)


790
# File 'lib/llvm/core_ffi.rb', line 790

attach_function :dispose_message, :LLVMDisposeMessage, [:string], :void

.dispose_module(m) ⇒ nil

Destroy a module instance.

This must be called for every created module or memory will be leaked.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (nil)


955
# File 'lib/llvm/core_ffi.rb', line 955

attach_function :dispose_module, :LLVMDisposeModule, [:pointer], :void

.dispose_module_provider(m) ⇒ nil

Destroys the module M.

Parameters:

  • m (FFI::Pointer(ModuleProviderRef))

Returns:

  • (nil)


5232
# File 'lib/llvm/core_ffi.rb', line 5232

attach_function :dispose_module_provider, :LLVMDisposeModuleProvider, [:pointer], :void

.dispose_pass_manager(pm) ⇒ nil

Frees the memory of a pass pipeline. For function pipelines, does not free

the module provider.
@see llvm::PassManagerBase::~PassManagerBase.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)


5380
# File 'lib/llvm/core_ffi.rb', line 5380

attach_function :dispose_pass_manager, :LLVMDisposePassManager, [:pointer], :void

.dispose_target_data(td) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


138
# File 'lib/llvm/target_ffi.rb', line 138

attach_function :dispose_target_data, :LLVMDisposeTargetData, [OpaqueTargetData], :void

.dispose_target_machine(t) ⇒ nil

Dispose the LLVMTargetMachineRef instance generated by

LLVMCreateTargetMachine.

Parameters:

Returns:

  • (nil)


503
# File 'lib/llvm/target_ffi.rb', line 503

attach_function :dispose_target_machine, :LLVMDisposeTargetMachine, [OpaqueTargetMachine], :void

.double_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1411
# File 'lib/llvm/core_ffi.rb', line 1411

attach_function :double_type, :LLVMDoubleType, [], :pointer

.double_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 64-bit floating point type from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1363
# File 'lib/llvm/core_ffi.rb', line 1363

attach_function :double_type_in_context, :LLVMDoubleTypeInContext, [:pointer], :pointer

.dump_module(m) ⇒ nil

Dump a representation of a module to stderr.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (nil)

See Also:

  • Module::dump()


1007
# File 'lib/llvm/core_ffi.rb', line 1007

attach_function :dump_module, :LLVMDumpModule, [:pointer], :void

.dump_type(val) ⇒ nil

Dump a representation of a type to stderr.

Parameters:

  • val (FFI::Pointer(TypeRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Typellvm::Type::dump()


1212
# File 'lib/llvm/core_ffi.rb', line 1212

attach_function :dump_type, :LLVMDumpType, [:pointer], :void

.dump_value(val) ⇒ nil

Dump a representation of a value to stderr.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::dump()


1749
# File 'lib/llvm/core_ffi.rb', line 1749

attach_function :dump_value, :LLVMDumpValue, [:pointer], :void

.element_at_offset(td, struct_ty, offset) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


289
# File 'lib/llvm/target_ffi.rb', line 289

attach_function :element_at_offset, :LLVMElementAtOffset, [OpaqueTargetData, :pointer, :ulong_long], :uint

.finalize_function_pass_manager(fpm) ⇒ Integer

Finalizes all of the function passes scheduled in in the function pass

manager. Returns 1 if any of the passes modified the module, 0 otherwise.
@see llvm::FunctionPassManager::doFinalization

Parameters:

  • fpm (FFI::Pointer(PassManagerRef))

Returns:

  • (Integer)


5370
# File 'lib/llvm/core_ffi.rb', line 5370

attach_function :finalize_function_pass_manager, :LLVMFinalizeFunctionPassManager, [:pointer], :int

.find_function(ee, name, out_fn) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


281
# File 'lib/llvm/execution_engine_ffi.rb', line 281

attach_function :find_function, :LLVMFindFunction, [OpaqueExecutionEngine, :string, :pointer], :int

.float_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1404
# File 'lib/llvm/core_ffi.rb', line 1404

attach_function :float_type, :LLVMFloatType, [], :pointer

.float_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 32-bit floating point type from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1355
# File 'lib/llvm/core_ffi.rb', line 1355

attach_function :float_type_in_context, :LLVMFloatTypeInContext, [:pointer], :pointer

.fp128_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1425
# File 'lib/llvm/core_ffi.rb', line 1425

attach_function :fp128_type, :LLVMFP128Type, [], :pointer

.fp128_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 128-bit floating point type (112-bit mantissa) from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1380
# File 'lib/llvm/core_ffi.rb', line 1380

attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [:pointer], :pointer

.free_machine_code_for_function(ee, f) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


251
# File 'lib/llvm/execution_engine_ffi.rb', line 251

attach_function :free_machine_code_for_function, :LLVMFreeMachineCodeForFunction, [OpaqueExecutionEngine, :pointer], :void

.function_type(return_type, param_types, param_count, is_var_arg) ⇒ FFI::Pointer(TypeRef)

Obtain a function type consisting of a specified signature.

The function is defined as a tuple of a return Type, a list of parameter types, and whether the function is variadic.

Parameters:

  • return_type (FFI::Pointer(TypeRef))
  • param_types (FFI::Pointer(*TypeRef))
  • param_count (Integer)
  • is_var_arg (Integer)

Returns:

  • (FFI::Pointer(TypeRef))


1446
# File 'lib/llvm/core_ffi.rb', line 1446

attach_function :function_type, :LLVMFunctionType, [:pointer, :pointer, :uint, :int], :pointer

.generic_value_int_width(gen_val_ref) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


95
# File 'lib/llvm/execution_engine_ffi.rb', line 95

attach_function :generic_value_int_width, :LLVMGenericValueIntWidth, [OpaqueGenericValue], :uint

.generic_value_to_float(ty_ref, gen_val) ⇒ Float

(Not documented)

Parameters:

Returns:



121
# File 'lib/llvm/execution_engine_ffi.rb', line 121

attach_function :generic_value_to_float, :LLVMGenericValueToFloat, [:pointer, OpaqueGenericValue], :double

.generic_value_to_int(gen_val, is_signed) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


104
# File 'lib/llvm/execution_engine_ffi.rb', line 104

attach_function :generic_value_to_int, :LLVMGenericValueToInt, [OpaqueGenericValue, :int], :ulong_long

.generic_value_to_pointer(gen_val) ⇒ FFI::Pointer(*Void)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


112
# File 'lib/llvm/execution_engine_ffi.rb', line 112

attach_function :generic_value_to_pointer, :LLVMGenericValueToPointer, [OpaqueGenericValue], :pointer

.get_alignment(v) ⇒ Integer

Obtain the preferred alignment of the value.

Parameters:

  • v (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::AllocaInstllvm::AllocaInst::getAlignment()
  • llvmllvm::LoadInstllvm::LoadInst::getAlignment()
  • llvmllvm::StoreInstllvm::StoreInst::getAlignment()
  • llvmllvm::GlobalValuellvm::GlobalValue::getAlignment()


3137
# File 'lib/llvm/core_ffi.rb', line 3137

attach_function :get_alignment, :LLVMGetAlignment, [:pointer], :uint

.get_array_length(array_ty) ⇒ Integer

Obtain the length of an array type.

This only works on types that represent arrays.

Parameters:

  • array_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::ArrayTypellvm::ArrayType::getNumElements()


1624
# File 'lib/llvm/core_ffi.rb', line 1624

attach_function :get_array_length, :LLVMGetArrayLength, [:pointer], :uint

.get_as_string(c, out) ⇒ String

Get the given constant data sequential as a string.

Parameters:

  • c (FFI::Pointer(ValueRef))
  • out (FFI::Pointer(*SizeT))

Returns:

  • (String)

See Also:

  • ConstantDataSequential::getAsString()


2705
# File 'lib/llvm/core_ffi.rb', line 2705

attach_function :get_as_string, :LLVMGetAsString, [:pointer, :pointer], :string

.get_basic_block_parent(bb) ⇒ FFI::Pointer(ValueRef)

Obtain the function to which a basic block belongs.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::getParent()


3632
# File 'lib/llvm/core_ffi.rb', line 3632

attach_function :get_basic_block_parent, :LLVMGetBasicBlockParent, [:pointer], :pointer

.get_basic_block_terminator(bb) ⇒ FFI::Pointer(ValueRef)

Obtain the terminator instruction for a basic block.

If the basic block does not have a terminator (it is not well-formed if it doesn’t), then NULL is returned.

The returned LLVMValueRef corresponds to a llvm::TerminatorInst.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::getTerminator()


3647
# File 'lib/llvm/core_ffi.rb', line 3647

attach_function :get_basic_block_terminator, :LLVMGetBasicBlockTerminator, [:pointer], :pointer

.get_basic_blocks(fn, basic_blocks) ⇒ nil

Obtain all of the basic blocks in a function.

This operates on a function value. The BasicBlocks parameter is a pointer to a pre-allocated array of LLVMBasicBlockRef of at least LLVMCountBasicBlocks() in length. This array is populated with LLVMBasicBlockRef instances.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • basic_blocks (FFI::Pointer(*BasicBlockRef))

Returns:

  • (nil)


3671
# File 'lib/llvm/core_ffi.rb', line 3671

attach_function :get_basic_blocks, :LLVMGetBasicBlocks, [:pointer, :pointer], :void

.get_bitcode_module(mem_buf, out_m, out_message) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


78
# File 'lib/llvm/core/bitcode_ffi.rb', line 78

attach_function :get_bitcode_module, :LLVMGetBitcodeModule, [:pointer, :pointer, :pointer], :int

.get_bitcode_module2(mem_buf, out_m) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))

Returns:

  • (Integer)


87
# File 'lib/llvm/core/bitcode_ffi.rb', line 87

attach_function :get_bitcode_module2, :LLVMGetBitcodeModule2, [:pointer, :pointer], :int

.get_bitcode_module_in_context(context_ref, mem_buf, out_m, out_message) ⇒ Integer

(Not documented)

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


58
# File 'lib/llvm/core/bitcode_ffi.rb', line 58

attach_function :get_bitcode_module_in_context, :LLVMGetBitcodeModuleInContext, [:pointer, :pointer, :pointer, :pointer], :int

.get_bitcode_module_in_context2(context_ref, mem_buf, out_m) ⇒ Integer

(Not documented)

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))

Returns:

  • (Integer)


68
# File 'lib/llvm/core/bitcode_ffi.rb', line 68

attach_function :get_bitcode_module_in_context2, :LLVMGetBitcodeModuleInContext2, [:pointer, :pointer, :pointer], :int

.get_buffer_size(mem_buf) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))

Returns:

  • (Integer)


5290
# File 'lib/llvm/core_ffi.rb', line 5290

attach_function :get_buffer_size, :LLVMGetBufferSize, [:pointer], :ulong

.get_buffer_start(mem_buf) ⇒ String

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))

Returns:

  • (String)


5282
# File 'lib/llvm/core_ffi.rb', line 5282

attach_function :get_buffer_start, :LLVMGetBufferStart, [:pointer], :string

.get_condition(branch) ⇒ FFI::Pointer(ValueRef)

Return the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

Parameters:

  • branch (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::BranchInstllvm::BranchInst::getCondition


4083
# File 'lib/llvm/core_ffi.rb', line 4083

attach_function :get_condition, :LLVMGetCondition, [:pointer], :pointer

.get_const_opcode(constant_val) ⇒ Symbol from _enum_opcode_

Functions in this group correspond to APIs on llvm::ConstantExpr.

@{

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

See Also:

  • llvm::ConstantExpr.


2793
# File 'lib/llvm/core_ffi.rb', line 2793

attach_function :get_const_opcode, :LLVMGetConstOpcode, [:pointer], :opcode

.get_current_debug_location(builder) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))

Returns:

  • (FFI::Pointer(ValueRef))


4253
# File 'lib/llvm/core_ffi.rb', line 4253

attach_function :get_current_debug_location, :LLVMGetCurrentDebugLocation, [:pointer], :pointer

.get_data_layout(m) ⇒ String

Obtain the data layout for a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (String)

See Also:

  • Module::getDataLayout()


965
# File 'lib/llvm/core_ffi.rb', line 965

attach_function :get_data_layout, :LLVMGetDataLayout, [:pointer], :string

.get_default_target_tripleString

Get a triple for the host machine as a string. The result needs to be

disposed with LLVMDisposeMessage.

Returns:

  • (String)


592
# File 'lib/llvm/target_ffi.rb', line 592

attach_function :get_default_target_triple, :LLVMGetDefaultTargetTriple, [], :string

.get_diag_info_description(di) ⇒ String

Return a string representation of the DiagnosticInfo. Use LLVMDisposeMessage to free the string.

Parameters:

  • di (FFI::Pointer(DiagnosticInfoRef))

Returns:

  • (String)

See Also:

  • DiagnosticInfo::print()


881
# File 'lib/llvm/core_ffi.rb', line 881

attach_function :get_diag_info_description, :LLVMGetDiagInfoDescription, [:pointer], :string

.get_diag_info_severity(di) ⇒ Symbol from _enum_diagnostic_severity_

Return an enum LLVMDiagnosticSeverity.

Parameters:

  • di (FFI::Pointer(DiagnosticInfoRef))

Returns:

See Also:

  • DiagnosticInfo::getSeverity()


891
# File 'lib/llvm/core_ffi.rb', line 891

attach_function :get_diag_info_severity, :LLVMGetDiagInfoSeverity, [:pointer], :diagnostic_severity

.get_dll_storage_class(global) ⇒ Symbol from _enum_dll_storage_class_

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:



3099
# File 'lib/llvm/core_ffi.rb', line 3099

attach_function :get_dll_storage_class, :LLVMGetDLLStorageClass, [:pointer], :dll_storage_class

.get_element_as_constant(c, idx) ⇒ FFI::Pointer(ValueRef)

Get an element at specified index as a constant.

Parameters:

  • c (FFI::Pointer(ValueRef))
  • idx (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • ConstantDataSequential::getElementAsConstant()


2768
# File 'lib/llvm/core_ffi.rb', line 2768

attach_function :get_element_as_constant, :LLVMGetElementAsConstant, [:pointer, :uint], :pointer

.get_element_type(ty) ⇒ FFI::Pointer(TypeRef)

Obtain the type of elements within a sequential type.

This works on array, vector, and pointer types.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::SequentialTypellvm::SequentialType::getElementType()


1598
# File 'lib/llvm/core_ffi.rb', line 1598

attach_function :get_element_type, :LLVMGetElementType, [:pointer], :pointer

.get_entry_basic_block(fn) ⇒ FFI::Pointer(BasicBlockRef)

Obtain the basic block that corresponds to the entry point of a function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::Functionllvm::Function::getEntryBlock()


3721
# File 'lib/llvm/core_ffi.rb', line 3721

attach_function :get_entry_basic_block, :LLVMGetEntryBasicBlock, [:pointer], :pointer

.get_execution_engine_target_data(ee) ⇒ FFI::Pointer(TargetDataRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TargetDataRef))


298
# File 'lib/llvm/execution_engine_ffi.rb', line 298

attach_function :get_execution_engine_target_data, :LLVMGetExecutionEngineTargetData, [OpaqueExecutionEngine], :pointer

.get_execution_engine_target_machine(ee) ⇒ FFI::Pointer(TargetMachineRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TargetMachineRef))


306
# File 'lib/llvm/execution_engine_ffi.rb', line 306

attach_function :get_execution_engine_target_machine, :LLVMGetExecutionEngineTargetMachine, [OpaqueExecutionEngine], :pointer

.get_f_cmp_predicate(inst) ⇒ Symbol from _enum_real_predicate_

Obtain the float predicate of an instruction.

This is only valid for instructions that correspond to llvm::FCmpInst or llvm::ConstantExpr whose opcode is llvm::Instruction::FCmp.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

See Also:

  • llvmllvm::FCmpInstllvm::FCmpInst::getPredicate()


3950
# File 'lib/llvm/core_ffi.rb', line 3950

attach_function :get_f_cmp_predicate, :LLVMGetFCmpPredicate, [:pointer], :real_predicate

.get_first_basic_block(fn) ⇒ FFI::Pointer(BasicBlockRef)

Obtain the first basic block in a function.

The returned basic block can be used as an iterator. You will likely eventually call into LLVMGetNextBasicBlock() with it.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::Functionllvm::Function::begin()


3684
# File 'lib/llvm/core_ffi.rb', line 3684

attach_function :get_first_basic_block, :LLVMGetFirstBasicBlock, [:pointer], :pointer

.get_first_function(m) ⇒ FFI::Pointer(ValueRef)

Obtain an iterator to the first Function in a Module.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Modulellvm::Module::begin()


1138
# File 'lib/llvm/core_ffi.rb', line 1138

attach_function :get_first_function, :LLVMGetFirstFunction, [:pointer], :pointer

.get_first_global(m) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ValueRef))


3194
# File 'lib/llvm/core_ffi.rb', line 3194

attach_function :get_first_global, :LLVMGetFirstGlobal, [:pointer], :pointer

.get_first_instruction(bb) ⇒ FFI::Pointer(ValueRef)

Obtain the first instruction in a basic block.

The returned LLVMValueRef corresponds to a llvm::Instruction instance.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


3830
# File 'lib/llvm/core_ffi.rb', line 3830

attach_function :get_first_instruction, :LLVMGetFirstInstruction, [:pointer], :pointer

.get_first_param(fn) ⇒ FFI::Pointer(ValueRef)

Obtain the first parameter to a function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


3467
# File 'lib/llvm/core_ffi.rb', line 3467

attach_function :get_first_param, :LLVMGetFirstParam, [:pointer], :pointer

.get_first_targetTarget

Returns the first llvm::Target in the registered targets list.

Returns:



411
# File 'lib/llvm/target_ffi.rb', line 411

attach_function :get_first_target, :LLVMGetFirstTarget, [], Target

.get_first_use(val) ⇒ FFI::Pointer(UseRef)

Obtain the first use of a value.

Uses are obtained in an iterator fashion. First, call this function to obtain a reference to the first use. Then, call LLVMGetNextUse() on that instance and all subsequently obtained instances until LLVMGetNextUse() returns NULL.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(UseRef))

See Also:

  • llvmllvm::Valuellvm::Value::use_begin()


2426
# File 'lib/llvm/core_ffi.rb', line 2426

attach_function :get_first_use, :LLVMGetFirstUse, [:pointer], :pointer

.get_function_address(ee, name) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


343
# File 'lib/llvm/execution_engine_ffi.rb', line 343

attach_function :get_function_address, :LLVMGetFunctionAddress, [OpaqueExecutionEngine, :string], :ulong

.get_function_call_conv(fn) ⇒ Integer

Obtain the calling function of a function.

The returned value corresponds to the LLVMCallConv enumeration.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Functionllvm::Function::getCallingConv()


3356
# File 'lib/llvm/core_ffi.rb', line 3356

attach_function :get_function_call_conv, :LLVMGetFunctionCallConv, [:pointer], :uint

.get_gc(fn) ⇒ String

Obtain the name of the garbage collector to use during code generation.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (String)

See Also:

  • llvmllvm::Functionllvm::Function::getGC()


3381
# File 'lib/llvm/core_ffi.rb', line 3381

attach_function :get_gc, :LLVMGetGC, [:pointer], :string

.get_global_contextFFI::Pointer(ContextRef)

Obtain the global context instance.

Returns:

  • (FFI::Pointer(ContextRef))


837
# File 'lib/llvm/core_ffi.rb', line 837

attach_function :get_global_context, :LLVMGetGlobalContext, [], :pointer

.get_global_parent(global) ⇒ FFI::Pointer(ModuleRef)

This group contains functions that operate on global values. Functions in this group relate to functions in the llvm::GlobalValue class tree.

@{

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ModuleRef))

See Also:

  • llvmllvm::GlobalValue


3032
# File 'lib/llvm/core_ffi.rb', line 3032

attach_function :get_global_parent, :LLVMGetGlobalParent, [:pointer], :pointer

.get_global_value_address(ee, name) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


334
# File 'lib/llvm/execution_engine_ffi.rb', line 334

attach_function :get_global_value_address, :LLVMGetGlobalValueAddress, [OpaqueExecutionEngine, :string], :ulong

.get_i_cmp_predicate(inst) ⇒ Symbol from _enum_int_predicate_

Obtain the predicate of an instruction.

This is only valid for instructions that correspond to llvm::ICmpInst or llvm::ConstantExpr whose opcode is llvm::Instruction::ICmp.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

See Also:

  • llvmllvm::ICmpInstllvm::ICmpInst::getPredicate()


3937
# File 'lib/llvm/core_ffi.rb', line 3937

attach_function :get_i_cmp_predicate, :LLVMGetICmpPredicate, [:pointer], :int_predicate

.get_incoming_block(phi_node, index) ⇒ FFI::Pointer(BasicBlockRef)

Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.

Parameters:

  • phi_node (FFI::Pointer(ValueRef))
  • index (Integer)

Returns:

  • (FFI::Pointer(BasicBlockRef))


4145
# File 'lib/llvm/core_ffi.rb', line 4145

attach_function :get_incoming_block, :LLVMGetIncomingBlock, [:pointer, :uint], :pointer

.get_incoming_value(phi_node, index) ⇒ FFI::Pointer(ValueRef)

Obtain an incoming value to a PHI node as an LLVMValueRef.

Parameters:

  • phi_node (FFI::Pointer(ValueRef))
  • index (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


4136
# File 'lib/llvm/core_ffi.rb', line 4136

attach_function :get_incoming_value, :LLVMGetIncomingValue, [:pointer, :uint], :pointer

.get_initializer(global_var) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3234
# File 'lib/llvm/core_ffi.rb', line 3234

attach_function :get_initializer, :LLVMGetInitializer, [:pointer], :pointer

.get_insert_block(builder) ⇒ FFI::Pointer(BasicBlockRef)

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))


4201
# File 'lib/llvm/core_ffi.rb', line 4201

attach_function :get_insert_block, :LLVMGetInsertBlock, [:pointer], :pointer

.get_instruction_call_conv(instr) ⇒ Integer

Obtain the calling convention for a call instruction.

This is the opposite of LLVMSetInstructionCallConv(). Reads its usage.

Parameters:

  • instr (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • LLVMSetInstructionCallConv()


3991
# File 'lib/llvm/core_ffi.rb', line 3991

attach_function :get_instruction_call_conv, :LLVMGetInstructionCallConv, [:pointer], :uint

.get_instruction_opcode(inst) ⇒ Symbol from _enum_opcode_

Obtain the code opcode for an individual instruction.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

See Also:

  • llvmllvm::Instructionllvm::Instruction::getOpCode()


3924
# File 'lib/llvm/core_ffi.rb', line 3924

attach_function :get_instruction_opcode, :LLVMGetInstructionOpcode, [:pointer], :opcode

.get_instruction_parent(inst) ⇒ FFI::Pointer(BasicBlockRef)

Obtain the basic block to which an instruction belongs.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::Instructionllvm::Instruction::getParent()


3877
# File 'lib/llvm/core_ffi.rb', line 3877

attach_function :get_instruction_parent, :LLVMGetInstructionParent, [:pointer], :pointer

.get_int_type_width(integer_ty) ⇒ Integer

(Not documented)

Parameters:

  • integer_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)


1339
# File 'lib/llvm/core_ffi.rb', line 1339

attach_function :get_int_type_width, :LLVMGetIntTypeWidth, [:pointer], :uint

.get_intrinsic_id(fn) ⇒ Integer

Obtain the ID number from a function instance.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Functionllvm::Function::getIntrinsicID()


3344
# File 'lib/llvm/core_ffi.rb', line 3344

attach_function :get_intrinsic_id, :LLVMGetIntrinsicID, [:pointer], :uint

.get_last_basic_block(fn) ⇒ FFI::Pointer(BasicBlockRef)

Obtain the last basic block in a function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::Functionllvm::Function::end()


3694
# File 'lib/llvm/core_ffi.rb', line 3694

attach_function :get_last_basic_block, :LLVMGetLastBasicBlock, [:pointer], :pointer

.get_last_function(m) ⇒ FFI::Pointer(ValueRef)

Obtain an iterator to the last Function in a Module.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Modulellvm::Module::end()


1148
# File 'lib/llvm/core_ffi.rb', line 1148

attach_function :get_last_function, :LLVMGetLastFunction, [:pointer], :pointer

.get_last_global(m) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ValueRef))


3202
# File 'lib/llvm/core_ffi.rb', line 3202

attach_function :get_last_global, :LLVMGetLastGlobal, [:pointer], :pointer

.get_last_instruction(bb) ⇒ FFI::Pointer(ValueRef)

Obtain the last instruction in a basic block.

The returned LLVMValueRef corresponds to an LLVM:Instruction.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(ValueRef))


3840
# File 'lib/llvm/core_ffi.rb', line 3840

attach_function :get_last_instruction, :LLVMGetLastInstruction, [:pointer], :pointer

.get_last_param(fn) ⇒ FFI::Pointer(ValueRef)

Obtain the last parameter to a function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Functionllvm::Function::arg_end()


3477
# File 'lib/llvm/core_ffi.rb', line 3477

attach_function :get_last_param, :LLVMGetLastParam, [:pointer], :pointer

.get_linkage(global) ⇒ Symbol from _enum_linkage_

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:



3048
# File 'lib/llvm/core_ffi.rb', line 3048

attach_function :get_linkage, :LLVMGetLinkage, [:pointer], :linkage

.get_md_kind_id(name, s_len) ⇒ Integer

(Not documented)

Parameters:

  • name (String)
  • s_len (Integer)

Returns:

  • (Integer)


910
# File 'lib/llvm/core_ffi.rb', line 910

attach_function :get_md_kind_id, :LLVMGetMDKindID, [:string, :uint], :uint

.get_md_kind_id_in_context(c, name, s_len) ⇒ Integer

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))
  • name (String)
  • s_len (Integer)

Returns:

  • (Integer)


901
# File 'lib/llvm/core_ffi.rb', line 901

attach_function :get_md_kind_id_in_context, :LLVMGetMDKindIDInContext, [:pointer, :string, :uint], :uint

.get_md_node_num_operands(v) ⇒ Object

Obtain the number of operands from an MDNode value.

Parameters:

  • V

    MDNode to get number of operands from.

  • v (FFI::Pointer(ValueRef))

Returns:

  • Number of operands of the MDNode.

  • (Integer)


3581
# File 'lib/llvm/core_ffi.rb', line 3581

attach_function :get_md_node_num_operands, :LLVMGetMDNodeNumOperands, [:pointer], :uint

.get_md_node_operands(v, dest) ⇒ nil

Obtain the given MDNode’s operands.

The passed LLVMValueRef pointer should point to enough memory to hold all of the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the MDNode’s operands.

Parameters:

  • V

    MDNode to get the operands from.

  • Dest

    Destination array for operands.

  • v (FFI::Pointer(ValueRef))
  • dest (FFI::Pointer(*ValueRef))

Returns:

  • (nil)


3598
# File 'lib/llvm/core_ffi.rb', line 3598

attach_function :get_md_node_operands, :LLVMGetMDNodeOperands, [:pointer, :pointer], :void

.get_md_string(v, len) ⇒ Object

Obtain the underlying string from a MDString value.

Parameters:

  • V

    Instance to obtain string from.

  • Len

    Memory address which will hold length of returned string.

  • v (FFI::Pointer(ValueRef))
  • len (FFI::Pointer(*UInt))

Returns:

  • String data in MDString.

  • (String)


3570
# File 'lib/llvm/core_ffi.rb', line 3570

attach_function :get_md_string, :LLVMGetMDString, [:pointer, :pointer], :string

.get_metadata(val, kind_id) ⇒ FFI::Pointer(ValueRef)

Return metadata associated with an instruction value.

Parameters:

  • val (FFI::Pointer(ValueRef))
  • kind_id (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3857
# File 'lib/llvm/core_ffi.rb', line 3857

attach_function :get_metadata, :LLVMGetMetadata, [:pointer, :uint], :pointer

.get_module_context(m) ⇒ FFI::Pointer(ContextRef)

Obtain the context to which this module is associated.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(ContextRef))

See Also:

  • Module::getContext()


1052
# File 'lib/llvm/core_ffi.rb', line 1052

attach_function :get_module_context, :LLVMGetModuleContext, [:pointer], :pointer

.get_module_data_layout(m) ⇒ OpaqueTargetData

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:



113
# File 'lib/llvm/target_ffi.rb', line 113

attach_function :get_module_data_layout, :LLVMGetModuleDataLayout, [:pointer], OpaqueTargetData

.get_named_function(m, name) ⇒ FFI::Pointer(ValueRef)

Obtain a Function value from a Module by its name.

The returned value corresponds to a llvm::Function value.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Modulellvm::Module::getFunction()


1128
# File 'lib/llvm/core_ffi.rb', line 1128

attach_function :get_named_function, :LLVMGetNamedFunction, [:pointer, :string], :pointer

.get_named_global(m, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))


3186
# File 'lib/llvm/core_ffi.rb', line 3186

attach_function :get_named_global, :LLVMGetNamedGlobal, [:pointer, :string], :pointer

.get_named_metadata_num_operands(m, name) ⇒ Integer

Obtain the number of operands for named metadata in a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)

Returns:

  • (Integer)

See Also:

  • llvmllvm::Modulellvm::Module::getNamedMetadata()


1072
# File 'lib/llvm/core_ffi.rb', line 1072

attach_function :get_named_metadata_num_operands, :LLVMGetNamedMetadataNumOperands, [:pointer, :string], :uint

.get_named_metadata_operands(m, name, dest) ⇒ nil

Obtain the named metadata operands for a module.

The passed LLVMValueRef pointer should refer to an array of LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This array will be populated with the LLVMValueRef instances. Each instance corresponds to a llvm::MDNode.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)
  • dest (FFI::Pointer(*ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Modulellvm::Module::getNamedMetadata()
  • llvmllvm::MDNodellvm::MDNode::getOperand()


1090
# File 'lib/llvm/core_ffi.rb', line 1090

attach_function :get_named_metadata_operands, :LLVMGetNamedMetadataOperands, [:pointer, :string, :pointer], :void

.get_next_basic_block(bb) ⇒ FFI::Pointer(BasicBlockRef)

Advance a basic block iterator.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))


3702
# File 'lib/llvm/core_ffi.rb', line 3702

attach_function :get_next_basic_block, :LLVMGetNextBasicBlock, [:pointer], :pointer

.get_next_function(fn) ⇒ FFI::Pointer(ValueRef)

Advance a Function iterator to the next Function.

Returns NULL if the iterator was already at the end and there are no more functions.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1159
# File 'lib/llvm/core_ffi.rb', line 1159

attach_function :get_next_function, :LLVMGetNextFunction, [:pointer], :pointer

.get_next_global(global_var) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3210
# File 'lib/llvm/core_ffi.rb', line 3210

attach_function :get_next_global, :LLVMGetNextGlobal, [:pointer], :pointer

.get_next_instruction(inst) ⇒ FFI::Pointer(ValueRef)

Obtain the instruction that occurs after the one specified.

The next instruction will be from the same basic block.

If this is the last instruction in a basic block, NULL will be returned.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3890
# File 'lib/llvm/core_ffi.rb', line 3890

attach_function :get_next_instruction, :LLVMGetNextInstruction, [:pointer], :pointer

.get_next_param(arg) ⇒ FFI::Pointer(ValueRef)

Obtain the next parameter to a function.

This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is actually a wrapped iterator) and obtains the next parameter from the underlying iterator.

Parameters:

  • arg (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3489
# File 'lib/llvm/core_ffi.rb', line 3489

attach_function :get_next_param, :LLVMGetNextParam, [:pointer], :pointer

.get_next_target(t) ⇒ Target

Returns the next llvm::Target given a previous one (or null if there’s none)

Parameters:

Returns:



419
# File 'lib/llvm/target_ffi.rb', line 419

attach_function :get_next_target, :LLVMGetNextTarget, [Target], Target

.get_next_use(u) ⇒ FFI::Pointer(UseRef)

Obtain the next use of a value.

This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.

Parameters:

  • u (FFI::Pointer(UseRef))

Returns:

  • (FFI::Pointer(UseRef))


2437
# File 'lib/llvm/core_ffi.rb', line 2437

attach_function :get_next_use, :LLVMGetNextUse, [:pointer], :pointer

.get_num_operands(val) ⇒ Integer

Obtain the number of operands in a llvm::User value.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Userllvm::User::getNumOperands()


2503
# File 'lib/llvm/core_ffi.rb', line 2503

attach_function :get_num_operands, :LLVMGetNumOperands, [:pointer], :int

.get_num_successors(term) ⇒ Integer

Return the number of successors that this terminator has.

Parameters:

  • term (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::TerminatorInstllvm::TerminatorInst::getNumSuccessors


4036
# File 'lib/llvm/core_ffi.rb', line 4036

attach_function :get_num_successors, :LLVMGetNumSuccessors, [:pointer], :uint

.get_operand(val, index) ⇒ FFI::Pointer(ValueRef)

Obtain an operand at a specific index in a llvm::User value.

Parameters:

  • val (FFI::Pointer(ValueRef))
  • index (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Userllvm::User::getOperand()


2470
# File 'lib/llvm/core_ffi.rb', line 2470

attach_function :get_operand, :LLVMGetOperand, [:pointer, :uint], :pointer

.get_operand_use(val, index) ⇒ FFI::Pointer(UseRef)

Obtain the use of an operand at a specific index in a llvm::User value.

Parameters:

  • val (FFI::Pointer(ValueRef))
  • index (Integer)

Returns:

  • (FFI::Pointer(UseRef))

See Also:

  • llvmllvm::Userllvm::User::getOperandUse()


2481
# File 'lib/llvm/core_ffi.rb', line 2481

attach_function :get_operand_use, :LLVMGetOperandUse, [:pointer, :uint], :pointer

.get_ordering(memory_access_inst) ⇒ Symbol from _enum_atomic_ordering_

(Not documented)

Parameters:

  • memory_access_inst (FFI::Pointer(ValueRef))

Returns:



4839
# File 'lib/llvm/core_ffi.rb', line 4839

attach_function :get_ordering, :LLVMGetOrdering, [:pointer], :atomic_ordering

.get_param(fn, index) ⇒ FFI::Pointer(ValueRef)

Obtain the parameter at the specified index.

Parameters are indexed from 0.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • index (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


3443
# File 'lib/llvm/core_ffi.rb', line 3443

attach_function :get_param, :LLVMGetParam, [:pointer, :uint], :pointer

.get_param_parent(inst) ⇒ FFI::Pointer(ValueRef)

Obtain the function to which this argument belongs.

Unlike other functions in this group, this one takes an LLVMValueRef that corresponds to a llvm::Attribute.

The returned LLVMValueRef is the llvm::Function to which this argument belongs.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3457
# File 'lib/llvm/core_ffi.rb', line 3457

attach_function :get_param_parent, :LLVMGetParamParent, [:pointer], :pointer

.get_param_types(function_ty, dest) ⇒ nil

Obtain the types of a function’s parameters.

The Dest parameter should point to a pre-allocated array of LLVMTypeRef at least LLVMCountParamTypes() large. On return, the first LLVMCountParamTypes() entries in the array will be populated with LLVMTypeRef instances.

Parameters:

  • FunctionTy

    The function type to operate on.

  • Dest

    Memory address of an array to be filled with result.

  • function_ty (FFI::Pointer(TypeRef))
  • dest (FFI::Pointer(*TypeRef))

Returns:

  • (nil)


1487
# File 'lib/llvm/core_ffi.rb', line 1487

attach_function :get_param_types, :LLVMGetParamTypes, [:pointer, :pointer], :void

.get_params(fn, params) ⇒ nil

Obtain the parameters in a function.

The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long. This array will be filled with LLVMValueRef instances which correspond to the parameters the function receives. Each LLVMValueRef corresponds to a llvm::Argument instance.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • params (FFI::Pointer(*ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


3430
# File 'lib/llvm/core_ffi.rb', line 3430

attach_function :get_params, :LLVMGetParams, [:pointer, :pointer], :void

.get_personality_fn(fn) ⇒ FFI::Pointer(ValueRef)

Obtain the personality function attached to the function.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Functionllvm::Function::getPersonalityFn()


3323
# File 'lib/llvm/core_ffi.rb', line 3323

attach_function :get_personality_fn, :LLVMGetPersonalityFn, [:pointer], :pointer

.get_pointer_address_space(pointer_ty) ⇒ Integer

Obtain the address space of a pointer type.

This only works on types that represent pointers.

Parameters:

  • pointer_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::PointerTypellvm::PointerType::getAddressSpace()


1650
# File 'lib/llvm/core_ffi.rb', line 1650

attach_function :get_pointer_address_space, :LLVMGetPointerAddressSpace, [:pointer], :uint

.get_pointer_to_global(ee, global) ⇒ FFI::Pointer(*Void)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


325
# File 'lib/llvm/execution_engine_ffi.rb', line 325

attach_function :get_pointer_to_global, :LLVMGetPointerToGlobal, [OpaqueExecutionEngine, :pointer], :pointer

.get_previous_basic_block(bb) ⇒ FFI::Pointer(BasicBlockRef)

Go backwards in a basic block iterator.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))


3710
# File 'lib/llvm/core_ffi.rb', line 3710

attach_function :get_previous_basic_block, :LLVMGetPreviousBasicBlock, [:pointer], :pointer

.get_previous_function(fn) ⇒ FFI::Pointer(ValueRef)

Decrement a Function iterator to the previous Function.

Returns NULL if the iterator was already at the beginning and there are no previous functions.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1170
# File 'lib/llvm/core_ffi.rb', line 1170

attach_function :get_previous_function, :LLVMGetPreviousFunction, [:pointer], :pointer

.get_previous_global(global_var) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3218
# File 'lib/llvm/core_ffi.rb', line 3218

attach_function :get_previous_global, :LLVMGetPreviousGlobal, [:pointer], :pointer

.get_previous_instruction(inst) ⇒ FFI::Pointer(ValueRef)

Obtain the instruction that occurred before this one.

If the instruction is the first instruction in a basic block, NULL will be returned.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3901
# File 'lib/llvm/core_ffi.rb', line 3901

attach_function :get_previous_instruction, :LLVMGetPreviousInstruction, [:pointer], :pointer

.get_previous_param(arg) ⇒ FFI::Pointer(ValueRef)

Obtain the previous parameter to a function.

This is the opposite of LLVMGetNextParam().

Parameters:

  • arg (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


3499
# File 'lib/llvm/core_ffi.rb', line 3499

attach_function :get_previous_param, :LLVMGetPreviousParam, [:pointer], :pointer

.get_return_type(function_ty) ⇒ FFI::Pointer(TypeRef)

Obtain the Type this function Type returns.

Parameters:

  • function_ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(TypeRef))


1462
# File 'lib/llvm/core_ffi.rb', line 1462

attach_function :get_return_type, :LLVMGetReturnType, [:pointer], :pointer

.get_section(global) ⇒ String

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:

  • (String)


3065
# File 'lib/llvm/core_ffi.rb', line 3065

attach_function :get_section, :LLVMGetSection, [:pointer], :string

.get_struct_element_types(struct_ty, dest) ⇒ nil

Get the elements within a structure.

The function is passed the address of a pre-allocated array of LLVMTypeRef at least LLVMCountStructElementTypes() long. After invocation, this array will be populated with the structure’s elements. The objects in the destination array will have a lifetime of the structure type itself, which is the lifetime of the context it is contained in.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))
  • dest (FFI::Pointer(*TypeRef))

Returns:

  • (nil)


1575
# File 'lib/llvm/core_ffi.rb', line 1575

attach_function :get_struct_element_types, :LLVMGetStructElementTypes, [:pointer, :pointer], :void

.get_struct_name(ty) ⇒ String

Obtain the name of a structure.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (String)

See Also:

  • llvmllvm::StructTypellvm::StructType::getName()


1536
# File 'lib/llvm/core_ffi.rb', line 1536

attach_function :get_struct_name, :LLVMGetStructName, [:pointer], :string

.get_successor(term, i) ⇒ FFI::Pointer(BasicBlockRef)

Return the specified successor.

Parameters:

  • term (FFI::Pointer(ValueRef))
  • i (Integer)

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::TerminatorInstllvm::TerminatorInst::getSuccessor


4047
# File 'lib/llvm/core_ffi.rb', line 4047

attach_function :get_successor, :LLVMGetSuccessor, [:pointer, :uint], :pointer

.get_switch_default_dest(switch_instr) ⇒ FFI::Pointer(BasicBlockRef)

Obtain the default destination basic block of a switch instruction.

This only works on llvm::SwitchInst instructions.

Parameters:

  • switch_instr (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::SwitchInstllvm::SwitchInst::getDefaultDest()


4108
# File 'lib/llvm/core_ffi.rb', line 4108

attach_function :get_switch_default_dest, :LLVMGetSwitchDefaultDest, [:pointer], :pointer

.get_target(m) ⇒ String

Obtain the target triple for a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (String)

See Also:

  • Module::getTargetTriple()


986
# File 'lib/llvm/core_ffi.rb', line 986

attach_function :get_target, :LLVMGetTarget, [:pointer], :string

.get_target_description(t) ⇒ String

Returns the description of a target. See llvm::Target::getDescription

Parameters:

Returns:

  • (String)


456
# File 'lib/llvm/target_ffi.rb', line 456

attach_function :get_target_description, :LLVMGetTargetDescription, [Target], :string

.get_target_from_name(name) ⇒ Target

Finds the target corresponding to the given name and stores it in p T.

Returns 0 on success.

Parameters:

  • name (String)

Returns:



428
# File 'lib/llvm/target_ffi.rb', line 428

attach_function :get_target_from_name, :LLVMGetTargetFromName, [:string], Target

.get_target_from_triple(triple, t, error_message) ⇒ Integer

Finds the target corresponding to the given triple and stores it in p T.

Returns 0 on success. Optionally returns any error in ErrorMessage.
Use LLVMDisposeMessage to dispose the message.

Parameters:

  • triple (String)
  • t (FFI::Pointer(*TargetRef))
  • error_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


440
# File 'lib/llvm/target_ffi.rb', line 440

attach_function :get_target_from_triple, :LLVMGetTargetFromTriple, [:string, :pointer, :pointer], :int

.get_target_machine_cpu(t) ⇒ String

Returns the cpu used creating this target machine. See

llvm::TargetMachine::getCPU. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


531
# File 'lib/llvm/target_ffi.rb', line 531

attach_function :get_target_machine_cpu, :LLVMGetTargetMachineCPU, [OpaqueTargetMachine], :string

.get_target_machine_feature_string(t) ⇒ String

Returns the feature string used creating this target machine. See

llvm::TargetMachine::getFeatureString. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


541
# File 'lib/llvm/target_ffi.rb', line 541

attach_function :get_target_machine_feature_string, :LLVMGetTargetMachineFeatureString, [OpaqueTargetMachine], :string

.get_target_machine_target(t) ⇒ Target

Returns the Target used in a TargetMachine

Parameters:

Returns:



511
# File 'lib/llvm/target_ffi.rb', line 511

attach_function :get_target_machine_target, :LLVMGetTargetMachineTarget, [OpaqueTargetMachine], Target

.get_target_machine_triple(t) ⇒ String

Returns the triple used creating this target machine. See

llvm::TargetMachine::getTriple. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


521
# File 'lib/llvm/target_ffi.rb', line 521

attach_function :get_target_machine_triple, :LLVMGetTargetMachineTriple, [OpaqueTargetMachine], :string

.get_target_name(t) ⇒ String

Returns the name of a target. See llvm::Target::getName

Parameters:

Returns:

  • (String)


448
# File 'lib/llvm/target_ffi.rb', line 448

attach_function :get_target_name, :LLVMGetTargetName, [Target], :string

.get_thread_local_mode(global_var) ⇒ Symbol from _enum_thread_local_mode_

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:



3269
# File 'lib/llvm/core_ffi.rb', line 3269

attach_function :get_thread_local_mode, :LLVMGetThreadLocalMode, [:pointer], :thread_local_mode

.get_type_by_name(m, name) ⇒ FFI::Pointer(TypeRef)

Obtain a Type from a module by its registered name.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • name (String)

Returns:

  • (FFI::Pointer(TypeRef))


1061
# File 'lib/llvm/core_ffi.rb', line 1061

attach_function :get_type_by_name, :LLVMGetTypeByName, [:pointer, :string], :pointer

.get_type_context(ty) ⇒ FFI::Pointer(ContextRef)

Obtain the context to which this type instance is associated.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ContextRef))

See Also:

  • llvmllvm::Typellvm::Type::getContext()


1202
# File 'lib/llvm/core_ffi.rb', line 1202

attach_function :get_type_context, :LLVMGetTypeContext, [:pointer], :pointer

.get_type_kind(ty) ⇒ Symbol from _enum_type_kind_

Obtain the enumerated type of a Type instance.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

See Also:

  • llvm::Type:getTypeID()


1180
# File 'lib/llvm/core_ffi.rb', line 1180

attach_function :get_type_kind, :LLVMGetTypeKind, [:pointer], :type_kind

.get_undef(ty) ⇒ FFI::Pointer(ValueRef)

Obtain a constant value referring to an undefined value of a type.

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::UndefValuellvm::UndefValue::get()


2536
# File 'lib/llvm/core_ffi.rb', line 2536

attach_function :get_undef, :LLVMGetUndef, [:pointer], :pointer

.get_used_value(u) ⇒ FFI::Pointer(ValueRef)

Obtain the value this use corresponds to.

Parameters:

  • u (FFI::Pointer(UseRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvm::Use::get().


2459
# File 'lib/llvm/core_ffi.rb', line 2459

attach_function :get_used_value, :LLVMGetUsedValue, [:pointer], :pointer

.get_user(u) ⇒ FFI::Pointer(ValueRef)

Obtain the user value for a user.

The returned value corresponds to a llvm::User type.

Parameters:

  • u (FFI::Pointer(UseRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Usellvm::Use::getUser()


2449
# File 'lib/llvm/core_ffi.rb', line 2449

attach_function :get_user, :LLVMGetUser, [:pointer], :pointer

.get_value_name(val) ⇒ String

Obtain the string name of a value.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (String)

See Also:

  • llvmllvm::Valuellvm::Value::getName()


1728
# File 'lib/llvm/core_ffi.rb', line 1728

attach_function :get_value_name, :LLVMGetValueName, [:pointer], :string

.get_vector_size(vector_ty) ⇒ Integer

Obtain the number of elements in a vector type.

This only works on types that represent vectors.

Parameters:

  • vector_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::VectorTypellvm::VectorType::getNumElements()


1677
# File 'lib/llvm/core_ffi.rb', line 1677

attach_function :get_vector_size, :LLVMGetVectorSize, [:pointer], :uint

.get_visibility(global) ⇒ Symbol from _enum_visibility_

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:



3082
# File 'lib/llvm/core_ffi.rb', line 3082

attach_function :get_visibility, :LLVMGetVisibility, [:pointer], :visibility

.get_volatile(memory_access_inst) ⇒ Integer

(Not documented)

Parameters:

  • memory_access_inst (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


4822
# File 'lib/llvm/core_ffi.rb', line 4822

attach_function :get_volatile, :LLVMGetVolatile, [:pointer], :int

.half_typeFFI::Pointer(TypeRef)

Obtain a floating point type from the global context.

These map to the functions in this group of the same name.

Returns:

  • (FFI::Pointer(TypeRef))


1397
# File 'lib/llvm/core_ffi.rb', line 1397

attach_function :half_type, :LLVMHalfType, [], :pointer

.half_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 16-bit floating point type from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1347
# File 'lib/llvm/core_ffi.rb', line 1347

attach_function :half_type_in_context, :LLVMHalfTypeInContext, [:pointer], :pointer

.has_metadata(val) ⇒ Integer

Determine whether an instruction has any metadata attached.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3848
# File 'lib/llvm/core_ffi.rb', line 3848

attach_function :has_metadata, :LLVMHasMetadata, [:pointer], :int

.has_unnamed_addr(global) ⇒ Integer

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3116
# File 'lib/llvm/core_ffi.rb', line 3116

attach_function :has_unnamed_addr, :LLVMHasUnnamedAddr, [:pointer], :int

.initialize_all_asm_parsersnil

(Not documented)

attach_function :initialize_all_asm_parsers, :LLVMInitializeAllAsmParsers, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 65


.initialize_all_asm_printersnil

(Not documented)

attach_function :initialize_all_asm_printers, :LLVMInitializeAllAsmPrinters, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 58


.initialize_all_disassemblersnil

(Not documented)

attach_function :initialize_all_disassemblers, :LLVMInitializeAllDisassemblers, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 72


.initialize_all_target_infosnil

(Not documented)

attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 37


.initialize_all_target_m_csnil

(Not documented)

attach_function :initialize_all_target_m_cs, :LLVMInitializeAllTargetMCs, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 51


.initialize_all_targetsnil

(Not documented)

attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void

Returns:

  • (nil)


# File 'lib/llvm/target_ffi.rb', line 44


.initialize_function_pass_manager(fpm) ⇒ Integer

Initializes all of the function passes scheduled in the function pass

manager. Returns 1 if any of the passes modified the module, 0 otherwise.
@see llvm::FunctionPassManager::doInitialization

Parameters:

  • fpm (FFI::Pointer(PassManagerRef))

Returns:

  • (Integer)


5348
# File 'lib/llvm/core_ffi.rb', line 5348

attach_function :initialize_function_pass_manager, :LLVMInitializeFunctionPassManager, [:pointer], :int

.initialize_mcjit_compiler_options(options, size_of_options) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


169
# File 'lib/llvm/execution_engine_ffi.rb', line 169

attach_function :initialize_mcjit_compiler_options, :LLVMInitializeMCJITCompilerOptions, [MCJITCompilerOptions, :ulong], :void

.initialize_native_asm_parserInteger

(Not documented)

attach_function :initialize_native_asm_parser, :LLVMInitializeNativeAsmParser, [], :int

Returns:

  • (Integer)


# File 'lib/llvm/target_ffi.rb', line 86


.initialize_native_asm_printerInteger

(Not documented)

attach_function :initialize_native_asm_printer, :LLVMInitializeNativeAsmPrinter, [], :int

Returns:

  • (Integer)


# File 'lib/llvm/target_ffi.rb', line 93


.initialize_native_disassemblerInteger

(Not documented)

attach_function :initialize_native_disassembler, :LLVMInitializeNativeDisassembler, [], :int

Returns:

  • (Integer)


# File 'lib/llvm/target_ffi.rb', line 100


.initialize_native_targetInteger

(Not documented)

attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int

Returns:

  • (Integer)


# File 'lib/llvm/target_ffi.rb', line 79


.insert_basic_block(insert_before_bb, name) ⇒ FFI::Pointer(BasicBlockRef)

Insert a basic block in a function using the global context.

Parameters:

  • insert_before_bb (FFI::Pointer(BasicBlockRef))
  • name (String)

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::Create()


3771
# File 'lib/llvm/core_ffi.rb', line 3771

attach_function :insert_basic_block, :LLVMInsertBasicBlock, [:pointer, :string], :pointer

.insert_basic_block_in_context(c, bb, name) ⇒ FFI::Pointer(BasicBlockRef)

Insert a basic block in a function before another basic block.

The function to add to is determined by the function of the passed basic block.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • bb (FFI::Pointer(BasicBlockRef))
  • name (String)

Returns:

  • (FFI::Pointer(BasicBlockRef))

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::Create()


3760
# File 'lib/llvm/core_ffi.rb', line 3760

attach_function :insert_basic_block_in_context, :LLVMInsertBasicBlockInContext, [:pointer, :pointer, :string], :pointer

.insert_into_builder(builder, instr) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • instr (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4218
# File 'lib/llvm/core_ffi.rb', line 4218

attach_function :insert_into_builder, :LLVMInsertIntoBuilder, [:pointer, :pointer], :void

.insert_into_builder_with_name(builder, instr, name) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • instr (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (nil)


4228
# File 'lib/llvm/core_ffi.rb', line 4228

attach_function :insert_into_builder_with_name, :LLVMInsertIntoBuilderWithName, [:pointer, :pointer, :string], :void

.instruction_clone(inst) ⇒ FFI::Pointer(ValueRef)

Create a copy of ‘this’ instruction that is identical in all ways except the following:

* The instruction has no parent
* The instruction has no name

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::Instructionllvm::Instruction::clone()


3963
# File 'lib/llvm/core_ffi.rb', line 3963

attach_function :instruction_clone, :LLVMInstructionClone, [:pointer], :pointer

.instruction_erase_from_parent(inst) ⇒ nil

Remove and delete an instruction.

The instruction specified is removed from its containing building block and then deleted.

Parameters:

  • inst (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Instructionllvm::Instruction::eraseFromParent()


3914
# File 'lib/llvm/core_ffi.rb', line 3914

attach_function :instruction_erase_from_parent, :LLVMInstructionEraseFromParent, [:pointer], :void

.int128_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1323
# File 'lib/llvm/core_ffi.rb', line 1323

attach_function :int128_type, :LLVMInt128Type, [], :pointer

.int128_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1271
# File 'lib/llvm/core_ffi.rb', line 1271

attach_function :int128_type_in_context, :LLVMInt128TypeInContext, [:pointer], :pointer

.int16_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1302
# File 'lib/llvm/core_ffi.rb', line 1302

attach_function :int16_type, :LLVMInt16Type, [], :pointer

.int16_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1247
# File 'lib/llvm/core_ffi.rb', line 1247

attach_function :int16_type_in_context, :LLVMInt16TypeInContext, [:pointer], :pointer

.int1_typeFFI::Pointer(TypeRef)

Obtain an integer type from the global context with a specified bit width.

Returns:

  • (FFI::Pointer(TypeRef))


1288
# File 'lib/llvm/core_ffi.rb', line 1288

attach_function :int1_type, :LLVMInt1Type, [], :pointer

.int1_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain an integer type from a context with specified bit width.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1231
# File 'lib/llvm/core_ffi.rb', line 1231

attach_function :int1_type_in_context, :LLVMInt1TypeInContext, [:pointer], :pointer

.int32_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1309
# File 'lib/llvm/core_ffi.rb', line 1309

attach_function :int32_type, :LLVMInt32Type, [], :pointer

.int32_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1255
# File 'lib/llvm/core_ffi.rb', line 1255

attach_function :int32_type_in_context, :LLVMInt32TypeInContext, [:pointer], :pointer

.int64_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1316
# File 'lib/llvm/core_ffi.rb', line 1316

attach_function :int64_type, :LLVMInt64Type, [], :pointer

.int64_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1263
# File 'lib/llvm/core_ffi.rb', line 1263

attach_function :int64_type_in_context, :LLVMInt64TypeInContext, [:pointer], :pointer

.int8_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1295
# File 'lib/llvm/core_ffi.rb', line 1295

attach_function :int8_type, :LLVMInt8Type, [], :pointer

.int8_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1239
# File 'lib/llvm/core_ffi.rb', line 1239

attach_function :int8_type_in_context, :LLVMInt8TypeInContext, [:pointer], :pointer

.int_ptr_type(td) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


188
# File 'lib/llvm/target_ffi.rb', line 188

attach_function :int_ptr_type, :LLVMIntPtrType, [OpaqueTargetData], :pointer

.int_ptr_type_for_as(td, as) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


197
# File 'lib/llvm/target_ffi.rb', line 197

attach_function :int_ptr_type_for_as, :LLVMIntPtrTypeForAS, [OpaqueTargetData, :uint], :pointer

.int_ptr_type_for_as_in_context(c, td, as) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


216
# File 'lib/llvm/target_ffi.rb', line 216

attach_function :int_ptr_type_for_as_in_context, :LLVMIntPtrTypeForASInContext, [:pointer, OpaqueTargetData, :uint], :pointer

.int_ptr_type_in_context(c, td) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


206
# File 'lib/llvm/target_ffi.rb', line 206

attach_function :int_ptr_type_in_context, :LLVMIntPtrTypeInContext, [:pointer, OpaqueTargetData], :pointer

.int_type(num_bits) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • num_bits (Integer)

Returns:

  • (FFI::Pointer(TypeRef))


1331
# File 'lib/llvm/core_ffi.rb', line 1331

attach_function :int_type, :LLVMIntType, [:uint], :pointer

.int_type_in_context(c, num_bits) ⇒ FFI::Pointer(TypeRef)

(Not documented)

Parameters:

  • c (FFI::Pointer(ContextRef))
  • num_bits (Integer)

Returns:

  • (FFI::Pointer(TypeRef))


1280
# File 'lib/llvm/core_ffi.rb', line 1280

attach_function :int_type_in_context, :LLVMIntTypeInContext, [:pointer, :uint], :pointer

.is_a_addr_space_cast_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2275
# File 'lib/llvm/core_ffi.rb', line 2275

attach_function :is_a_addr_space_cast_inst, :LLVMIsAAddrSpaceCastInst, [:pointer], :pointer

.is_a_alloca_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2259
# File 'lib/llvm/core_ffi.rb', line 2259

attach_function :is_a_alloca_inst, :LLVMIsAAllocaInst, [:pointer], :pointer

.is_a_argument(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1779
# File 'lib/llvm/core_ffi.rb', line 1779

attach_function :is_a_argument, :LLVMIsAArgument, [:pointer], :pointer

.is_a_basic_block(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1787
# File 'lib/llvm/core_ffi.rb', line 1787

attach_function :is_a_basic_block, :LLVMIsABasicBlock, [:pointer], :pointer

.is_a_binary_operator(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1979
# File 'lib/llvm/core_ffi.rb', line 1979

attach_function :is_a_binary_operator, :LLVMIsABinaryOperator, [:pointer], :pointer

.is_a_bit_cast_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2283
# File 'lib/llvm/core_ffi.rb', line 2283

attach_function :is_a_bit_cast_inst, :LLVMIsABitCastInst, [:pointer], :pointer

.is_a_block_address(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1819
# File 'lib/llvm/core_ffi.rb', line 1819

attach_function :is_a_block_address, :LLVMIsABlockAddress, [:pointer], :pointer

.is_a_branch_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2155
# File 'lib/llvm/core_ffi.rb', line 2155

attach_function :is_a_branch_inst, :LLVMIsABranchInst, [:pointer], :pointer

.is_a_call_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1987
# File 'lib/llvm/core_ffi.rb', line 1987

attach_function :is_a_call_inst, :LLVMIsACallInst, [:pointer], :pointer

.is_a_cast_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2267
# File 'lib/llvm/core_ffi.rb', line 2267

attach_function :is_a_cast_inst, :LLVMIsACastInst, [:pointer], :pointer

.is_a_catch_pad_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2235
# File 'lib/llvm/core_ffi.rb', line 2235

attach_function :is_a_catch_pad_inst, :LLVMIsACatchPadInst, [:pointer], :pointer

.is_a_catch_return_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2219
# File 'lib/llvm/core_ffi.rb', line 2219

attach_function :is_a_catch_return_inst, :LLVMIsACatchReturnInst, [:pointer], :pointer

.is_a_cleanup_pad_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2243
# File 'lib/llvm/core_ffi.rb', line 2243

attach_function :is_a_cleanup_pad_inst, :LLVMIsACleanupPadInst, [:pointer], :pointer

.is_a_cleanup_return_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2211
# File 'lib/llvm/core_ffi.rb', line 2211

attach_function :is_a_cleanup_return_inst, :LLVMIsACleanupReturnInst, [:pointer], :pointer

.is_a_cmp_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2051
# File 'lib/llvm/core_ffi.rb', line 2051

attach_function :is_a_cmp_inst, :LLVMIsACmpInst, [:pointer], :pointer

.is_a_constant(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1811
# File 'lib/llvm/core_ffi.rb', line 1811

attach_function :is_a_constant, :LLVMIsAConstant, [:pointer], :pointer

.is_a_constant_aggregate_zero(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1827
# File 'lib/llvm/core_ffi.rb', line 1827

attach_function :is_a_constant_aggregate_zero, :LLVMIsAConstantAggregateZero, [:pointer], :pointer

.is_a_constant_array(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1835
# File 'lib/llvm/core_ffi.rb', line 1835

attach_function :is_a_constant_array, :LLVMIsAConstantArray, [:pointer], :pointer

.is_a_constant_data_array(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1851
# File 'lib/llvm/core_ffi.rb', line 1851

attach_function :is_a_constant_data_array, :LLVMIsAConstantDataArray, [:pointer], :pointer

.is_a_constant_data_sequential(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1843
# File 'lib/llvm/core_ffi.rb', line 1843

attach_function :is_a_constant_data_sequential, :LLVMIsAConstantDataSequential, [:pointer], :pointer

.is_a_constant_data_vector(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1859
# File 'lib/llvm/core_ffi.rb', line 1859

attach_function :is_a_constant_data_vector, :LLVMIsAConstantDataVector, [:pointer], :pointer

.is_a_constant_expr(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1867
# File 'lib/llvm/core_ffi.rb', line 1867

attach_function :is_a_constant_expr, :LLVMIsAConstantExpr, [:pointer], :pointer

.is_a_constant_fp(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1875
# File 'lib/llvm/core_ffi.rb', line 1875

attach_function :is_a_constant_fp, :LLVMIsAConstantFP, [:pointer], :pointer

.is_a_constant_int(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1883
# File 'lib/llvm/core_ffi.rb', line 1883

attach_function :is_a_constant_int, :LLVMIsAConstantInt, [:pointer], :pointer

.is_a_constant_pointer_null(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1891
# File 'lib/llvm/core_ffi.rb', line 1891

attach_function :is_a_constant_pointer_null, :LLVMIsAConstantPointerNull, [:pointer], :pointer

.is_a_constant_struct(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1899
# File 'lib/llvm/core_ffi.rb', line 1899

attach_function :is_a_constant_struct, :LLVMIsAConstantStruct, [:pointer], :pointer

.is_a_constant_token_none(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1907
# File 'lib/llvm/core_ffi.rb', line 1907

attach_function :is_a_constant_token_none, :LLVMIsAConstantTokenNone, [:pointer], :pointer

.is_a_constant_vector(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1915
# File 'lib/llvm/core_ffi.rb', line 1915

attach_function :is_a_constant_vector, :LLVMIsAConstantVector, [:pointer], :pointer

.is_a_dbg_declare_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2011
# File 'lib/llvm/core_ffi.rb', line 2011

attach_function :is_a_dbg_declare_inst, :LLVMIsADbgDeclareInst, [:pointer], :pointer

.is_a_dbg_info_intrinsic(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2003
# File 'lib/llvm/core_ffi.rb', line 2003

attach_function :is_a_dbg_info_intrinsic, :LLVMIsADbgInfoIntrinsic, [:pointer], :pointer

.is_a_extract_element_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2075
# File 'lib/llvm/core_ffi.rb', line 2075

attach_function :is_a_extract_element_inst, :LLVMIsAExtractElementInst, [:pointer], :pointer

.is_a_extract_value_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2379
# File 'lib/llvm/core_ffi.rb', line 2379

attach_function :is_a_extract_value_inst, :LLVMIsAExtractValueInst, [:pointer], :pointer

.is_a_funclet_pad_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2227
# File 'lib/llvm/core_ffi.rb', line 2227

attach_function :is_a_funclet_pad_inst, :LLVMIsAFuncletPadInst, [:pointer], :pointer

.is_a_function(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1947
# File 'lib/llvm/core_ffi.rb', line 1947

attach_function :is_a_function, :LLVMIsAFunction, [:pointer], :pointer

.is_a_get_element_ptr_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2083
# File 'lib/llvm/core_ffi.rb', line 2083

attach_function :is_a_get_element_ptr_inst, :LLVMIsAGetElementPtrInst, [:pointer], :pointer

.is_a_global_alias(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1931
# File 'lib/llvm/core_ffi.rb', line 1931

attach_function :is_a_global_alias, :LLVMIsAGlobalAlias, [:pointer], :pointer

.is_a_global_object(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1939
# File 'lib/llvm/core_ffi.rb', line 1939

attach_function :is_a_global_object, :LLVMIsAGlobalObject, [:pointer], :pointer

.is_a_global_value(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1923
# File 'lib/llvm/core_ffi.rb', line 1923

attach_function :is_a_global_value, :LLVMIsAGlobalValue, [:pointer], :pointer

.is_a_global_variable(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1955
# File 'lib/llvm/core_ffi.rb', line 1955

attach_function :is_a_global_variable, :LLVMIsAGlobalVariable, [:pointer], :pointer

.is_a_indirect_br_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2163
# File 'lib/llvm/core_ffi.rb', line 2163

attach_function :is_a_indirect_br_inst, :LLVMIsAIndirectBrInst, [:pointer], :pointer

.is_a_inline_asm(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1795
# File 'lib/llvm/core_ffi.rb', line 1795

attach_function :is_a_inline_asm, :LLVMIsAInlineAsm, [:pointer], :pointer

.is_a_insert_element_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2091
# File 'lib/llvm/core_ffi.rb', line 2091

attach_function :is_a_insert_element_inst, :LLVMIsAInsertElementInst, [:pointer], :pointer

.is_a_insert_value_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2099
# File 'lib/llvm/core_ffi.rb', line 2099

attach_function :is_a_insert_value_inst, :LLVMIsAInsertValueInst, [:pointer], :pointer

.is_a_instruction(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1971
# File 'lib/llvm/core_ffi.rb', line 1971

attach_function :is_a_instruction, :LLVMIsAInstruction, [:pointer], :pointer

.is_a_int_to_ptr_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2323
# File 'lib/llvm/core_ffi.rb', line 2323

attach_function :is_a_int_to_ptr_inst, :LLVMIsAIntToPtrInst, [:pointer], :pointer

.is_a_intrinsic_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1995
# File 'lib/llvm/core_ffi.rb', line 1995

attach_function :is_a_intrinsic_inst, :LLVMIsAIntrinsicInst, [:pointer], :pointer

.is_a_invoke_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2171
# File 'lib/llvm/core_ffi.rb', line 2171

attach_function :is_a_invoke_inst, :LLVMIsAInvokeInst, [:pointer], :pointer

.is_a_landing_pad_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2107
# File 'lib/llvm/core_ffi.rb', line 2107

attach_function :is_a_landing_pad_inst, :LLVMIsALandingPadInst, [:pointer], :pointer

.is_a_load_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2387
# File 'lib/llvm/core_ffi.rb', line 2387

attach_function :is_a_load_inst, :LLVMIsALoadInst, [:pointer], :pointer

.is_a_mem_cpy_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2027
# File 'lib/llvm/core_ffi.rb', line 2027

attach_function :is_a_mem_cpy_inst, :LLVMIsAMemCpyInst, [:pointer], :pointer

.is_a_mem_intrinsic(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2019
# File 'lib/llvm/core_ffi.rb', line 2019

attach_function :is_a_mem_intrinsic, :LLVMIsAMemIntrinsic, [:pointer], :pointer

.is_a_mem_move_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2035
# File 'lib/llvm/core_ffi.rb', line 2035

attach_function :is_a_mem_move_inst, :LLVMIsAMemMoveInst, [:pointer], :pointer

.is_a_mem_set_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2043
# File 'lib/llvm/core_ffi.rb', line 2043

attach_function :is_a_mem_set_inst, :LLVMIsAMemSetInst, [:pointer], :pointer

.is_a_ptr_to_int_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2331
# File 'lib/llvm/core_ffi.rb', line 2331

attach_function :is_a_ptr_to_int_inst, :LLVMIsAPtrToIntInst, [:pointer], :pointer

.is_a_resume_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2203
# File 'lib/llvm/core_ffi.rb', line 2203

attach_function :is_a_resume_inst, :LLVMIsAResumeInst, [:pointer], :pointer

.is_a_return_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2179
# File 'lib/llvm/core_ffi.rb', line 2179

attach_function :is_a_return_inst, :LLVMIsAReturnInst, [:pointer], :pointer

.is_a_select_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2123
# File 'lib/llvm/core_ffi.rb', line 2123

attach_function :is_a_select_inst, :LLVMIsASelectInst, [:pointer], :pointer

.is_a_shuffle_vector_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2131
# File 'lib/llvm/core_ffi.rb', line 2131

attach_function :is_a_shuffle_vector_inst, :LLVMIsAShuffleVectorInst, [:pointer], :pointer

.is_a_store_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2139
# File 'lib/llvm/core_ffi.rb', line 2139

attach_function :is_a_store_inst, :LLVMIsAStoreInst, [:pointer], :pointer

.is_a_switch_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2187
# File 'lib/llvm/core_ffi.rb', line 2187

attach_function :is_a_switch_inst, :LLVMIsASwitchInst, [:pointer], :pointer

.is_a_terminator_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2147
# File 'lib/llvm/core_ffi.rb', line 2147

attach_function :is_a_terminator_inst, :LLVMIsATerminatorInst, [:pointer], :pointer

.is_a_trunc_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2355
# File 'lib/llvm/core_ffi.rb', line 2355

attach_function :is_a_trunc_inst, :LLVMIsATruncInst, [:pointer], :pointer

.is_a_unary_instruction(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2251
# File 'lib/llvm/core_ffi.rb', line 2251

attach_function :is_a_unary_instruction, :LLVMIsAUnaryInstruction, [:pointer], :pointer

.is_a_undef_value(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1963
# File 'lib/llvm/core_ffi.rb', line 1963

attach_function :is_a_undef_value, :LLVMIsAUndefValue, [:pointer], :pointer

.is_a_unreachable_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2195
# File 'lib/llvm/core_ffi.rb', line 2195

attach_function :is_a_unreachable_inst, :LLVMIsAUnreachableInst, [:pointer], :pointer

.is_a_user(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


1803
# File 'lib/llvm/core_ffi.rb', line 1803

attach_function :is_a_user, :LLVMIsAUser, [:pointer], :pointer

.is_af_cmp_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2059
# File 'lib/llvm/core_ffi.rb', line 2059

attach_function :is_af_cmp_inst, :LLVMIsAFCmpInst, [:pointer], :pointer

.is_afp_ext_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2291
# File 'lib/llvm/core_ffi.rb', line 2291

attach_function :is_afp_ext_inst, :LLVMIsAFPExtInst, [:pointer], :pointer

.is_afp_to_si_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2299
# File 'lib/llvm/core_ffi.rb', line 2299

attach_function :is_afp_to_si_inst, :LLVMIsAFPToSIInst, [:pointer], :pointer

.is_afp_to_ui_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2307
# File 'lib/llvm/core_ffi.rb', line 2307

attach_function :is_afp_to_ui_inst, :LLVMIsAFPToUIInst, [:pointer], :pointer

.is_afp_trunc_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2315
# File 'lib/llvm/core_ffi.rb', line 2315

attach_function :is_afp_trunc_inst, :LLVMIsAFPTruncInst, [:pointer], :pointer

.is_ai_cmp_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2067
# File 'lib/llvm/core_ffi.rb', line 2067

attach_function :is_ai_cmp_inst, :LLVMIsAICmpInst, [:pointer], :pointer

.is_amd_node(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2403
# File 'lib/llvm/core_ffi.rb', line 2403

attach_function :is_amd_node, :LLVMIsAMDNode, [:pointer], :pointer

.is_amd_string(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2411
# File 'lib/llvm/core_ffi.rb', line 2411

attach_function :is_amd_string, :LLVMIsAMDString, [:pointer], :pointer

.is_aphi_node(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2115
# File 'lib/llvm/core_ffi.rb', line 2115

attach_function :is_aphi_node, :LLVMIsAPHINode, [:pointer], :pointer

.is_as_ext_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2339
# File 'lib/llvm/core_ffi.rb', line 2339

attach_function :is_as_ext_inst, :LLVMIsASExtInst, [:pointer], :pointer

.is_asi_to_fp_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2347
# File 'lib/llvm/core_ffi.rb', line 2347

attach_function :is_asi_to_fp_inst, :LLVMIsASIToFPInst, [:pointer], :pointer

.is_aui_to_fp_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2363
# File 'lib/llvm/core_ffi.rb', line 2363

attach_function :is_aui_to_fp_inst, :LLVMIsAUIToFPInst, [:pointer], :pointer

.is_ava_arg_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2395
# File 'lib/llvm/core_ffi.rb', line 2395

attach_function :is_ava_arg_inst, :LLVMIsAVAArgInst, [:pointer], :pointer

.is_az_ext_inst(val) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))


2371
# File 'lib/llvm/core_ffi.rb', line 2371

attach_function :is_az_ext_inst, :LLVMIsAZExtInst, [:pointer], :pointer

.is_conditional(branch) ⇒ Integer

Return if a branch is conditional.

This only works on llvm::BranchInst instructions.

Parameters:

  • branch (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::BranchInstllvm::BranchInst::isConditional


4071
# File 'lib/llvm/core_ffi.rb', line 4071

attach_function :is_conditional, :LLVMIsConditional, [:pointer], :int

.is_constant(val) ⇒ Integer

Determine whether the specified constant instance is constant.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


295
# File 'lib/llvm/core_ffi_v2.rb', line 295

attach_function :is_constant, :LLVMIsConstant, [:pointer], :bool

.is_constant_string(c) ⇒ Integer

Returns true if the specified constant is an array of i8.

Parameters:

  • c (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • ConstantDataSequential::getAsString()


2694
# File 'lib/llvm/core_ffi.rb', line 2694

attach_function :is_constant_string, :LLVMIsConstantString, [:pointer], :int

.is_declaration(global) ⇒ Integer

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3040
# File 'lib/llvm/core_ffi.rb', line 3040

attach_function :is_declaration, :LLVMIsDeclaration, [:pointer], :int

.is_externally_initialized(global_var) ⇒ Integer

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3286
# File 'lib/llvm/core_ffi.rb', line 3286

attach_function :is_externally_initialized, :LLVMIsExternallyInitialized, [:pointer], :int

.is_function_var_arg(function_ty) ⇒ Integer

Returns whether a function type is variadic.

Parameters:

  • function_ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)


1454
# File 'lib/llvm/core_ffi.rb', line 1454

attach_function :is_function_var_arg, :LLVMIsFunctionVarArg, [:pointer], :int

.is_global_constant(global_var) ⇒ Integer

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


331
# File 'lib/llvm/core_ffi_v2.rb', line 331

attach_function :is_global_constant, :LLVMIsGlobalConstant, [:pointer], :bool

.is_literal_struct(struct_ty) ⇒ Bool

Determine whether a structure is literal.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))

Returns:

  • (Bool)

See Also:

  • llvmllvm::StructTypellvm::StructType::isLiteral()


148
# File 'lib/llvm/core_ffi_v2.rb', line 148

attach_function :is_literal_struct, :LLVMIsLiteralStruct, [:pointer], :bool

.is_multithreadedInteger

Check whether LLVM is executing in thread-safe mode or not.

@see llvm::llvm_is_multithreaded

Returns:

  • (Integer)


5405
# File 'lib/llvm/core_ffi.rb', line 5405

attach_function :is_multithreaded, :LLVMIsMultithreaded, [], :int

.is_null(val) ⇒ Integer

Determine whether a value instance is null.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Constantllvm::Constant::isNullValue()


313
# File 'lib/llvm/core_ffi_v2.rb', line 313

attach_function :is_null, :LLVMIsNull, [:pointer], :bool

.is_opaque_struct(struct_ty) ⇒ Bool

Determine whether a structure is opaque.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))

Returns:

  • (Bool)

See Also:

  • llvmllvm::StructTypellvm::StructType::isOpaque()


138
# File 'lib/llvm/core_ffi_v2.rb', line 138

attach_function :is_opaque_struct, :LLVMIsOpaqueStruct, [:pointer], :bool

.is_packed_struct(struct_ty) ⇒ Bool

Determine whether a structure is packed.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))

Returns:

  • (Bool)

See Also:

  • llvmllvm::StructTypellvm::StructType::isPacked()


128
# File 'lib/llvm/core_ffi_v2.rb', line 128

attach_function :is_packed_struct, :LLVMIsPackedStruct, [:pointer], :bool

.is_tail_call(call_inst) ⇒ Integer

Obtain whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

Parameters:

  • call_inst (FFI::Pointer(ValueRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::CallInstllvm::CallInst::isTailCall()


4013
# File 'lib/llvm/core_ffi.rb', line 4013

attach_function :is_tail_call, :LLVMIsTailCall, [:pointer], :int

.is_thread_local(global_var) ⇒ Integer

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


323
# File 'lib/llvm/core_ffi_v2.rb', line 323

attach_function :is_thread_local, :LLVMIsThreadLocal, [:pointer], :bool

.is_undef(val) ⇒ Integer

Determine whether a value instance is undefined.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


303
# File 'lib/llvm/core_ffi_v2.rb', line 303

attach_function :is_undef, :LLVMIsUndef, [:pointer], :bool

.label_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1708
# File 'lib/llvm/core_ffi.rb', line 1708

attach_function :label_type, :LLVMLabelType, [], :pointer

.label_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Create a label type in a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1693
# File 'lib/llvm/core_ffi.rb', line 1693

attach_function :label_type_in_context, :LLVMLabelTypeInContext, [:pointer], :pointer

(Not documented)

Returns:

  • (nil)


24
# File 'lib/llvm/execution_engine_ffi.rb', line 24

attach_function :link_in_interpreter, :LLVMLinkInInterpreter, [], :void

@{

Returns:

  • (nil)


17
# File 'lib/llvm/execution_engine_ffi.rb', line 17

attach_function :link_in_mcjit, :LLVMLinkInMCJIT, [], :void

Links the source module into the destination module. The source module is destroyed. The return value is true if an error occurred, false otherwise. Use the diagnostic handler to get any diagnostic message.

Parameters:

  • dest (FFI::Pointer(ModuleRef))
  • src (FFI::Pointer(ModuleRef))

Returns:

  • (Integer)


37
# File 'lib/llvm/linker_ffi.rb', line 37

attach_function :link_modules2, :LLVMLinkModules2, [:pointer, :pointer], :int

.load_library_permanently(filename) ⇒ Integer

(Not documented)

Parameters:

  • filename (String)

Returns:

  • (Integer)


16
# File 'lib/llvm/core_ffi.rb', line 16

attach_function :load_library_permanently, :LLVMLoadLibraryPermanently, [:string], :int

.md_node(vals, count) ⇒ FFI::Pointer(ValueRef)

Obtain a MDNode value from the global context.

Parameters:

  • vals (FFI::Pointer(*ValueRef))
  • count (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3557
# File 'lib/llvm/core_ffi.rb', line 3557

attach_function :md_node, :LLVMMDNode, [:pointer, :uint], :pointer

.md_node_in_context(c, vals, count) ⇒ FFI::Pointer(ValueRef)

Obtain a MDNode value from a context.

The returned value corresponds to the llvm::MDNode class.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • vals (FFI::Pointer(*ValueRef))
  • count (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3548
# File 'lib/llvm/core_ffi.rb', line 3548

attach_function :md_node_in_context, :LLVMMDNodeInContext, [:pointer, :pointer, :uint], :pointer

.md_string(str, s_len) ⇒ FFI::Pointer(ValueRef)

Obtain a MDString value from the global context.

Parameters:

  • str (String)
  • s_len (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3536
# File 'lib/llvm/core_ffi.rb', line 3536

attach_function :md_string, :LLVMMDString, [:string, :uint], :pointer

.md_string_in_context(c, str, s_len) ⇒ FFI::Pointer(ValueRef)

Obtain a MDString value from a context.

The returned instance corresponds to the llvm::MDString class.

The instance is specified by string data of a specified length. The string content is copied, so the backing memory can be freed after this function returns.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • str (String)
  • s_len (Integer)

Returns:

  • (FFI::Pointer(ValueRef))


3527
# File 'lib/llvm/core_ffi.rb', line 3527

attach_function :md_string_in_context, :LLVMMDStringInContext, [:pointer, :string, :uint], :pointer

.module_create_with_name(module_id) ⇒ FFI::Pointer(ModuleRef)

Create a new, empty module in the global context.

This is equivalent to calling LLVMModuleCreateWithNameInContext with LLVMGetGlobalContext() as the context parameter.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

Parameters:

  • module_id (String)

Returns:

  • (FFI::Pointer(ModuleRef))


924
# File 'lib/llvm/core_ffi.rb', line 924

attach_function :module_create_with_name, :LLVMModuleCreateWithName, [:string], :pointer

.module_create_with_name_in_context(module_id, c) ⇒ FFI::Pointer(ModuleRef)

Create a new, empty module in a specific context.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

Parameters:

  • module_id (String)
  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(ModuleRef))


936
# File 'lib/llvm/core_ffi.rb', line 936

attach_function :module_create_with_name_in_context, :LLVMModuleCreateWithNameInContext, [:string, :pointer], :pointer

.move_basic_block_after(bb, move_pos) ⇒ nil

Move a basic block to after another one.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))
  • move_pos (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::moveAfter()


3819
# File 'lib/llvm/core_ffi.rb', line 3819

attach_function :move_basic_block_after, :LLVMMoveBasicBlockAfter, [:pointer, :pointer], :void

.move_basic_block_before(bb, move_pos) ⇒ nil

Move a basic block to before another one.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))
  • move_pos (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::moveBefore()


3808
# File 'lib/llvm/core_ffi.rb', line 3808

attach_function :move_basic_block_before, :LLVMMoveBasicBlockBefore, [:pointer, :pointer], :void

.offset_of_element(td, struct_ty, element) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


299
# File 'lib/llvm/target_ffi.rb', line 299

attach_function :offset_of_element, :LLVMOffsetOfElement, [OpaqueTargetData, :pointer, :uint], :ulong_long

.parse_bitcode(mem_buf, out_module, out_message) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


17
# File 'lib/llvm/core/bitcode_ffi.rb', line 17

attach_function :parse_bitcode, :LLVMParseBitcode, [:pointer, :pointer, :pointer], :int

.parse_bitcode2(mem_buf, out_module) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))

Returns:

  • (Integer)


26
# File 'lib/llvm/core/bitcode_ffi.rb', line 26

attach_function :parse_bitcode2, :LLVMParseBitcode2, [:pointer, :pointer], :int

.parse_bitcode_in_context(context_ref, mem_buf, out_module, out_message) ⇒ Integer

(Not documented)

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


37
# File 'lib/llvm/core/bitcode_ffi.rb', line 37

attach_function :parse_bitcode_in_context, :LLVMParseBitcodeInContext, [:pointer, :pointer, :pointer, :pointer], :int

.parse_bitcode_in_context2(context_ref, mem_buf, out_module) ⇒ Integer

(Not documented)

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))

Returns:

  • (Integer)


47
# File 'lib/llvm/core/bitcode_ffi.rb', line 47

attach_function :parse_bitcode_in_context2, :LLVMParseBitcodeInContext2, [:pointer, :pointer, :pointer], :int

.parse_command_line_options(argc, argv, overview) ⇒ nil

This function parses the given arguments using the LLVM command line parser. Note that the only stable thing about this function is its signature; you cannot rely on any particular set of command line arguments being interpreted the same way across LLVM versions.

Parameters:

  • argc (Integer)
  • argv (FFI::Pointer(**CharS))
  • overview (String)

Returns:

  • (nil)

See Also:

  • llvmllvm::clllvm::cl::ParseCommandLineOptions()


31
# File 'lib/llvm/core_ffi.rb', line 31

attach_function :parse_command_line_options, :LLVMParseCommandLineOptions, [:int, :pointer, :string], :void

.pointer_size(td) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


171
# File 'lib/llvm/target_ffi.rb', line 171

attach_function :pointer_size, :LLVMPointerSize, [OpaqueTargetData], :uint

.pointer_size_for_as(td, as) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


180
# File 'lib/llvm/target_ffi.rb', line 180

attach_function :pointer_size_for_as, :LLVMPointerSizeForAS, [OpaqueTargetData, :uint], :uint

.pointer_type(element_type, address_space) ⇒ FFI::Pointer(TypeRef)

Create a pointer type that points to a defined type.

The created type will exist in the context that its pointee type exists in.

Parameters:

  • element_type (FFI::Pointer(TypeRef))
  • address_space (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::PointerTypellvm::PointerType::get()


1638
# File 'lib/llvm/core_ffi.rb', line 1638

attach_function :pointer_type, :LLVMPointerType, [:pointer, :uint], :pointer

.position_builder(builder, block, instr) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • block (FFI::Pointer(BasicBlockRef))
  • instr (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4175
# File 'lib/llvm/core_ffi.rb', line 4175

attach_function :position_builder, :LLVMPositionBuilder, [:pointer, :pointer, :pointer], :void

.position_builder_at_end(builder, block) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • block (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)


4193
# File 'lib/llvm/core_ffi.rb', line 4193

attach_function :position_builder_at_end, :LLVMPositionBuilderAtEnd, [:pointer, :pointer], :void

.position_builder_before(builder, instr) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • instr (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4184
# File 'lib/llvm/core_ffi.rb', line 4184

attach_function :position_builder_before, :LLVMPositionBuilderBefore, [:pointer, :pointer], :void

.ppcfp128_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1432
# File 'lib/llvm/core_ffi.rb', line 1432

attach_function :ppcfp128_type, :LLVMPPCFP128Type, [], :pointer

.ppcfp128_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 128-bit floating point type (two 64-bits) from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1388
# File 'lib/llvm/core_ffi.rb', line 1388

attach_function :ppcfp128_type_in_context, :LLVMPPCFP128TypeInContext, [:pointer], :pointer

.preferred_alignment_of_global(td, global_var) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


279
# File 'lib/llvm/target_ffi.rb', line 279

attach_function :preferred_alignment_of_global, :LLVMPreferredAlignmentOfGlobal, [OpaqueTargetData, :pointer], :uint

.preferred_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


270
# File 'lib/llvm/target_ffi.rb', line 270

attach_function :preferred_alignment_of_type, :LLVMPreferredAlignmentOfType, [OpaqueTargetData, :pointer], :uint

Print a representation of a module to a file. The ErrorMessage needs to be disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • filename (String)
  • error_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)

See Also:

  • Module::print()


1020
# File 'lib/llvm/core_ffi.rb', line 1020

attach_function :print_module_to_file, :LLVMPrintModuleToFile, [:pointer, :string, :pointer], :int

Return a string representation of the module. Use LLVMDisposeMessage to free the string.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (String)

See Also:

  • Module::print()


1031
# File 'lib/llvm/core_ffi.rb', line 1031

attach_function :print_module_to_string, :LLVMPrintModuleToString, [:pointer], :string

Return a string representation of the type. Use LLVMDisposeMessage to free the string.

Parameters:

  • val (FFI::Pointer(TypeRef))

Returns:

  • (String)

See Also:

  • llvmllvm::Typellvm::Type::print()


1223
# File 'lib/llvm/core_ffi.rb', line 1223

attach_function :print_type_to_string, :LLVMPrintTypeToString, [:pointer], :string

Return a string representation of the value. Use LLVMDisposeMessage to free the string.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (String)

See Also:

  • llvmllvm::Valuellvm::Value::print()


1760
# File 'lib/llvm/core_ffi.rb', line 1760

attach_function :print_value_to_string, :LLVMPrintValueToString, [:pointer], :string

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


290
# File 'lib/llvm/execution_engine_ffi.rb', line 290

attach_function :recompile_and_relink_function, :LLVMRecompileAndRelinkFunction, [OpaqueExecutionEngine, :pointer], :pointer

.remove_basic_block_from_parent(bb) ⇒ nil

Remove a basic block from a function.

This deletes the basic block from its containing function but keep the basic block alive.

Parameters:

  • bb (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::removeFromParent()


3797
# File 'lib/llvm/core_ffi.rb', line 3797

attach_function :remove_basic_block_from_parent, :LLVMRemoveBasicBlockFromParent, [:pointer], :void

.remove_module(ee, m, out_mod, out_error) ⇒ Integer

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • m (FFI::Pointer(ModuleRef))
  • out_mod (FFI::Pointer(*ModuleRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


271
# File 'lib/llvm/execution_engine_ffi.rb', line 271

attach_function :remove_module, :LLVMRemoveModule, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int

.replace_all_uses_with(old_val, new_val) ⇒ nil

Replace all uses of a value with another one.

Parameters:

  • old_val (FFI::Pointer(ValueRef))
  • new_val (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::replaceAllUsesWith()


1771
# File 'lib/llvm/core_ffi.rb', line 1771

attach_function :replace_all_uses_with, :LLVMReplaceAllUsesWith, [:pointer, :pointer], :void

.run_function(ee, f, num_args, args) ⇒ OpaqueGenericValue

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • f (FFI::Pointer(ValueRef))
  • num_args (Integer)
  • args (FFI::Pointer(*GenericValueRef))

Returns:



242
# File 'lib/llvm/execution_engine_ffi.rb', line 242

attach_function :run_function, :LLVMRunFunction, [OpaqueExecutionEngine, :pointer, :uint, :pointer], OpaqueGenericValue

.run_function_as_main(ee, f, arg_c, arg_v, env_p) ⇒ Integer

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • f (FFI::Pointer(ValueRef))
  • arg_c (Integer)
  • arg_v (FFI::Pointer(**CharS))
  • env_p (FFI::Pointer(**CharS))

Returns:

  • (Integer)


231
# File 'lib/llvm/execution_engine_ffi.rb', line 231

attach_function :run_function_as_main, :LLVMRunFunctionAsMain, [OpaqueExecutionEngine, :pointer, :uint, :pointer, :pointer], :int

.run_function_pass_manager(fpm, f) ⇒ Integer

Executes all of the function passes scheduled in the function pass manager

on the provided function. Returns 1 if any of the passes modified the
function, false otherwise.
@see llvm::FunctionPassManager::run(Function&)

Parameters:

  • fpm (FFI::Pointer(PassManagerRef))
  • f (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


5360
# File 'lib/llvm/core_ffi.rb', line 5360

attach_function :run_function_pass_manager, :LLVMRunFunctionPassManager, [:pointer, :pointer], :int

.run_pass_manager(pm, m) ⇒ Integer

Initializes, executes on the provided module, and finalizes all of the

passes scheduled in the pass manager. Returns 1 if any of the passes
modified the module, 0 otherwise.
@see llvm::PassManager::run(Module&)

Parameters:

  • pm (FFI::Pointer(PassManagerRef))
  • m (FFI::Pointer(ModuleRef))

Returns:

  • (Integer)


5338
# File 'lib/llvm/core_ffi.rb', line 5338

attach_function :run_pass_manager, :LLVMRunPassManager, [:pointer, :pointer], :int

.run_passes(pmb, opt_level) ⇒ nil

/**

* Construct and run a set of passes over a module
*
* This function takes a string with the passes that should be used. The format
* of this string is the same as opt's -passes argument for the new pass
* manager. Individual passes may be specified, separated by commas. Full
* pipelines may also be invoked using `default<O3>` and friends. See opt for
* full reference of the Passes format.
*/

LLVMErrorRef LLVMRunPasses(LLVMModuleRef M, const char *Passes,

LLVMTargetMachineRef TM,
LLVMPassBuilderOptionsRef Options);

Parameters:

  • pmb (OpaquePassManagerBuilder)
  • opt_level (Integer)

Returns:

  • (nil)


820
# File 'lib/llvm/pass_builder.rb', line 820

attach_function :run_passes, :LLVMRunPasses, [:pointer, :string, :pointer, :pointer], :pointer

.run_static_constructors(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


211
# File 'lib/llvm/execution_engine_ffi.rb', line 211

attach_function :run_static_constructors, :LLVMRunStaticConstructors, [OpaqueExecutionEngine], :void

.run_static_destructors(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


219
# File 'lib/llvm/execution_engine_ffi.rb', line 219

attach_function :run_static_destructors, :LLVMRunStaticDestructors, [OpaqueExecutionEngine], :void

.search_for_address_of_symbol(symbol_name) ⇒ FFI::Pointer(*Void)

(Not documented)

Parameters:

  • symbol_name (String)

Returns:

  • (FFI::Pointer(*Void))


39
# File 'lib/llvm/core_ffi.rb', line 39

attach_function :search_for_address_of_symbol, :LLVMSearchForAddressOfSymbol, [:string], :pointer

.set_alignment(v, bytes) ⇒ nil

Set the preferred alignment of the value.

Parameters:

  • v (FFI::Pointer(ValueRef))
  • bytes (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::AllocaInstllvm::AllocaInst::setAlignment()
  • llvmllvm::LoadInstllvm::LoadInst::setAlignment()
  • llvmllvm::StoreInstllvm::StoreInst::setAlignment()
  • llvmllvm::GlobalValuellvm::GlobalValue::setAlignment()


3150
# File 'lib/llvm/core_ffi.rb', line 3150

attach_function :set_alignment, :LLVMSetAlignment, [:pointer, :uint], :void

.set_cleanup(landing_pad, val) ⇒ nil

Set the ‘cleanup’ flag in the landingpad instruction

Parameters:

  • landing_pad (FFI::Pointer(ValueRef))
  • val (Integer)

Returns:

  • (nil)


4396
# File 'lib/llvm/core_ffi.rb', line 4396

attach_function :set_cleanup, :LLVMSetCleanup, [:pointer, :int], :void

.set_condition(branch, cond) ⇒ nil

Set the condition of a branch instruction.

This only works on llvm::BranchInst instructions.

Parameters:

  • branch (FFI::Pointer(ValueRef))
  • cond (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::BranchInstllvm::BranchInst::setCondition


4096
# File 'lib/llvm/core_ffi.rb', line 4096

attach_function :set_condition, :LLVMSetCondition, [:pointer, :pointer], :void

.set_current_debug_location(builder, l) ⇒ nil

Metadata

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • l (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4245
# File 'lib/llvm/core_ffi.rb', line 4245

attach_function :set_current_debug_location, :LLVMSetCurrentDebugLocation, [:pointer, :pointer], :void

.set_data_layout(m, triple) ⇒ nil

Set the data layout for a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • triple (String)

Returns:

  • (nil)

See Also:

  • Module::setDataLayout()


976
# File 'lib/llvm/core_ffi.rb', line 976

attach_function :set_data_layout, :LLVMSetDataLayout, [:pointer, :string], :void

.set_dll_storage_class(global, class_) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3108
# File 'lib/llvm/core_ffi.rb', line 3108

attach_function :set_dll_storage_class, :LLVMSetDLLStorageClass, [:pointer, :dll_storage_class], :void

.set_externally_initialized(global_var, is_ext_init) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))
  • is_ext_init (Integer)

Returns:

  • (nil)


3295
# File 'lib/llvm/core_ffi.rb', line 3295

attach_function :set_externally_initialized, :LLVMSetExternallyInitialized, [:pointer, :int], :void

.set_function_call_conv(fn, cc) ⇒ nil

Set the calling convention of a function.

Parameters:

  • Fn

    Function to operate on

  • CC

    LLVMCallConv to set calling convention to

  • fn (FFI::Pointer(ValueRef))
  • cc (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::setCallingConv()


3370
# File 'lib/llvm/core_ffi.rb', line 3370

attach_function :set_function_call_conv, :LLVMSetFunctionCallConv, [:pointer, :uint], :void

.set_gc(fn, name) ⇒ nil

Define the garbage collector to use during code generation.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::setGC()


3392
# File 'lib/llvm/core_ffi.rb', line 3392

attach_function :set_gc, :LLVMSetGC, [:pointer, :string], :void

.set_global_constant(global_var, is_constant) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))
  • is_constant (Integer)

Returns:

  • (nil)


3261
# File 'lib/llvm/core_ffi.rb', line 3261

attach_function :set_global_constant, :LLVMSetGlobalConstant, [:pointer, :int], :void

.set_initializer(global_var, constant_val) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))
  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (nil)


3243
# File 'lib/llvm/core_ffi.rb', line 3243

attach_function :set_initializer, :LLVMSetInitializer, [:pointer, :pointer], :void

.set_inst_debug_location(builder, inst) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))
  • inst (FFI::Pointer(ValueRef))

Returns:

  • (nil)


4262
# File 'lib/llvm/core_ffi.rb', line 4262

attach_function :set_inst_debug_location, :LLVMSetInstDebugLocation, [:pointer, :pointer], :void

.set_instr_param_alignment(instr, index, align) ⇒ nil

(Not documented)

Parameters:

  • instr (FFI::Pointer(ValueRef))
  • index (Integer)
  • align (Integer)

Returns:

  • (nil)


4001
# File 'lib/llvm/core_ffi.rb', line 4001

attach_function :set_instr_param_alignment, :LLVMSetInstrParamAlignment, [:pointer, :uint, :uint], :void

.set_instruction_call_conv(instr, cc) ⇒ nil

Set the calling convention for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

Parameters:

  • instr (FFI::Pointer(ValueRef))
  • cc (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::CallInstllvm::CallInst::setCallingConv()
  • llvmllvm::InvokeInstllvm::InvokeInst::setCallingConv()


3978
# File 'lib/llvm/core_ffi.rb', line 3978

attach_function :set_instruction_call_conv, :LLVMSetInstructionCallConv, [:pointer, :uint], :void

.set_linkage(global, linkage) ⇒ nil

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))
  • linkage (Symbol from _enum_linkage_)

Returns:

  • (nil)


3057
# File 'lib/llvm/core_ffi.rb', line 3057

attach_function :set_linkage, :LLVMSetLinkage, [:pointer, :linkage], :void

.set_metadata(val, kind_id, node) ⇒ nil

Set metadata associated with an instruction value.

Parameters:

  • val (FFI::Pointer(ValueRef))
  • kind_id (Integer)
  • node (FFI::Pointer(ValueRef))

Returns:

  • (nil)


3867
# File 'lib/llvm/core_ffi.rb', line 3867

attach_function :set_metadata, :LLVMSetMetadata, [:pointer, :uint, :pointer], :void

.set_module_data_layout(m, dl) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


122
# File 'lib/llvm/target_ffi.rb', line 122

attach_function :set_module_data_layout, :LLVMSetModuleDataLayout, [:pointer, OpaqueTargetData], :void

.set_module_inline_asm(m, asm) ⇒ nil

Set inline assembly for a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • asm (String)

Returns:

  • (nil)

See Also:

  • Module::setModuleInlineAsm()


1042
# File 'lib/llvm/core_ffi.rb', line 1042

attach_function :set_module_inline_asm, :LLVMSetModuleInlineAsm, [:pointer, :string], :void

.set_operand(user, index, val) ⇒ nil

Set an operand at a specific index in a llvm::User value.

Parameters:

  • user (FFI::Pointer(ValueRef))
  • index (Integer)
  • val (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Userllvm::User::setOperand()


2493
# File 'lib/llvm/core_ffi.rb', line 2493

attach_function :set_operand, :LLVMSetOperand, [:pointer, :uint, :pointer], :void

.set_ordering(memory_access_inst, ordering) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


4848
# File 'lib/llvm/core_ffi.rb', line 4848

attach_function :set_ordering, :LLVMSetOrdering, [:pointer, :atomic_ordering], :void

.set_param_alignment(arg, align) ⇒ nil

Set the alignment for a function parameter.

Parameters:

  • arg (FFI::Pointer(ValueRef))
  • align (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::Argumentllvm::Argument::addAttr()
  • llvmllvm::AttrBuilderllvm::AttrBuilder::addAlignmentAttr()


3511
# File 'lib/llvm/core_ffi.rb', line 3511

attach_function :set_param_alignment, :LLVMSetParamAlignment, [:pointer, :uint], :void

.set_personality_fn(fn, personality_fn) ⇒ nil

Set the personality function attached to the function.

Parameters:

  • fn (FFI::Pointer(ValueRef))
  • personality_fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::setPersonalityFn()


3334
# File 'lib/llvm/core_ffi.rb', line 3334

attach_function :set_personality_fn, :LLVMSetPersonalityFn, [:pointer, :pointer], :void

.set_section(global, section) ⇒ nil

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))
  • section (String)

Returns:

  • (nil)


3074
# File 'lib/llvm/core_ffi.rb', line 3074

attach_function :set_section, :LLVMSetSection, [:pointer, :string], :void

.set_successor(term, i, block) ⇒ nil

Update the specified successor to point at the provided block.

Parameters:

  • term (FFI::Pointer(ValueRef))
  • i (Integer)
  • block (FFI::Pointer(BasicBlockRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::TerminatorInstllvm::TerminatorInst::setSuccessor


4059
# File 'lib/llvm/core_ffi.rb', line 4059

attach_function :set_successor, :LLVMSetSuccessor, [:pointer, :uint, :pointer], :void

.set_tail_call(call_inst, is_tail_call) ⇒ nil

Set whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

Parameters:

  • call_inst (FFI::Pointer(ValueRef))
  • is_tail_call (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::CallInstllvm::CallInst::setTailCall()


4026
# File 'lib/llvm/core_ffi.rb', line 4026

attach_function :set_tail_call, :LLVMSetTailCall, [:pointer, :int], :void

.set_target(m, triple) ⇒ nil

Set the target triple for a module.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • triple (String)

Returns:

  • (nil)

See Also:

  • Module::setTargetTriple()


997
# File 'lib/llvm/core_ffi.rb', line 997

attach_function :set_target, :LLVMSetTarget, [:pointer, :string], :void

.set_target_machine_asm_verbosity(t, verbose_asm) ⇒ nil

Set the target machine’s ASM verbosity.

Parameters:

Returns:

  • (nil)


558
# File 'lib/llvm/target_ffi.rb', line 558

attach_function :set_target_machine_asm_verbosity, :LLVMSetTargetMachineAsmVerbosity, [OpaqueTargetMachine, :int], :void

.set_thread_local(global_var, is_thread_local) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))
  • is_thread_local (Integer)

Returns:

  • (nil)


3252
# File 'lib/llvm/core_ffi.rb', line 3252

attach_function :set_thread_local, :LLVMSetThreadLocal, [:pointer, :int], :void

.set_thread_local_mode(global_var, mode) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3278
# File 'lib/llvm/core_ffi.rb', line 3278

attach_function :set_thread_local_mode, :LLVMSetThreadLocalMode, [:pointer, :thread_local_mode], :void

.set_unnamed_addr(global, has_unnamed_addr) ⇒ nil

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))
  • has_unnamed_addr (Integer)

Returns:

  • (nil)


3125
# File 'lib/llvm/core_ffi.rb', line 3125

attach_function :set_unnamed_addr, :LLVMSetUnnamedAddr, [:pointer, :int], :void

.set_value_name(val, name) ⇒ nil

Set the string name of a value.

Parameters:

  • val (FFI::Pointer(ValueRef))
  • name (String)

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::setName()


1739
# File 'lib/llvm/core_ffi.rb', line 1739

attach_function :set_value_name, :LLVMSetValueName, [:pointer, :string], :void

.set_visibility(global, viz) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3091
# File 'lib/llvm/core_ffi.rb', line 3091

attach_function :set_visibility, :LLVMSetVisibility, [:pointer, :visibility], :void

.set_volatile(memory_access_inst, is_volatile) ⇒ nil

(Not documented)

Parameters:

  • memory_access_inst (FFI::Pointer(ValueRef))
  • is_volatile (Integer)

Returns:

  • (nil)


4831
# File 'lib/llvm/core_ffi.rb', line 4831

attach_function :set_volatile, :LLVMSetVolatile, [:pointer, :int], :void

.shutdownnil

@}

Deallocate and destroy all ManagedStatic variables.

@see llvm::llvm_shutdown
@see ManagedStatic

Returns:

  • (nil)


774
# File 'lib/llvm/core_ffi.rb', line 774

attach_function :shutdown, :LLVMShutdown, [], :void

.size_of(ty) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))


2809
# File 'lib/llvm/core_ffi.rb', line 2809

attach_function :size_of, :LLVMSizeOf, [:pointer], :pointer

.size_of_type_in_bits(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


225
# File 'lib/llvm/target_ffi.rb', line 225

attach_function :size_of_type_in_bits, :LLVMSizeOfTypeInBits, [OpaqueTargetData, :pointer], :ulong_long

.start_multithreadedInteger

Deprecated: Multi-threading can only be enabled/disabled with the compile

time define LLVM_ENABLE_THREADS.  This function always returns
LLVMIsMultithreaded().

Returns:

  • (Integer)


5389
# File 'lib/llvm/core_ffi.rb', line 5389

attach_function :start_multithreaded, :LLVMStartMultithreaded, [], :int

.stop_multithreadednil

Deprecated: Multi-threading can only be enabled/disabled with the compile

time define LLVM_ENABLE_THREADS.

Returns:

  • (nil)


5397
# File 'lib/llvm/core_ffi.rb', line 5397

attach_function :stop_multithreaded, :LLVMStopMultithreaded, [], :void

.store_size_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


234
# File 'lib/llvm/target_ffi.rb', line 234

attach_function :store_size_of_type, :LLVMStoreSizeOfType, [OpaqueTargetData, :pointer], :ulong_long

.struct_create_named(c, name) ⇒ FFI::Pointer(TypeRef)

Create an empty structure in a context having a specified name.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • name (String)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1526
# File 'lib/llvm/core_ffi.rb', line 1526

attach_function :struct_create_named, :LLVMStructCreateNamed, [:pointer, :string], :pointer

.struct_get_type_at_index(struct_ty, i) ⇒ FFI::Pointer(TypeRef)

Get the type of the element at a given index in the structure.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))
  • i (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::StructTypellvm::StructType::getTypeAtIndex()


1586
# File 'lib/llvm/core_ffi.rb', line 1586

attach_function :struct_get_type_at_index, :LLVMStructGetTypeAtIndex, [:pointer, :uint], :pointer

.struct_set_body(struct_ty, element_types, element_count, packed) ⇒ nil

Set the contents of a structure type.

Parameters:

  • struct_ty (FFI::Pointer(TypeRef))
  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::StructTypellvm::StructType::setBody()


1549
# File 'lib/llvm/core_ffi.rb', line 1549

attach_function :struct_set_body, :LLVMStructSetBody, [:pointer, :pointer, :uint, :int], :void

.struct_type(element_types, element_count, packed) ⇒ FFI::Pointer(TypeRef)

Create a new structure type in the global context.

Parameters:

  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1515
# File 'lib/llvm/core_ffi.rb', line 1515

attach_function :struct_type, :LLVMStructType, [:pointer, :uint, :int], :pointer

.struct_type_in_context(c, element_types, element_count, packed) ⇒ FFI::Pointer(TypeRef)

Create a new structure type in a context.

A structure is specified by a list of inner elements/types and whether these can be packed together.

Parameters:

  • c (FFI::Pointer(ContextRef))
  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1503
# File 'lib/llvm/core_ffi.rb', line 1503

attach_function :struct_type_in_context, :LLVMStructTypeInContext, [:pointer, :pointer, :uint, :int], :pointer

.target_has_asm_backend(t) ⇒ Integer

Returns if the target as an ASM backend (required for emitting output)

Parameters:

Returns:

  • (Integer)


480
# File 'lib/llvm/target_ffi.rb', line 480

attach_function :target_has_asm_backend, :LLVMTargetHasAsmBackend, [Target], :int

.target_has_jit(t) ⇒ Integer

Returns if the target has a JIT

Parameters:

Returns:

  • (Integer)


464
# File 'lib/llvm/target_ffi.rb', line 464

attach_function :target_has_jit, :LLVMTargetHasJIT, [Target], :int

.target_has_target_machine(t) ⇒ Integer

Returns if the target has a TargetMachine associated

Parameters:

Returns:

  • (Integer)


472
# File 'lib/llvm/target_ffi.rb', line 472

attach_function :target_has_target_machine, :LLVMTargetHasTargetMachine, [Target], :int

.target_machine_emit_to_file(t, m, filename, codegen, error_message) ⇒ Integer

Emits an asm or object file for the given module to the filename. This

wraps several c++ only classes (among them a file stream). Returns any
error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.

Parameters:

Returns:

  • (Integer)


572
# File 'lib/llvm/target_ffi.rb', line 572

attach_function :target_machine_emit_to_file, :LLVMTargetMachineEmitToFile, [OpaqueTargetMachine, :pointer, :string, :code_gen_file_type, :pointer], :int

.target_machine_emit_to_memory_buffer(t, m, codegen, error_message, out_mem_buf) ⇒ Integer

Compile the LLVM IR stored in p M and store the result in p OutMemBuf.

Parameters:

Returns:

  • (Integer)


584
# File 'lib/llvm/target_ffi.rb', line 584

attach_function :target_machine_emit_to_memory_buffer, :LLVMTargetMachineEmitToMemoryBuffer, [OpaqueTargetMachine, :pointer, :code_gen_file_type, :pointer, :pointer], :int

.type_is_sized(ty) ⇒ Integer

Whether the type has a known size.

Things that don’t have a size are abstract types, labels, and void.a

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (Integer)

See Also:

  • llvmllvm::Typellvm::Type::isSized()


1192
# File 'lib/llvm/core_ffi.rb', line 1192

attach_function :type_is_sized, :LLVMTypeIsSized, [:pointer], :int

.type_of(val) ⇒ FFI::Pointer(TypeRef)

Obtain the type of a value.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::Valuellvm::Value::getType()


1718
# File 'lib/llvm/core_ffi.rb', line 1718

attach_function :type_of, :LLVMTypeOf, [:pointer], :pointer

.value_as_basic_block(val) ⇒ FFI::Pointer(BasicBlockRef)

Convert an LLVMValueRef to an LLVMBasicBlockRef instance.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(BasicBlockRef))


3622
# File 'lib/llvm/core_ffi.rb', line 3622

attach_function :value_as_basic_block, :LLVMValueAsBasicBlock, [:pointer], :pointer

.value_is_basic_block(val) ⇒ Integer

Determine whether an LLVMValueRef is itself a basic block.

Parameters:

  • val (FFI::Pointer(ValueRef))

Returns:

  • (Integer)


3614
# File 'lib/llvm/core_ffi.rb', line 3614

attach_function :value_is_basic_block, :LLVMValueIsBasicBlock, [:pointer], :int

.vector_type(element_type, element_count) ⇒ FFI::Pointer(TypeRef)

Create a vector type that contains a defined type and has a specific number of elements.

The created type will exist in the context thats its element type exists in.

Parameters:

  • element_type (FFI::Pointer(TypeRef))
  • element_count (Integer)

Returns:

  • (FFI::Pointer(TypeRef))

See Also:

  • llvmllvm::VectorTypellvm::VectorType::get()


1665
# File 'lib/llvm/core_ffi.rb', line 1665

attach_function :vector_type, :LLVMVectorType, [:pointer, :uint], :pointer

.verify_function(fn, action) ⇒ Integer

Verifies that a single function is valid, taking the specified action. Useful

for debugging.

Parameters:

Returns:

  • (Integer)


53
# File 'lib/llvm/analysis_ffi.rb', line 53

attach_function :verify_function, :LLVMVerifyFunction, [:pointer, :verifier_failure_action], :int

.verify_module(m, action, out_message) ⇒ Integer

Verifies that a module is valid, taking the specified action if not.

Optionally returns a human-readable description of any invalid constructs.
OutMessage must be disposed with LLVMDisposeMessage.

Parameters:

Returns:

  • (Integer)


43
# File 'lib/llvm/analysis_ffi.rb', line 43

attach_function :verify_module, :LLVMVerifyModule, [:pointer, :verifier_failure_action, :pointer], :int

.view_function_cfg(fn) ⇒ nil

Open up a ghostview window that displays the CFG of the current function.

Useful for debugging.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)


62
# File 'lib/llvm/analysis_ffi.rb', line 62

attach_function :view_function_cfg, :LLVMViewFunctionCFG, [:pointer], :void

.view_function_cfg_only(fn) ⇒ nil

(Not documented)

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)


70
# File 'lib/llvm/analysis_ffi.rb', line 70

attach_function :view_function_cfg_only, :LLVMViewFunctionCFGOnly, [:pointer], :void

.void_typeFFI::Pointer(TypeRef)

These are similar to the above functions except they operate on the global context.

Returns:

  • (FFI::Pointer(TypeRef))


1701
# File 'lib/llvm/core_ffi.rb', line 1701

attach_function :void_type, :LLVMVoidType, [], :pointer

.void_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Create a void type in a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1685
# File 'lib/llvm/core_ffi.rb', line 1685

attach_function :void_type_in_context, :LLVMVoidTypeInContext, [:pointer], :pointer

.write_bitcode_to_fd(m, fd, should_close, unbuffered) ⇒ Integer

Writes a module to an open file descriptor. Returns 0 on success.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • fd (Integer)
  • should_close (Integer)
  • unbuffered (Integer)

Returns:

  • (Integer)


107
# File 'lib/llvm/core/bitcode_ffi.rb', line 107

attach_function :write_bitcode_to_fd, :LLVMWriteBitcodeToFD, [:pointer, :int, :int, :int], :int

.write_bitcode_to_file(m, path) ⇒ Integer

Writes a module to the specified path. Returns 0 on success.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • path (String)

Returns:

  • (Integer)


96
# File 'lib/llvm/core/bitcode_ffi.rb', line 96

attach_function :write_bitcode_to_file, :LLVMWriteBitcodeToFile, [:pointer, :string], :int

.write_bitcode_to_file_handle(m, handle) ⇒ Integer

Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file

descriptor. Returns 0 on success. Closes the Handle.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • handle (Integer)

Returns:

  • (Integer)


117
# File 'lib/llvm/core/bitcode_ffi.rb', line 117

attach_function :write_bitcode_to_file_handle, :LLVMWriteBitcodeToFileHandle, [:pointer, :int], :int

.write_bitcode_to_memory_buffer(m) ⇒ FFI::Pointer(MemoryBufferRef)

Writes a module to a new memory buffer and returns it.

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:

  • (FFI::Pointer(MemoryBufferRef))


125
# File 'lib/llvm/core/bitcode_ffi.rb', line 125

attach_function :write_bitcode_to_memory_buffer, :LLVMWriteBitcodeToMemoryBuffer, [:pointer], :pointer

.x86amx_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


107
# File 'lib/llvm/core_ffi_v2.rb', line 107

attach_function :x86amx_type, :LLVMX86AMXType, [], :pointer

.x86fp80_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))


1418
# File 'lib/llvm/core_ffi.rb', line 1418

attach_function :x86fp80_type, :LLVMX86FP80Type, [], :pointer

.x86fp80_type_in_context(c) ⇒ FFI::Pointer(TypeRef)

Obtain a 80-bit floating point type (X87) from a context.

Parameters:

  • c (FFI::Pointer(ContextRef))

Returns:

  • (FFI::Pointer(TypeRef))


1371
# File 'lib/llvm/core_ffi.rb', line 1371

attach_function :x86fp80_type_in_context, :LLVMX86FP80TypeInContext, [:pointer], :pointer