Module: LLVM::C

Extended by:
FFI::Library
Defined in:
lib/llvm/core.rb,
lib/llvm/target.rb,
lib/llvm/core_ffi.rb,
lib/llvm/linker_ffi.rb,
lib/llvm/target_ffi.rb,
lib/llvm/analysis_ffi.rb,
lib/llvm/core/bitcode_ffi.rb,
lib/llvm/transforms/ipo_ffi.rb,
lib/llvm/execution_engine_ffi.rb,
lib/llvm/transforms/scalar_ffi.rb,
lib/llvm/transforms/builder_ffi.rb,
lib/llvm/transforms/vectorize_ffi.rb

Defined Under Namespace

Modules: TargetWrappers Classes: MCJITCompilerOptions, OpaqueExecutionEngine, OpaqueGenericValue, OpaqueMCJITMemoryManager, OpaquePassManagerBuilder, OpaqueTargetData, OpaqueTargetLibraryInfotData, OpaqueTargetMachine, Target

Class Method Summary collapse

Instance 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))

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

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)

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

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)

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

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)

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

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))

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

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)

737
738
739
740
741
742
743
744
745
# File 'lib/llvm/core_ffi.rb', line 737

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)

784
785
786
787
788
789
790
791
792
793
794
795
796
# File 'lib/llvm/core_ffi.rb', line 784

enum :atomic_rmw_bin_op, [
  :xchg, 0,
  :add, 1,
  :sub, 2,
  :and_, 3,
  :nand, 4,
  :or_, 5,
  :xor, 6,
  :max, 7,
  :min, 8,
  :u_max, 9,
  :u_min, 10
]

._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)

120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/llvm/core_ffi.rb', line 120

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)

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

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)

547
548
549
550
551
552
553
554
555
# File 'lib/llvm/core_ffi.rb', line 547

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)

426
427
428
429
# File 'lib/llvm/target_ffi.rb', line 426

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)

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

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)

404
405
406
407
408
409
410
411
# File 'lib/llvm/target_ffi.rb', line 404

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)

815
816
817
818
819
820
# File 'lib/llvm/core_ffi.rb', line 815

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)

518
519
520
521
522
# File 'lib/llvm/core_ffi.rb', line 518

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)

586
587
588
589
590
591
592
593
594
595
596
597
# File 'lib/llvm/core_ffi.rb', line 586

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)

672
673
674
675
# File 'lib/llvm/core_ffi.rb', line 672

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)

462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
# File 'lib/llvm/core_ffi.rb', line 462

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)

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

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)

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
343
344
345
346
347
348
349
350
351
# File 'lib/llvm/core_ffi.rb', line 286

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)

640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
# File 'lib/llvm/core_ffi.rb', line 640

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)

376
377
378
379
380
381
# File 'lib/llvm/target_ffi.rb', line 376

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)

696
697
698
699
700
701
702
# File 'lib/llvm/core_ffi.rb', line 696

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)

396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
# File 'lib/llvm/core_ffi.rb', line 396

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
]

._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)

33
34
35
36
37
# File 'lib/llvm/analysis_ffi.rb', line 33

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)

497
498
499
500
501
# File 'lib/llvm/core_ffi.rb', line 497

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

.abi_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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

.abi_size_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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

.add_aggressive_dce_pass(pm) ⇒ nil

See llvm::createAggressiveDCEPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

21
# File 'lib/llvm/transforms/scalar_ffi.rb', line 21

attach_function :add_aggressive_dce_pass, :LLVMAddAggressiveDCEPass, [:pointer], :void

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

This group contains function that operate on global alias values.

@{

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

See Also:

  • llvmllvm::GlobalAlias

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

attach_function :add_alias, :LLVMAddAlias, [:pointer, :pointer, :pointer, :string], :pointer

.add_alignment_from_assumptions_pass(pm) ⇒ nil

See llvm::createAlignmentFromAssumptionsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

37
# File 'lib/llvm/transforms/scalar_ffi.rb', line 37

attach_function :add_alignment_from_assumptions_pass, :LLVMAddAlignmentFromAssumptionsPass, [:pointer], :void

.add_always_inliner_pass(pm) ⇒ nil

See llvm::createAlwaysInlinerPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

61
# File 'lib/llvm/transforms/ipo_ffi.rb', line 61

attach_function :add_always_inliner_pass, :LLVMAddAlwaysInlinerPass, [:pointer], :void

.add_analysis_passes(t, pm) ⇒ nil

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

Parameters:

Returns:

  • (nil)

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

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

.add_argument_promotion_pass(pm) ⇒ nil

See llvm::createArgumentPromotionPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

21
# File 'lib/llvm/transforms/ipo_ffi.rb', line 21

attach_function :add_argument_promotion_pass, :LLVMAddArgumentPromotionPass, [:pointer], :void

.add_basic_alias_analysis_pass(pm) ⇒ nil

See llvm::createBasicAliasAnalysisPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

342
# File 'lib/llvm/transforms/scalar_ffi.rb', line 342

attach_function :add_basic_alias_analysis_pass, :LLVMAddBasicAliasAnalysisPass, [:pointer], :void

.add_bb_vectorize_pass(pm) ⇒ nil

DEPRECATED - Use LLVMAddSLPVectorizePass

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

21
# File 'lib/llvm/transforms/vectorize_ffi.rb', line 21

attach_function :add_bb_vectorize_pass, :LLVMAddBBVectorizePass, [:pointer], :void

.add_bit_tracking_dce_pass(pm) ⇒ nil

See llvm::createBitTrackingDCEPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

29
# File 'lib/llvm/transforms/scalar_ffi.rb', line 29

attach_function :add_bit_tracking_dce_pass, :LLVMAddBitTrackingDCEPass, [: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)

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

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

.add_cfg_simplification_pass(pm) ⇒ nil

See llvm::createCFGSimplificationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

45
# File 'lib/llvm/transforms/scalar_ffi.rb', line 45

attach_function :add_cfg_simplification_pass, :LLVMAddCFGSimplificationPass, [: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)

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

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

.add_constant_merge_pass(pm) ⇒ nil

See llvm::createConstantMergePass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

29
# File 'lib/llvm/transforms/ipo_ffi.rb', line 29

attach_function :add_constant_merge_pass, :LLVMAddConstantMergePass, [:pointer], :void

.add_constant_propagation_pass(pm) ⇒ nil

See llvm::createConstantPropagationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

270
# File 'lib/llvm/transforms/scalar_ffi.rb', line 270

attach_function :add_constant_propagation_pass, :LLVMAddConstantPropagationPass, [:pointer], :void

.add_correlated_value_propagation_pass(pm) ⇒ nil

See llvm::createCorrelatedValuePropagationPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

294
# File 'lib/llvm/transforms/scalar_ffi.rb', line 294

attach_function :add_correlated_value_propagation_pass, :LLVMAddCorrelatedValuePropagationPass, [:pointer], :void

.add_dead_arg_elimination_pass(pm) ⇒ nil

See llvm::createDeadArgEliminationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

37
# File 'lib/llvm/transforms/ipo_ffi.rb', line 37

attach_function :add_dead_arg_elimination_pass, :LLVMAddDeadArgEliminationPass, [:pointer], :void

.add_dead_store_elimination_pass(pm) ⇒ nil

See llvm::createDeadStoreEliminationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

61
# File 'lib/llvm/transforms/scalar_ffi.rb', line 61

attach_function :add_dead_store_elimination_pass, :LLVMAddDeadStoreEliminationPass, [:pointer], :void

.add_demote_memory_to_register_pass(pm) ⇒ nil

See llvm::demotePromoteMemoryToRegisterPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

278
# File 'lib/llvm/transforms/scalar_ffi.rb', line 278

attach_function :add_demote_memory_to_register_pass, :LLVMAddDemoteMemoryToRegisterPass, [: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)

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

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

.add_early_cse_mem_ssa_pass(pm) ⇒ nil

See llvm::createEarlyCSEPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

310
# File 'lib/llvm/transforms/scalar_ffi.rb', line 310

attach_function :add_early_cse_mem_ssa_pass, :LLVMAddEarlyCSEMemSSAPass, [:pointer], :void

.add_early_cse_pass(pm) ⇒ nil

See llvm::createEarlyCSEPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

302
# File 'lib/llvm/transforms/scalar_ffi.rb', line 302

attach_function :add_early_cse_pass, :LLVMAddEarlyCSEPass, [: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()

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

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

.add_function_attrs_pass(pm) ⇒ nil

See llvm::createFunctionAttrsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

45
# File 'lib/llvm/transforms/ipo_ffi.rb', line 45

attach_function :add_function_attrs_pass, :LLVMAddFunctionAttrsPass, [:pointer], :void

.add_function_inlining_pass(pm) ⇒ nil

See llvm::createFunctionInliningPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

53
# File 'lib/llvm/transforms/ipo_ffi.rb', line 53

attach_function :add_function_inlining_pass, :LLVMAddFunctionInliningPass, [:pointer], :void

.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

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

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

.add_global_dce_pass(pm) ⇒ nil

See llvm::createGlobalDCEPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

69
# File 'lib/llvm/transforms/ipo_ffi.rb', line 69

attach_function :add_global_dce_pass, :LLVMAddGlobalDCEPass, [:pointer], :void

.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))

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

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)

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

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

.add_global_optimizer_pass(pm) ⇒ nil

See llvm::createGlobalOptimizerPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

77
# File 'lib/llvm/transforms/ipo_ffi.rb', line 77

attach_function :add_global_optimizer_pass, :LLVMAddGlobalOptimizerPass, [:pointer], :void

.add_gvn_pass(pm) ⇒ nil

See llvm::createGVNPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

85
# File 'lib/llvm/transforms/scalar_ffi.rb', line 85

attach_function :add_gvn_pass, :LLVMAddGVNPass, [: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)

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

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

.add_ind_var_simplify_pass(pm) ⇒ nil

See llvm::createIndVarSimplifyPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

101
# File 'lib/llvm/transforms/scalar_ffi.rb', line 101

attach_function :add_ind_var_simplify_pass, :LLVMAddIndVarSimplifyPass, [:pointer], :void

.add_instruction_combining_pass(pm) ⇒ nil

See llvm::createInstructionCombiningPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

109
# File 'lib/llvm/transforms/scalar_ffi.rb', line 109

attach_function :add_instruction_combining_pass, :LLVMAddInstructionCombiningPass, [:pointer], :void

.add_internalize_pass(pass_manager_ref, all_but_main) ⇒ nil

See llvm::createInternalizePass function.

Parameters:

  • pass_manager_ref (FFI::Pointer(PassManagerRef))
  • all_but_main (Integer)

Returns:

  • (nil)

110
# File 'lib/llvm/transforms/ipo_ffi.rb', line 110

attach_function :add_internalize_pass, :LLVMAddInternalizePass, [:pointer, :uint], :void

.add_ip_constant_propagation_pass(pm) ⇒ nil

See llvm::createIPConstantPropagationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

85
# File 'lib/llvm/transforms/ipo_ffi.rb', line 85

attach_function :add_ip_constant_propagation_pass, :LLVMAddIPConstantPropagationPass, [:pointer], :void

.add_ipsccp_pass(pm) ⇒ nil

See llvm::createIPSCCPPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

101
# File 'lib/llvm/transforms/ipo_ffi.rb', line 101

attach_function :add_ipsccp_pass, :LLVMAddIPSCCPPass, [:pointer], :void

.add_jump_threading_pass(pm) ⇒ nil

See llvm::createJumpThreadingPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

117
# File 'lib/llvm/transforms/scalar_ffi.rb', line 117

attach_function :add_jump_threading_pass, :LLVMAddJumpThreadingPass, [:pointer], :void

.add_late_cfg_simplification_pass(pm) ⇒ nil

See llvm::createLateCFGSimplificationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

53
# File 'lib/llvm/transforms/scalar_ffi.rb', line 53

attach_function :add_late_cfg_simplification_pass, :LLVMAddLateCFGSimplificationPass, [:pointer], :void

.add_licm_pass(pm) ⇒ nil

See llvm::createLICMPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

125
# File 'lib/llvm/transforms/scalar_ffi.rb', line 125

attach_function :add_licm_pass, :LLVMAddLICMPass, [:pointer], :void

.add_loop_deletion_pass(pm) ⇒ nil

See llvm::createLoopDeletionPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

133
# File 'lib/llvm/transforms/scalar_ffi.rb', line 133

attach_function :add_loop_deletion_pass, :LLVMAddLoopDeletionPass, [:pointer], :void

.add_loop_idiom_pass(pm) ⇒ nil

See llvm::createLoopIdiomPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

141
# File 'lib/llvm/transforms/scalar_ffi.rb', line 141

attach_function :add_loop_idiom_pass, :LLVMAddLoopIdiomPass, [:pointer], :void

.add_loop_reroll_pass(pm) ⇒ nil

See llvm::createLoopRerollPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

157
# File 'lib/llvm/transforms/scalar_ffi.rb', line 157

attach_function :add_loop_reroll_pass, :LLVMAddLoopRerollPass, [:pointer], :void

.add_loop_rotate_pass(pm) ⇒ nil

See llvm::createLoopRotatePass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

149
# File 'lib/llvm/transforms/scalar_ffi.rb', line 149

attach_function :add_loop_rotate_pass, :LLVMAddLoopRotatePass, [:pointer], :void

.add_loop_unroll_pass(pm) ⇒ nil

See llvm::createLoopUnrollPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

165
# File 'lib/llvm/transforms/scalar_ffi.rb', line 165

attach_function :add_loop_unroll_pass, :LLVMAddLoopUnrollPass, [:pointer], :void

.add_loop_unswitch_pass(pm) ⇒ nil

See llvm::createLoopUnswitchPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

173
# File 'lib/llvm/transforms/scalar_ffi.rb', line 173

attach_function :add_loop_unswitch_pass, :LLVMAddLoopUnswitchPass, [:pointer], :void

.add_loop_vectorize_pass(pm) ⇒ nil

See llvm::createLoopVectorizePass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

29
# File 'lib/llvm/transforms/vectorize_ffi.rb', line 29

attach_function :add_loop_vectorize_pass, :LLVMAddLoopVectorizePass, [:pointer], :void

.add_lower_expect_intrinsic_pass(pm) ⇒ nil

See llvm::createLowerExpectIntrinsicPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

318
# File 'lib/llvm/transforms/scalar_ffi.rb', line 318

attach_function :add_lower_expect_intrinsic_pass, :LLVMAddLowerExpectIntrinsicPass, [:pointer], :void

.add_lower_switch_pass(pm) ⇒ nil

See llvm::createLowerSwitchPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

197
# File 'lib/llvm/transforms/scalar_ffi.rb', line 197

attach_function :add_lower_switch_pass, :LLVMAddLowerSwitchPass, [:pointer], :void

.add_mem_cpy_opt_pass(pm) ⇒ nil

See llvm::createMemCpyOptPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

181
# File 'lib/llvm/transforms/scalar_ffi.rb', line 181

attach_function :add_mem_cpy_opt_pass, :LLVMAddMemCpyOptPass, [:pointer], :void

.add_merged_load_store_motion_pass(pm) ⇒ nil

See llvm::createMergedLoadStoreMotionPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

77
# File 'lib/llvm/transforms/scalar_ffi.rb', line 77

attach_function :add_merged_load_store_motion_pass, :LLVMAddMergedLoadStoreMotionPass, [:pointer], :void

.add_module(ee, m) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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()

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

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

.add_new_gvn_pass(pm) ⇒ nil

See llvm::createGVNPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

93
# File 'lib/llvm/transforms/scalar_ffi.rb', line 93

attach_function :add_new_gvn_pass, :LLVMAddNewGVNPass, [:pointer], :void

.add_partially_inline_lib_calls_pass(pm) ⇒ nil

See llvm::createPartiallyInlineLibCallsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

189
# File 'lib/llvm/transforms/scalar_ffi.rb', line 189

attach_function :add_partially_inline_lib_calls_pass, :LLVMAddPartiallyInlineLibCallsPass, [:pointer], :void

.add_promote_memory_to_register_pass(pm) ⇒ nil

See llvm::createPromoteMemoryToRegisterPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

205
# File 'lib/llvm/transforms/scalar_ffi.rb', line 205

attach_function :add_promote_memory_to_register_pass, :LLVMAddPromoteMemoryToRegisterPass, [:pointer], :void

.add_prune_eh_pass(pm) ⇒ nil

See llvm::createPruneEHPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

93
# File 'lib/llvm/transforms/ipo_ffi.rb', line 93

attach_function :add_prune_eh_pass, :LLVMAddPruneEHPass, [:pointer], :void

.add_reassociate_pass(pm) ⇒ nil

See llvm::createReassociatePass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

213
# File 'lib/llvm/transforms/scalar_ffi.rb', line 213

attach_function :add_reassociate_pass, :LLVMAddReassociatePass, [:pointer], :void

.add_scalar_repl_aggregates_pass(pm) ⇒ nil

See llvm::createSROAPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

229
# File 'lib/llvm/transforms/scalar_ffi.rb', line 229

attach_function :add_scalar_repl_aggregates_pass, :LLVMAddScalarReplAggregatesPass, [:pointer], :void

.add_scalar_repl_aggregates_pass_ssa(pm) ⇒ nil

See llvm::createSROAPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

237
# File 'lib/llvm/transforms/scalar_ffi.rb', line 237

attach_function :add_scalar_repl_aggregates_pass_ssa, :LLVMAddScalarReplAggregatesPassSSA, [:pointer], :void

.add_scalar_repl_aggregates_pass_with_threshold(pm, threshold) ⇒ nil

See llvm::createSROAPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))
  • threshold (Integer)

Returns:

  • (nil)

246
# File 'lib/llvm/transforms/scalar_ffi.rb', line 246

attach_function :add_scalar_repl_aggregates_pass_with_threshold, :LLVMAddScalarReplAggregatesPassWithThreshold, [:pointer, :int], :void

.add_scalarizer_pass(pm) ⇒ nil

See llvm::createScalarizerPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

69
# File 'lib/llvm/transforms/scalar_ffi.rb', line 69

attach_function :add_scalarizer_pass, :LLVMAddScalarizerPass, [:pointer], :void

.add_sccp_pass(pm) ⇒ nil

See llvm::createSCCPPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

221
# File 'lib/llvm/transforms/scalar_ffi.rb', line 221

attach_function :add_sccp_pass, :LLVMAddSCCPPass, [:pointer], :void

.add_scoped_no_alias_aa_pass(pm) ⇒ nil

See llvm::createScopedNoAliasAAPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

334
# File 'lib/llvm/transforms/scalar_ffi.rb', line 334

attach_function :add_scoped_no_alias_aa_pass, :LLVMAddScopedNoAliasAAPass, [:pointer], :void

.add_simplify_lib_calls_pass(pm) ⇒ nil

See llvm::createSimplifyLibCallsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

254
# File 'lib/llvm/transforms/scalar_ffi.rb', line 254

attach_function :add_simplify_lib_calls_pass, :LLVMAddSimplifyLibCallsPass, [:pointer], :void

.add_slp_vectorize_pass(pm) ⇒ nil

See llvm::createSLPVectorizerPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

37
# File 'lib/llvm/transforms/vectorize_ffi.rb', line 37

attach_function :add_slp_vectorize_pass, :LLVMAddSLPVectorizePass, [:pointer], :void

.add_strip_dead_prototypes_pass(pm) ⇒ nil

See llvm::createStripDeadPrototypesPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

118
# File 'lib/llvm/transforms/ipo_ffi.rb', line 118

attach_function :add_strip_dead_prototypes_pass, :LLVMAddStripDeadPrototypesPass, [:pointer], :void

.add_strip_symbols_pass(pm) ⇒ nil

See llvm::createStripSymbolsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

126
# File 'lib/llvm/transforms/ipo_ffi.rb', line 126

attach_function :add_strip_symbols_pass, :LLVMAddStripSymbolsPass, [:pointer], :void

.add_symbol(symbol_name, symbol_value) ⇒ nil

(Not documented)

Parameters:

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

Returns:

  • (nil)

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

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

.add_tail_call_elimination_pass(pm) ⇒ nil

See llvm::createTailCallEliminationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

262
# File 'lib/llvm/transforms/scalar_ffi.rb', line 262

attach_function :add_tail_call_elimination_pass, :LLVMAddTailCallEliminationPass, [: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()

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

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

.add_target_library_info(tli, pm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.add_type_based_alias_analysis_pass(pm) ⇒ nil

See llvm::createTypeBasedAliasAnalysisPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

326
# File 'lib/llvm/transforms/scalar_ffi.rb', line 326

attach_function :add_type_based_alias_analysis_pass, :LLVMAddTypeBasedAliasAnalysisPass, [:pointer], :void

.add_verifier_pass(pm) ⇒ nil

See llvm::createVerifierPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

286
# File 'lib/llvm/transforms/scalar_ffi.rb', line 286

attach_function :add_verifier_pass, :LLVMAddVerifierPass, [:pointer], :void

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

(Not documented)

Parameters:

  • ty (FFI::Pointer(TypeRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

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()

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

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()

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

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()

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

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

.attach_function(name, *_) ⇒ Object


9
10
11
12
13
# File 'lib/llvm/core_ffi.rb', line 9

def self.attach_function(name, *_)
  begin; super; rescue FFI::NotFoundError => e
    (class << self; self; end).class_eval { define_method(name) { |*_| raise e } }
  end
end

.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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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

.build_call(builder_ref, fn, args, num_args, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • fn (FFI::Pointer(ValueRef))
  • args (FFI::Pointer(*ValueRef))
  • num_args (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_call, :LLVMBuildCall, [:pointer, :pointer, :pointer, :uint, :string], :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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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

.build_gep(b, pointer, indices, num_indices, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • pointer (FFI::Pointer(ValueRef))
  • indices (FFI::Pointer(*ValueRef))
  • num_indices (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_gep, :LLVMBuildGEP, [:pointer, :pointer, :pointer, :uint, :string], :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))

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

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))

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

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))

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

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

.build_in_bounds_gep(b, pointer, indices, num_indices, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • pointer (FFI::Pointer(ValueRef))
  • indices (FFI::Pointer(*ValueRef))
  • num_indices (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_in_bounds_gep, :LLVMBuildInBoundsGEP, [:pointer, :pointer, :pointer, :uint, :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))

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

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))

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

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))

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

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))

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

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))

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

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

.build_invoke(builder_ref, fn, args, num_args, then_, catch, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • builder_ref (FFI::Pointer(BuilderRef))
  • fn (FFI::Pointer(ValueRef))
  • args (FFI::Pointer(*ValueRef))
  • num_args (Integer)
  • then_ (FFI::Pointer(BasicBlockRef))
  • catch (FFI::Pointer(BasicBlockRef))
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_invoke, :LLVMBuildInvoke, [:pointer, :pointer, :pointer, :uint, :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))

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

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))

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

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))

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

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))

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

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

.build_load(builder_ref, pointer_val, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_load, :LLVMBuildLoad, [:pointer, :pointer, :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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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

.build_ptr_diff(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))

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

attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [: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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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

.build_struct_gep(b, pointer, idx, name) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • b (FFI::Pointer(BuilderRef))
  • pointer (FFI::Pointer(ValueRef))
  • idx (Integer)
  • name (String)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :build_struct_gep, :LLVMBuildStructGEP, [:pointer, :pointer, :uint, :string], :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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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:


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

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

.call_frame_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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)

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_a_shr, :LLVMConstAShr, [:pointer, :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))

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

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))

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

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()

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_and, :LLVMConstAnd, [:pointer, :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()

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_exact_s_div, :LLVMConstExactSDiv, [: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))

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

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

.const_extract_value(agg_constant, idx_list, num_idx) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • agg_constant (FFI::Pointer(ValueRef))
  • idx_list (FFI::Pointer(*UInt))
  • num_idx (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_extract_value, :LLVMConstExtractValue, [:pointer, :pointer, :uint], :pointer

.const_f_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))

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

attach_function :const_f_add, :LLVMConstFAdd, [:pointer, :pointer], :pointer

.const_f_cmp(predicate, lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • predicate (Symbol from _enum_real_predicate_)
  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_f_cmp, :LLVMConstFCmp, [:real_predicate, :pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_f_div, :LLVMConstFDiv, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_f_mul, :LLVMConstFMul, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_f_neg, :LLVMConstFNeg, [:pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_f_rem, :LLVMConstFRem, [:pointer, :pointer], :pointer

.const_f_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))

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

attach_function :const_f_sub, :LLVMConstFSub, [:pointer, :pointer], :pointer

.const_fp_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))

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

attach_function :const_fp_cast, :LLVMConstFPCast, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_fp_ext, :LLVMConstFPExt, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_fp_to_si, :LLVMConstFPToSI, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_fp_to_ui, :LLVMConstFPToUI, [:pointer, :pointer], :pointer

.const_fp_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))

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

attach_function :const_fp_trunc, :LLVMConstFPTrunc, [:pointer, :pointer], :pointer

.const_gep(constant_val, constant_indices, num_indices) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • constant_indices (FFI::Pointer(*ValueRef))
  • num_indices (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_gep, :LLVMConstGEP, [:pointer, :pointer, :uint], :pointer

.const_i_cmp(predicate, lhs_constant, rhs_constant) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • predicate (Symbol from _enum_int_predicate_)
  • lhs_constant (FFI::Pointer(ValueRef))
  • rhs_constant (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_i_cmp, :LLVMConstICmp, [:int_predicate, :pointer, :pointer], :pointer

.const_in_bounds_gep(constant_val, constant_indices, num_indices) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))
  • constant_indices (FFI::Pointer(*ValueRef))
  • num_indices (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [:pointer, :pointer, :uint], :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))

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

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))

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

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

.const_insert_value(agg_constant, element_value_constant, idx_list, num_idx) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • agg_constant (FFI::Pointer(ValueRef))
  • element_value_constant (FFI::Pointer(ValueRef))
  • idx_list (FFI::Pointer(*UInt))
  • num_idx (Integer)

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_insert_value, :LLVMConstInsertValue, [:pointer, :pointer, :pointer, :uint], :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()

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

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

.const_int_cast(constant_val, to_type, is_signed) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_int_cast, :LLVMConstIntCast, [:pointer, :pointer, :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()

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

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()

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

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()

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

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()

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

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()

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_l_shr, :LLVMConstLShr, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_mul, :LLVMConstMul, [: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()

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

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))

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

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))

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_nsw_mul, :LLVMConstNSWMul, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

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))

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

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()

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_nuw_mul, :LLVMConstNUWMul, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

  • constant_val (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_or, :LLVMConstOr, [: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))

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

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))

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

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))

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

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))

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

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

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

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))

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_s_div, :LLVMConstSDiv, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_s_ext, :LLVMConstSExt, [:pointer, :pointer], :pointer

.const_s_ext_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))

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

attach_function :const_s_ext_or_bit_cast, :LLVMConstSExtOrBitCast, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_s_rem, :LLVMConstSRem, [:pointer, :pointer], :pointer

.const_select(constant_condition, constant_if_true, constant_if_false) ⇒ FFI::Pointer(ValueRef)

(Not documented)

Parameters:

  • constant_condition (FFI::Pointer(ValueRef))
  • constant_if_true (FFI::Pointer(ValueRef))
  • constant_if_false (FFI::Pointer(ValueRef))

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_select, :LLVMConstSelect, [:pointer, :pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_shl, :LLVMConstShl, [:pointer, :pointer], :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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_si_to_fp, :LLVMConstSIToFP, [: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()

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

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()

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

attach_function :const_string_in_context, :LLVMConstStringInContext, [:pointer, :string, :uint, :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()

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

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()

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

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))

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

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))

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_u_div, :LLVMConstUDiv, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_u_rem, :LLVMConstURem, [:pointer, :pointer], :pointer

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_ui_to_fp, :LLVMConstUIToFP, [: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()

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

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))

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

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

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

(Not documented)

Parameters:

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

Returns:

  • (FFI::Pointer(ValueRef))

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

attach_function :const_z_ext, :LLVMConstZExt, [:pointer, :pointer], :pointer

.const_z_ext_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))

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

attach_function :const_z_ext_or_bit_cast, :LLVMConstZExtOrBitCast, [: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))

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

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)

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

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)

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

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()

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

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)

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

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)

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

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)

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

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)

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

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()

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

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()

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

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

.create_builderFFI::Pointer(BuilderRef)

(Not documented)

Returns:

  • (FFI::Pointer(BuilderRef))

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

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))

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

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)

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

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))

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

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))

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

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:


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

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:


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

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:


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

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)

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

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)

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

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)

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

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)

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

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))

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

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))

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

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)

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

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

.create_message(message) ⇒ String

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

Parameters:

  • message (String)

Returns:

  • (String)

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

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))

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

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))

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

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:


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

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:


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

attach_function :create_target_data, :LLVMCreateTargetData, [:string], OpaqueTargetData

.create_target_data_layout(t) ⇒ OpaqueTargetData

Create a DataLayout based on the targetMachine.

Parameters:

Returns:


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

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:


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

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()

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

attach_function :delete_basic_block, :LLVMDeleteBasicBlock, [:pointer], :void

.delete_function(fn) ⇒ nil

Remove a function from its containing module and deletes it.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::eraseFromParent()

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

attach_function :delete_function, :LLVMDeleteFunction, [:pointer], :void

.delete_global(global_var) ⇒ nil

(Not documented)

Parameters:

  • global_var (FFI::Pointer(ValueRef))

Returns:

  • (nil)

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

attach_function :delete_global, :LLVMDeleteGlobal, [:pointer], :void

.dispose_builder(builder) ⇒ nil

(Not documented)

Parameters:

  • builder (FFI::Pointer(BuilderRef))

Returns:

  • (nil)

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

attach_function :dispose_builder, :LLVMDisposeBuilder, [:pointer], :void

.dispose_execution_engine(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

attach_function :dispose_execution_engine, :LLVMDisposeExecutionEngine, [OpaqueExecutionEngine], :void

.dispose_generic_value(gen_val) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

attach_function :dispose_generic_value, :LLVMDisposeGenericValue, [OpaqueGenericValue], :void

.dispose_mcjit_memory_manager(mm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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)

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

attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [:pointer], :void

.dispose_message(message) ⇒ nil

(Not documented)

Parameters:

  • message (String)

Returns:

  • (nil)

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

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)

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

attach_function :dispose_module, :LLVMDisposeModule, [:pointer], :void

.dispose_module_provider(m) ⇒ nil

Destroys the module M.

Parameters:

  • m (FFI::Pointer(ModuleProviderRef))

Returns:

  • (nil)

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

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)

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

attach_function :dispose_pass_manager, :LLVMDisposePassManager, [:pointer], :void

.dispose_target_data(td) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

attach_function :dispose_target_data, :LLVMDisposeTargetData, [OpaqueTargetData], :void

.dispose_target_machine(t) ⇒ nil

Dispose the LLVMTargetMachineRef instance generated by

LLVMCreateTargetMachine.

Parameters:

Returns:

  • (nil)

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

attach_function :dispose_target_machine, :LLVMDisposeTargetMachine, [OpaqueTargetMachine], :void

.double_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))

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

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))

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

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()

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

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()

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

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()

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

attach_function :dump_value, :LLVMDumpValue, [:pointer], :void

.element_at_offset(td, struct_ty, offset) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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)

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

attach_function :finalize_function_pass_manager, :LLVMFinalizeFunctionPassManager, [:pointer], :int

.find_function(ee, name, out_fn) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

attach_function :find_function, :LLVMFindFunction, [OpaqueExecutionEngine, :string, :pointer], :int

.float_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))

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

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))

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

attach_function :float_type_in_context, :LLVMFloatTypeInContext, [:pointer], :pointer

.fp128_typeFFI::Pointer(TypeRef)

(Not documented)

Returns:

  • (FFI::Pointer(TypeRef))

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

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))

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

attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [:pointer], :pointer

.free_machine_code_for_function(ee, f) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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))

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

attach_function :function_type, :LLVMFunctionType, [:pointer, :pointer, :uint, :int], :pointer

.generic_value_int_width(gen_val_ref) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

attach_function :generic_value_int_width, :LLVMGenericValueIntWidth, [OpaqueGenericValue], :uint

.generic_value_to_float(ty_ref, gen_val) ⇒ Float

(Not documented)

Parameters:

Returns:


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

attach_function :generic_value_to_float, :LLVMGenericValueToFloat, [:pointer, OpaqueGenericValue], :double

.generic_value_to_int(gen_val, is_signed) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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))

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

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()

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

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()

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

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()

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

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()

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

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()

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

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)

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

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)

84
# File 'lib/llvm/core/bitcode_ffi.rb', line 84

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)

93
# File 'lib/llvm/core/bitcode_ffi.rb', line 93

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)

64
# File 'lib/llvm/core/bitcode_ffi.rb', line 64

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)

74
# File 'lib/llvm/core/bitcode_ffi.rb', line 74

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)

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

attach_function :get_buffer_size, :LLVMGetBufferSize, [:pointer], :ulong

.get_buffer_start(mem_buf) ⇒ String

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))

Returns:

  • (String)

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

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

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

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.

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

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))

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

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()

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

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)

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

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()

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

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()

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

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:


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

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()

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

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()

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

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()

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

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))

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

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))

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

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()

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

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()

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

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()

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

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))

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

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))

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

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()

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

attach_function :get_first_param, :LLVMGetFirstParam, [:pointer], :pointer

.get_first_targetTarget

Returns the first llvm::Target in the registered targets list.

Returns:


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

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()

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

attach_function :get_first_use, :LLVMGetFirstUse, [:pointer], :pointer

.get_function_address(ee, name) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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()

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

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()

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

attach_function :get_gc, :LLVMGetGC, [:pointer], :string

.get_global_contextFFI::Pointer(ContextRef)

Obtain the global context instance.

Returns:

  • (FFI::Pointer(ContextRef))

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

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

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

attach_function :get_global_parent, :LLVMGetGlobalParent, [:pointer], :pointer

.get_global_pass_registryFFI::Pointer(PassRegistryRef)

Return the global pass registry, for use with initialization functions.

@see llvm::PassRegistry::getPassRegistry

Returns:

  • (FFI::Pointer(PassRegistryRef))

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

attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], :pointer

.get_global_value_address(ee, name) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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()

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

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))

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

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))

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

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))

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

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))

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

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()

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

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()

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

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()

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

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)

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

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()

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

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()

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

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()

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

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))

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

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))

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

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()

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

attach_function :get_last_param, :LLVMGetLastParam, [:pointer], :pointer

.get_linkage(global) ⇒ Symbol from _enum_linkage_

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:


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

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)

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

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)

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

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)

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

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)

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

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)

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

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))

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

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()

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

attach_function :get_module_context, :LLVMGetModuleContext, [:pointer], :pointer

.get_module_data_layout(m) ⇒ OpaqueTargetData

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))

Returns:


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

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()

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

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))

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

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()

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

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()

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

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))

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

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))

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

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))

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

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))

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

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))

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

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:


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

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))

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

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()

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

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

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

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()

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

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()

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

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:


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

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()

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

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))

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

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)

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

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()

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

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()

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

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()

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

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))

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

attach_function :get_return_type, :LLVMGetReturnType, [:pointer], :pointer

.get_section(global) ⇒ String

(Not documented)

Parameters:

  • global (FFI::Pointer(ValueRef))

Returns:

  • (String)

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

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)

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

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()

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

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

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

attach_function :get_successor, :LLVMGetSuccessor, [:pointer,