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, OpaqueBasicBlock, OpaqueBuilder, OpaqueContext, OpaqueDiagnosticInfo, OpaqueExecutionEngine, OpaqueGenericValue, OpaqueMCJITMemoryManager, OpaqueMemoryBuffer, OpaqueModule, OpaqueModuleProvider, OpaquePassManager, OpaquePassManagerBuilder, OpaquePassRegistry, OpaqueTargetData, OpaqueTargetLibraryInfotData, OpaqueTargetMachine, OpaqueType, OpaqueUse, OpaqueValue, Target

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

._callback_diagnostic_handler_(void) ⇒ OpaqueDiagnosticInfo

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:

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

Returns:


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

callback :diagnostic_handler, [:pointer], OpaqueDiagnosticInfo

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

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

This entry is only for documentation and no real method.

Parameters:

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

Returns:

  • (Integer)

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

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

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

(Not documented)

This entry is only for documentation and no real method.

Parameters:

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

Returns:

  • (Integer)

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

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

._callback_memory_manager_finalize_memory_callback_(opaque, err_msg) ⇒ Integer

(Not documented)

This entry is only for documentation and no real method.

Parameters:

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

Returns:

  • (Integer)

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

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

._callback_yield_callback_(void) ⇒ OpaqueContext

(Not documented)

This entry is only for documentation and no real method.

Parameters:

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

Returns:


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

callback :yield_callback, [:pointer], OpaqueContext

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

782
783
784
785
786
787
788
789
790
# File 'lib/llvm/core_ffi.rb', line 782

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)

829
830
831
832
833
834
835
836
837
838
839
840
841
# File 'lib/llvm/core_ffi.rb', line 829

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)

183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
# File 'lib/llvm/core_ffi.rb', line 183

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)

592
593
594
595
596
597
598
599
600
# File 'lib/llvm/core_ffi.rb', line 592

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)

418
419
420
421
# File 'lib/llvm/target_ffi.rb', line 418

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)

344
345
346
347
348
349
# File 'lib/llvm/target_ffi.rb', line 344

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)

396
397
398
399
400
401
402
403
# File 'lib/llvm/target_ffi.rb', line 396

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)

860
861
862
863
864
865
# File 'lib/llvm/core_ffi.rb', line 860

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)

563
564
565
566
567
# File 'lib/llvm/core_ffi.rb', line 563

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)

631
632
633
634
635
636
637
638
639
640
641
642
# File 'lib/llvm/core_ffi.rb', line 631

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)

717
718
719
720
# File 'lib/llvm/core_ffi.rb', line 717

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)

507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
# File 'lib/llvm/core_ffi.rb', line 507

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

Returns:

  • (Symbol)

339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
# File 'lib/llvm/core_ffi.rb', line 339

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
]

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

685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
# File 'lib/llvm/core_ffi.rb', line 685

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)

368
369
370
371
372
373
# File 'lib/llvm/target_ffi.rb', line 368

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)

741
742
743
744
745
746
747
# File 'lib/llvm/core_ffi.rb', line 741

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

Returns:

  • (Symbol)

442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
# File 'lib/llvm/core_ffi.rb', line 442

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
]

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

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

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

.abi_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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

.abi_size_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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

This group contains function that operate on global alias values.

@{

Parameters:

Returns:

See Also:

  • llvmllvm::GlobalAlias

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

attach_function :add_alias, :LLVMAddAlias, [OpaqueModule, OpaqueType, OpaqueValue, :string], OpaqueValue

.add_alignment_from_assumptions_pass(pm) ⇒ nil

See llvm::createAlignmentFromAssumptionsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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)

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

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_attribute(arg, pa) ⇒ nil

Add an attribute to a function argument.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Argumentllvm::Argument::addAttr()

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

attach_function :add_attribute, :LLVMAddAttribute, [OpaqueValue, :attribute], :void

.add_basic_alias_analysis_pass(pm) ⇒ nil

See llvm::createBasicAliasAnalysisPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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

.add_bb_vectorize_pass(pm) ⇒ nil

See llvm::createBBVectorizePass function.

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_case(switch, on_val, dest) ⇒ nil

Add a case to the switch instruction

Parameters:

Returns:

  • (nil)

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

attach_function :add_case, :LLVMAddCase, [OpaqueValue, OpaqueValue, OpaqueBasicBlock], :void

.add_cfg_simplification_pass(pm) ⇒ nil

See llvm::createCFGSimplificationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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:

Returns:

  • (nil)

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

attach_function :add_clause, :LLVMAddClause, [OpaqueValue, OpaqueValue], :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)

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

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)

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

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)

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

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)

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

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:

Returns:

  • (nil)

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

attach_function :add_destination, :LLVMAddDestination, [OpaqueValue, OpaqueBasicBlock], :void

.add_early_cse_pass(pm) ⇒ nil

See llvm::createEarlyCSEPass function

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

attach_function :add_early_cse_pass, :LLVMAddEarlyCSEPass, [:pointer], :void

.add_function(m, name, function_ty) ⇒ OpaqueValue

Add a function to a module under a specified name.

Parameters:

Returns:

See Also:

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

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

attach_function :add_function, :LLVMAddFunction, [OpaqueModule, :string, OpaqueType], OpaqueValue

.add_function_attr(fn, pa) ⇒ nil

Add an attribute to a function.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::addAttribute()

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

attach_function :add_function_attr, :LLVMAddFunctionAttr, [OpaqueValue, :attribute], :void

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

This group contains functions that operate on global variable values.

@{

Parameters:

Returns:

See Also:

  • llvmllvm::GlobalVariable

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

attach_function :add_global, :LLVMAddGlobal, [OpaqueModule, OpaqueType, :string], OpaqueValue

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

(Not documented)

Parameters:

Returns:


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

attach_function :add_global_in_address_space, :LLVMAddGlobalInAddressSpace, [OpaqueModule, OpaqueType, :string, :uint], OpaqueValue

.add_global_mapping(ee, global, addr) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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)

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

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 (OpaqueValue)
  • incoming_values (FFI::Pointer(*ValueRef))
  • incoming_blocks (FFI::Pointer(*BasicBlockRef))
  • count (Integer)

Returns:

  • (nil)

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

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

.add_ind_var_simplify_pass(pm) ⇒ nil

See llvm::createIndVarSimplifyPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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

.add_instr_attribute(instr, index, attribute) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

attach_function :add_instr_attribute, :LLVMAddInstrAttribute, [OpaqueValue, :uint, :attribute], :void

.add_instruction_combining_pass(pm) ⇒ nil

See llvm::createInstructionCombiningPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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)

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

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

.add_licm_pass(pm) ⇒ nil

See llvm::createLICMPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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)

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

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

.add_module(ee, m) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.add_module_provider(ee, mp) ⇒ nil

Deprecated: Use LLVMAddModule instead.

Parameters:

Returns:

  • (nil)

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

attach_function :add_module_provider, :LLVMAddModuleProvider, [OpaqueExecutionEngine, :pointer], :void

.add_named_metadata_operand(m, name, val) ⇒ nil

Add an operand to named metadata.

Parameters:

Returns:

  • (nil)

See Also:

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

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

attach_function :add_named_metadata_operand, :LLVMAddNamedMetadataOperand, [OpaqueModule, :string, OpaqueValue], :void

.add_partially_inline_lib_calls_pass(pm) ⇒ nil

See llvm::createPartiallyInlineLibCallsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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)

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

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)

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

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

.add_scalar_repl_aggregates_pass(pm) ⇒ nil

See llvm::createScalarReplAggregatesPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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

.add_scalar_repl_aggregates_pass_ssa(pm) ⇒ nil

See llvm::createScalarReplAggregatesPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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

.add_scalar_repl_aggregates_pass_with_threshold(pm, threshold) ⇒ nil

See llvm::createScalarReplAggregatesPass function.

Parameters:

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

Returns:

  • (nil)

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

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)

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

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

.add_sccp_pass(pm) ⇒ nil

See llvm::createSCCPPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

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)

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

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)

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

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_tail_call_elimination_pass(pm) ⇒ nil

See llvm::createTailCallEliminationPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)

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

attach_function :add_tail_call_elimination_pass, :LLVMAddTailCallEliminationPass, [:pointer], :void

.add_target_data(td, pm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

attach_function :add_target_data, :LLVMAddTargetData, [OpaqueTargetData, :pointer], :void

.add_target_dependent_function_attr(fn, a, v) ⇒ nil

Add a target-dependent attribute to a fuction

Parameters:

Returns:

  • (nil)

See Also:

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

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

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

.add_target_library_info(tli, pm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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)

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

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)

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

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

.align_of(ty) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :align_of, :LLVMAlignOf, [OpaqueType], OpaqueValue

.append_basic_block(fn, name) ⇒ OpaqueBasicBlock

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

Parameters:

Returns:

See Also:

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

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

attach_function :append_basic_block, :LLVMAppendBasicBlock, [OpaqueValue, :string], OpaqueBasicBlock

.append_basic_block_in_context(c, fn, name) ⇒ OpaqueBasicBlock

Append a basic block to the end of a function.

Parameters:

Returns:

See Also:

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

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

attach_function :append_basic_block_in_context, :LLVMAppendBasicBlockInContext, [OpaqueContext, OpaqueValue, :string], OpaqueBasicBlock

.array_type(element_type, element_count) ⇒ OpaqueType

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 (OpaqueType)
  • element_count (Integer)

Returns:

See Also:

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

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

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

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

Convert a basic block instance to a value type.

Parameters:

Returns:


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

attach_function :basic_block_as_value, :LLVMBasicBlockAsValue, [OpaqueBasicBlock], OpaqueValue

.block_address(f, bb) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :block_address, :LLVMBlockAddress, [OpaqueValue, OpaqueBasicBlock], OpaqueValue

.build_a_shr(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_a_shr, :LLVMBuildAShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_add(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

Arithmetic

Parameters:

Returns:


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

attach_function :build_add, :LLVMBuildAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_addr_space_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_addr_space_cast, :LLVMBuildAddrSpaceCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_aggregate_ret(opaque_builder, ret_vals, n) ⇒ OpaqueValue

(Not documented)

Parameters:

  • opaque_builder (OpaqueBuilder)
  • ret_vals (FFI::Pointer(*ValueRef))
  • n (Integer)

Returns:


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

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

.build_alloca(opaque_builder, ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_alloca, :LLVMBuildAlloca, [OpaqueBuilder, OpaqueType, :string], OpaqueValue

.build_and(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_and, :LLVMBuildAnd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_array_alloca(opaque_builder, ty, val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_array_alloca, :LLVMBuildArrayAlloca, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue

.build_array_malloc(opaque_builder, ty, val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_array_malloc, :LLVMBuildArrayMalloc, [OpaqueBuilder, OpaqueType, OpaqueValue, :string], OpaqueValue

.build_atomic_rmw(b, op, ptr, val, ordering, single_thread) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_atomic_rmw, :LLVMBuildAtomicRMW, [OpaqueBuilder, :atomic_rmw_bin_op, OpaqueValue, OpaqueValue, :atomic_ordering, :int], OpaqueValue

.build_bin_op(b, op, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_bin_op, :LLVMBuildBinOp, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_bit_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_bit_cast, :LLVMBuildBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_br(opaque_builder, dest) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_br, :LLVMBuildBr, [OpaqueBuilder, OpaqueBasicBlock], OpaqueValue

.build_call(opaque_builder, fn, args, num_args, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_call, :LLVMBuildCall, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue

.build_cast(b, op, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_cast, :LLVMBuildCast, [OpaqueBuilder, :opcode, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_cond_br(opaque_builder, if_, then_, else_) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_cond_br, :LLVMBuildCondBr, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, OpaqueBasicBlock], OpaqueValue

.build_exact_s_div(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_exact_s_div, :LLVMBuildExactSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_extract_element(opaque_builder, vec_val, index, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_extract_element, :LLVMBuildExtractElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_extract_value(opaque_builder, agg_val, index, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_extract_value, :LLVMBuildExtractValue, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue

.build_f_add(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_add, :LLVMBuildFAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_f_cmp(opaque_builder, op, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_cmp, :LLVMBuildFCmp, [OpaqueBuilder, :real_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_f_div(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_div, :LLVMBuildFDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_f_mul(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_mul, :LLVMBuildFMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_f_neg(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_neg, :LLVMBuildFNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_f_rem(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_rem, :LLVMBuildFRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_f_sub(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_f_sub, :LLVMBuildFSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_fence(b, ordering, single_thread, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fence, :LLVMBuildFence, [OpaqueBuilder, :atomic_ordering, :int, :string], OpaqueValue

.build_fp_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fp_cast, :LLVMBuildFPCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_fp_ext(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fp_ext, :LLVMBuildFPExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_fp_to_si(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fp_to_si, :LLVMBuildFPToSI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_fp_to_ui(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fp_to_ui, :LLVMBuildFPToUI, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_fp_trunc(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_fp_trunc, :LLVMBuildFPTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_free(opaque_builder, pointer_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_free, :LLVMBuildFree, [OpaqueBuilder, OpaqueValue], OpaqueValue

.build_gep(b, pointer, indices, num_indices, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_gep, :LLVMBuildGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue

.build_global_string(b, str, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_global_string, :LLVMBuildGlobalString, [OpaqueBuilder, :string, :string], OpaqueValue

.build_global_string_ptr(b, str, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_global_string_ptr, :LLVMBuildGlobalStringPtr, [OpaqueBuilder, :string, :string], OpaqueValue

.build_i_cmp(opaque_builder, op, lhs, rhs, name) ⇒ OpaqueValue

Comparisons

Parameters:

Returns:


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

attach_function :build_i_cmp, :LLVMBuildICmp, [OpaqueBuilder, :int_predicate, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_in_bounds_gep(b, pointer, indices, num_indices, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_in_bounds_gep, :LLVMBuildInBoundsGEP, [OpaqueBuilder, OpaqueValue, :pointer, :uint, :string], OpaqueValue

.build_indirect_br(b, addr, num_dests) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_indirect_br, :LLVMBuildIndirectBr, [OpaqueBuilder, OpaqueValue, :uint], OpaqueValue

.build_insert_element(opaque_builder, vec_val, elt_val, index, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_insert_element, :LLVMBuildInsertElement, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_insert_value(opaque_builder, agg_val, elt_val, index, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_insert_value, :LLVMBuildInsertValue, [OpaqueBuilder, OpaqueValue, OpaqueValue, :uint, :string], OpaqueValue

.build_int_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_int_cast, :LLVMBuildIntCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_int_to_ptr(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_int_to_ptr, :LLVMBuildIntToPtr, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_invoke(opaque_builder, fn, args, num_args, then_, catch, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_invoke, :LLVMBuildInvoke, [OpaqueBuilder, OpaqueValue, :pointer, :uint, OpaqueBasicBlock, OpaqueBasicBlock, :string], OpaqueValue

.build_is_not_null(opaque_builder, val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_is_not_null, :LLVMBuildIsNotNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_is_null(opaque_builder, val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_is_null, :LLVMBuildIsNull, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_l_shr(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_l_shr, :LLVMBuildLShr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_landing_pad(b, ty, pers_fn, num_clauses, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_landing_pad, :LLVMBuildLandingPad, [OpaqueBuilder, OpaqueType, OpaqueValue, :uint, :string], OpaqueValue

.build_load(opaque_builder, pointer_val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_load, :LLVMBuildLoad, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_malloc(opaque_builder, ty, name) ⇒ OpaqueValue

Memory

Parameters:

Returns:


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

attach_function :build_malloc, :LLVMBuildMalloc, [OpaqueBuilder, OpaqueType, :string], OpaqueValue

.build_mul(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_mul, :LLVMBuildMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_neg(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_neg, :LLVMBuildNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_not(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_not, :LLVMBuildNot, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_nsw_add(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nsw_add, :LLVMBuildNSWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_nsw_mul(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nsw_mul, :LLVMBuildNSWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_nsw_neg(b, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nsw_neg, :LLVMBuildNSWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_nsw_sub(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nsw_sub, :LLVMBuildNSWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_nuw_add(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nuw_add, :LLVMBuildNUWAdd, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_nuw_mul(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nuw_mul, :LLVMBuildNUWMul, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_nuw_neg(b, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nuw_neg, :LLVMBuildNUWNeg, [OpaqueBuilder, OpaqueValue, :string], OpaqueValue

.build_nuw_sub(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_nuw_sub, :LLVMBuildNUWSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_or(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_or, :LLVMBuildOr, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_phi(opaque_builder, ty, name) ⇒ OpaqueValue

Miscellaneous instructions

Parameters:

Returns:


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

attach_function :build_phi, :LLVMBuildPhi, [OpaqueBuilder, OpaqueType, :string], OpaqueValue

.build_pointer_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_pointer_cast, :LLVMBuildPointerCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_ptr_diff(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_ptr_to_int(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_ptr_to_int, :LLVMBuildPtrToInt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_resume(b, exn) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_resume, :LLVMBuildResume, [OpaqueBuilder, OpaqueValue], OpaqueValue

.build_ret(opaque_builder, v) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_ret, :LLVMBuildRet, [OpaqueBuilder, OpaqueValue], OpaqueValue

.build_ret_void(opaque_builder) ⇒ OpaqueValue

Terminators

Parameters:

Returns:


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

attach_function :build_ret_void, :LLVMBuildRetVoid, [OpaqueBuilder], OpaqueValue

.build_s_div(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_s_div, :LLVMBuildSDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_s_ext(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_s_ext, :LLVMBuildSExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_s_ext_or_bit_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_s_ext_or_bit_cast, :LLVMBuildSExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_s_rem(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_s_rem, :LLVMBuildSRem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_select(opaque_builder, if_, then_, else_, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_select, :LLVMBuildSelect, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_shl(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_shl, :LLVMBuildShl, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_shuffle_vector(opaque_builder, v1, v2, mask, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_shuffle_vector, :LLVMBuildShuffleVector, [OpaqueBuilder, OpaqueValue, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_si_to_fp(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_si_to_fp, :LLVMBuildSIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_store(opaque_builder, val, ptr) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_store, :LLVMBuildStore, [OpaqueBuilder, OpaqueValue, OpaqueValue], OpaqueValue

.build_struct_gep(b, pointer, idx, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_struct_gep, :LLVMBuildStructGEP, [OpaqueBuilder, OpaqueValue, :uint, :string], OpaqueValue

.build_sub(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_sub, :LLVMBuildSub, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_switch(opaque_builder, v, else_, num_cases) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_switch, :LLVMBuildSwitch, [OpaqueBuilder, OpaqueValue, OpaqueBasicBlock, :uint], OpaqueValue

.build_trunc(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

Casts

Parameters:

Returns:


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

attach_function :build_trunc, :LLVMBuildTrunc, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_trunc_or_bit_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_trunc_or_bit_cast, :LLVMBuildTruncOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_u_div(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_u_div, :LLVMBuildUDiv, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_u_rem(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_u_rem, :LLVMBuildURem, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_ui_to_fp(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_ui_to_fp, :LLVMBuildUIToFP, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_unreachable(opaque_builder) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_unreachable, :LLVMBuildUnreachable, [OpaqueBuilder], OpaqueValue

.build_va_arg(opaque_builder, list, ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_va_arg, :LLVMBuildVAArg, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_xor(opaque_builder, lhs, rhs, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_xor, :LLVMBuildXor, [OpaqueBuilder, OpaqueValue, OpaqueValue, :string], OpaqueValue

.build_z_ext(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_z_ext, :LLVMBuildZExt, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.build_z_ext_or_bit_cast(opaque_builder, val, dest_ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :build_z_ext_or_bit_cast, :LLVMBuildZExtOrBitCast, [OpaqueBuilder, OpaqueValue, OpaqueType, :string], OpaqueValue

.byte_order(td) ⇒ Symbol from _enum_byte_ordering_

(Not documented)

Parameters:

Returns:


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

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

.call_frame_alignment_of_type(td, ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)

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

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

.clear_insertion_position(builder) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.clone_module(m) ⇒ OpaqueModule

Return an exact copy of the specified module.

Parameters:

Returns:


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

attach_function :clone_module, :LLVMCloneModule, [OpaqueModule], OpaqueModule

.const_a_shr(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_a_shr, :LLVMConstAShr, [OpaqueValue, OpaqueValue], OpaqueValue

.const_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_add, :LLVMConstAdd, [OpaqueValue, OpaqueValue], OpaqueValue

.const_addr_space_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_addr_space_cast, :LLVMConstAddrSpaceCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_all_ones(ty) ⇒ OpaqueValue

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

This is only valid for integer types.

Parameters:

Returns:

See Also:

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

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

attach_function :const_all_ones, :LLVMConstAllOnes, [OpaqueType], OpaqueValue

.const_and(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_and, :LLVMConstAnd, [OpaqueValue, OpaqueValue], OpaqueValue

.const_array(element_ty, constant_vals, length) ⇒ OpaqueValue

Create a ConstantArray from values.

Parameters:

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

Returns:

See Also:

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

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

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

.const_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_bit_cast, :LLVMConstBitCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_exact_s_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_exact_s_div, :LLVMConstExactSDiv, [OpaqueValue, OpaqueValue], OpaqueValue

.const_extract_element(vector_constant, index_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_extract_element, :LLVMConstExtractElement, [OpaqueValue, OpaqueValue], OpaqueValue

.const_extract_value(agg_constant, idx_list, num_idx) ⇒ OpaqueValue

(Not documented)

Parameters:

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

Returns:


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

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

.const_f_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_add, :LLVMConstFAdd, [OpaqueValue, OpaqueValue], OpaqueValue

.const_f_cmp(predicate, lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

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

.const_f_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_div, :LLVMConstFDiv, [OpaqueValue, OpaqueValue], OpaqueValue

.const_f_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_mul, :LLVMConstFMul, [OpaqueValue, OpaqueValue], OpaqueValue

.const_f_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_neg, :LLVMConstFNeg, [OpaqueValue], OpaqueValue

.const_f_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_rem, :LLVMConstFRem, [OpaqueValue, OpaqueValue], OpaqueValue

.const_f_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_f_sub, :LLVMConstFSub, [OpaqueValue, OpaqueValue], OpaqueValue

.const_fp_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_fp_cast, :LLVMConstFPCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_fp_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_fp_ext, :LLVMConstFPExt, [OpaqueValue, OpaqueType], OpaqueValue

.const_fp_to_si(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_fp_to_si, :LLVMConstFPToSI, [OpaqueValue, OpaqueType], OpaqueValue

.const_fp_to_ui(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_fp_to_ui, :LLVMConstFPToUI, [OpaqueValue, OpaqueType], OpaqueValue

.const_fp_trunc(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_fp_trunc, :LLVMConstFPTrunc, [OpaqueValue, OpaqueType], OpaqueValue

.const_gep(constant_val, constant_indices, num_indices) ⇒ OpaqueValue

(Not documented)

Parameters:

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

Returns:


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

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

.const_i_cmp(predicate, lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

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

.const_in_bounds_gep(constant_val, constant_indices, num_indices) ⇒ OpaqueValue

(Not documented)

Parameters:

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

Returns:


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

attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [OpaqueValue, :pointer, :uint], OpaqueValue

.const_inline_asm(ty, asm_string, constraints, has_side_effects, is_align_stack) ⇒ OpaqueValue

(Not documented)

Parameters:

  • ty (OpaqueType)
  • asm_string (String)
  • constraints (String)
  • has_side_effects (Integer)
  • is_align_stack (Integer)

Returns:


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

attach_function :const_inline_asm, :LLVMConstInlineAsm, [OpaqueType, :string, :string, :int, :int], OpaqueValue

.const_insert_element(vector_constant, element_value_constant, index_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_insert_element, :LLVMConstInsertElement, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue

.const_insert_value(agg_constant, element_value_constant, idx_list, num_idx) ⇒ OpaqueValue

(Not documented)

Parameters:

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

Returns:


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

attach_function :const_insert_value, :LLVMConstInsertValue, [OpaqueValue, OpaqueValue, :pointer, :uint], OpaqueValue

.const_int(int_ty, n, sign_extend) ⇒ OpaqueValue

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 (OpaqueType)
  • n (Integer)
  • sign_extend (Integer)

Returns:

See Also:

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

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

attach_function :const_int, :LLVMConstInt, [OpaqueType, :ulong_long, :int], OpaqueValue

.const_int_cast(constant_val, to_type, is_signed) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_int_cast, :LLVMConstIntCast, [OpaqueValue, OpaqueType, :int], OpaqueValue

.const_int_get_s_ext_value(constant_val) ⇒ Integer

Obtain the sign extended value for an integer constant value.

Parameters:

Returns:

  • (Integer)

See Also:

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

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

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

.const_int_get_z_ext_value(constant_val) ⇒ Integer

Obtain the zero extended value for an integer constant value.

Parameters:

Returns:

  • (Integer)

See Also:

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

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

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

.const_int_of_arbitrary_precision(int_ty, num_words, words) ⇒ OpaqueValue

Obtain a constant value for an integer of arbitrary precision.

Parameters:

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

Returns:

See Also:

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

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

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

.const_int_of_string(int_ty, text, radix) ⇒ OpaqueValue

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 (OpaqueType)
  • text (String)
  • radix (Integer)

Returns:

See Also:

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

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

attach_function :const_int_of_string, :LLVMConstIntOfString, [OpaqueType, :string, :uchar], OpaqueValue

.const_int_of_string_and_size(int_ty, text, s_len, radix) ⇒ OpaqueValue

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

Parameters:

  • int_ty (OpaqueType)
  • text (String)
  • s_len (Integer)
  • radix (Integer)

Returns:

See Also:

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

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

attach_function :const_int_of_string_and_size, :LLVMConstIntOfStringAndSize, [OpaqueType, :string, :uint, :uchar], OpaqueValue

.const_int_to_ptr(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_int_to_ptr, :LLVMConstIntToPtr, [OpaqueValue, OpaqueType], OpaqueValue

.const_l_shr(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_l_shr, :LLVMConstLShr, [OpaqueValue, OpaqueValue], OpaqueValue

.const_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_mul, :LLVMConstMul, [OpaqueValue, OpaqueValue], OpaqueValue

.const_named_struct(struct_ty, constant_vals, count) ⇒ OpaqueValue

Create a non-anonymous ConstantStruct from values.

Parameters:

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

Returns:

See Also:

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

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

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

.const_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_neg, :LLVMConstNeg, [OpaqueValue], OpaqueValue

.const_not(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_not, :LLVMConstNot, [OpaqueValue], OpaqueValue

.const_nsw_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nsw_add, :LLVMConstNSWAdd, [OpaqueValue, OpaqueValue], OpaqueValue

.const_nsw_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nsw_mul, :LLVMConstNSWMul, [OpaqueValue, OpaqueValue], OpaqueValue

.const_nsw_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nsw_neg, :LLVMConstNSWNeg, [OpaqueValue], OpaqueValue

.const_nsw_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nsw_sub, :LLVMConstNSWSub, [OpaqueValue, OpaqueValue], OpaqueValue

.const_null(ty) ⇒ OpaqueValue

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

Parameters:

Returns:

See Also:

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

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

attach_function :const_null, :LLVMConstNull, [OpaqueType], OpaqueValue

.const_nuw_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nuw_add, :LLVMConstNUWAdd, [OpaqueValue, OpaqueValue], OpaqueValue

.const_nuw_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nuw_mul, :LLVMConstNUWMul, [OpaqueValue, OpaqueValue], OpaqueValue

.const_nuw_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nuw_neg, :LLVMConstNUWNeg, [OpaqueValue], OpaqueValue

.const_nuw_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_nuw_sub, :LLVMConstNUWSub, [OpaqueValue, OpaqueValue], OpaqueValue

.const_or(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_or, :LLVMConstOr, [OpaqueValue, OpaqueValue], OpaqueValue

.const_pointer_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_pointer_cast, :LLVMConstPointerCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_pointer_null(ty) ⇒ OpaqueValue

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

Parameters:

Returns:


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

attach_function :const_pointer_null, :LLVMConstPointerNull, [OpaqueType], OpaqueValue

.const_ptr_to_int(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_ptr_to_int, :LLVMConstPtrToInt, [OpaqueValue, OpaqueType], OpaqueValue

.const_real(real_ty, n) ⇒ OpaqueValue

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

Parameters:

Returns:


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

attach_function :const_real, :LLVMConstReal, [OpaqueType, :double], OpaqueValue

.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 (OpaqueValue)
  • loses_info (FFI::Pointer(*Bool))

Returns:

See Also:

  • llvmllvm::ConstantFPllvm::ConstantFP::getDoubleValue

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

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

.const_real_of_string(real_ty, text) ⇒ OpaqueValue

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:

Returns:


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

attach_function :const_real_of_string, :LLVMConstRealOfString, [OpaqueType, :string], OpaqueValue

.const_real_of_string_and_size(real_ty, text, s_len) ⇒ OpaqueValue

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

Parameters:

  • real_ty (OpaqueType)
  • text (String)
  • s_len (Integer)

Returns:


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

attach_function :const_real_of_string_and_size, :LLVMConstRealOfStringAndSize, [OpaqueType, :string, :uint], OpaqueValue

.const_s_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_s_div, :LLVMConstSDiv, [OpaqueValue, OpaqueValue], OpaqueValue

.const_s_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_s_ext, :LLVMConstSExt, [OpaqueValue, OpaqueType], OpaqueValue

.const_s_ext_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_s_ext_or_bit_cast, :LLVMConstSExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_s_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_s_rem, :LLVMConstSRem, [OpaqueValue, OpaqueValue], OpaqueValue

.const_select(constant_condition, constant_if_true, constant_if_false) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_select, :LLVMConstSelect, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue

.const_shl(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_shl, :LLVMConstShl, [OpaqueValue, OpaqueValue], OpaqueValue

.const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_shuffle_vector, :LLVMConstShuffleVector, [OpaqueValue, OpaqueValue, OpaqueValue], OpaqueValue

.const_si_to_fp(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_si_to_fp, :LLVMConstSIToFP, [OpaqueValue, OpaqueType], OpaqueValue

.const_string(str, length, dont_null_terminate) ⇒ OpaqueValue

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:

See Also:

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

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

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

.const_string_in_context(c, str, length, dont_null_terminate) ⇒ OpaqueValue

Create a ConstantDataSequential and initialize it with a string.

Parameters:

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

Returns:

See Also:

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

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

attach_function :const_string_in_context, :LLVMConstStringInContext, [OpaqueContext, :string, :uint, :int], OpaqueValue

.const_struct(constant_vals, count, packed) ⇒ OpaqueValue

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:

See Also:

  • LLVMConstStructInContext()

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

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

.const_struct_in_context(c, constant_vals, count, packed) ⇒ OpaqueValue

Create an anonymous ConstantStruct with the specified values.

Parameters:

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

Returns:

See Also:

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

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

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

.const_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_sub, :LLVMConstSub, [OpaqueValue, OpaqueValue], OpaqueValue

.const_trunc(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_trunc, :LLVMConstTrunc, [OpaqueValue, OpaqueType], OpaqueValue

.const_trunc_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_trunc_or_bit_cast, :LLVMConstTruncOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue

.const_u_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_u_div, :LLVMConstUDiv, [OpaqueValue, OpaqueValue], OpaqueValue

.const_u_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_u_rem, :LLVMConstURem, [OpaqueValue, OpaqueValue], OpaqueValue

.const_ui_to_fp(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_ui_to_fp, :LLVMConstUIToFP, [OpaqueValue, OpaqueType], OpaqueValue

.const_vector(scalar_constant_vals, size) ⇒ OpaqueValue

Create a ConstantVector from values.

Parameters:

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

Returns:

See Also:

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

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

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

.const_xor(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_xor, :LLVMConstXor, [OpaqueValue, OpaqueValue], OpaqueValue

.const_z_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_z_ext, :LLVMConstZExt, [OpaqueValue, OpaqueType], OpaqueValue

.const_z_ext_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:


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

attach_function :const_z_ext_or_bit_cast, :LLVMConstZExtOrBitCast, [OpaqueValue, OpaqueType], OpaqueValue

.context_createOpaqueContext

Create a new context.

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

Returns:


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

attach_function :context_create, :LLVMContextCreate, [], OpaqueContext

.context_dispose(c) ⇒ nil

Destroy a context instance.

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

Parameters:

Returns:

  • (nil)

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

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

.context_set_diagnostic_handler(c, handler, diagnostic_context) ⇒ nil

Set the diagnostic handler for this context.

Parameters:

Returns:

  • (nil)

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

attach_function :context_set_diagnostic_handler, :LLVMContextSetDiagnosticHandler, [OpaqueContext, :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()

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

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

.copy_string_rep_of_target_data(td) ⇒ String

(Not documented)

Parameters:

Returns:

  • (String)

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

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

Returns:

  • (Integer)

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

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

.count_incoming(phi_node) ⇒ Integer

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

Parameters:

Returns:

  • (Integer)

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

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

.count_param_types(function_ty) ⇒ Integer

Obtain the number of parameters this function accepts.

Parameters:

Returns:

  • (Integer)

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

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

.count_params(fn) ⇒ Integer

Obtain the number of parameters in a function.

Parameters:

Returns:

  • (Integer)

See Also:

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

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

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

.count_struct_element_types(struct_ty) ⇒ Integer

Get the number of elements defined inside the structure.

Parameters:

Returns:

  • (Integer)

See Also:

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

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

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

.create_builderOpaqueBuilder

(Not documented)

Returns:


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

attach_function :create_builder, :LLVMCreateBuilder, [], OpaqueBuilder

.create_builder_in_context(c) ⇒ OpaqueBuilder

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

@{

Parameters:

Returns:


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

attach_function :create_builder_in_context, :LLVMCreateBuilderInContext, [OpaqueContext], OpaqueBuilder

.create_execution_engine(out_ee, mp, out_error) ⇒ Integer

Deprecated: Use LLVMCreateExecutionEngineForModule instead.

Parameters:

  • out_ee (FFI::Pointer(*ExecutionEngineRef))
  • mp (FFI::Pointer(ModuleProviderRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)

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

attach_function :create_execution_engine, :LLVMCreateExecutionEngine, [:pointer, :pointer, :pointer], :int

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

Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.

Parameters:

Returns:


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

attach_function :create_function_pass_manager, :LLVMCreateFunctionPassManager, [OpaqueModuleProvider], OpaquePassManager

.create_function_pass_manager_for_module(m) ⇒ OpaquePassManager

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:

Returns:


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

attach_function :create_function_pass_manager_for_module, :LLVMCreateFunctionPassManagerForModule, [OpaqueModule], OpaquePassManager

.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(out_interp, mp, out_error) ⇒ Integer

Deprecated: Use LLVMCreateInterpreterForModule instead.

Parameters:

  • out_interp (FFI::Pointer(*ExecutionEngineRef))
  • mp (FFI::Pointer(ModuleProviderRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)

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

attach_function :create_interpreter, :LLVMCreateInterpreter, [:pointer, :pointer, :pointer], :int

.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(out_jit, mp, opt_level, out_error) ⇒ Integer

Deprecated: Use LLVMCreateJITCompilerForModule instead.

Parameters:

  • out_jit (FFI::Pointer(*ExecutionEngineRef))
  • mp (FFI::Pointer(ModuleProviderRef))
  • opt_level (Integer)
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)

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

attach_function :create_jit_compiler, :LLVMCreateJITCompiler, [:pointer, :pointer, :uint, :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)

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

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

(Not documented)

Parameters:

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

Returns:


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

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

.create_memory_buffer_with_memory_range_copy(input_data, input_data_length, buffer_name) ⇒ OpaqueMemoryBuffer

(Not documented)

Parameters:

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

Returns:


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

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

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

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

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

.create_message(message) ⇒ String

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

Parameters:

  • message (String)

Returns:

  • (String)

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

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

.create_module_provider_for_existing_module(m) ⇒ OpaqueModuleProvider

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

Parameters:

Returns:


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

attach_function :create_module_provider_for_existing_module, :LLVMCreateModuleProviderForExistingModule, [OpaqueModule], OpaqueModuleProvider

.create_pass_managerOpaquePassManager

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:


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

attach_function :create_pass_manager, :LLVMCreatePassManager, [], OpaquePassManager

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


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

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:


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

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

.create_target_machine(t, triple, cpu, features, level, reloc, code_model) ⇒ OpaqueTargetMachine

Creates a new llvm::TargetMachine. See llvm::Target::createTargetMachine

Parameters:

Returns:


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

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:

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::eraseFromParent()

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

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

.delete_function(fn) ⇒ nil

Remove a function from its containing module and deletes it.

Parameters:

Returns:

  • (nil)

See Also:

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

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

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

.delete_global(global_var) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.dispose_builder(builder) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.dispose_execution_engine(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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)

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

attach_function :dispose_mcjit_memory_manager, :LLVMDisposeMCJITMemoryManager, [OpaqueMCJITMemoryManager], :void

.dispose_memory_buffer(mem_buf) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.dispose_message(message) ⇒ nil

(Not documented)

Parameters:

  • message (String)

Returns:

  • (nil)

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

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:

Returns:

  • (nil)

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

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

.dispose_module_provider(m) ⇒ nil

Destroys the module M.

Parameters:

Returns:

  • (nil)

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

attach_function :dispose_module_provider, :LLVMDisposeModuleProvider, [OpaqueModuleProvider], :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:

Returns:

  • (nil)

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

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

.dispose_target_data(td) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)

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

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

.dispose_target_machine(t) ⇒ nil

Dispose the LLVMTargetMachineRef instance generated by

LLVMCreateTargetMachine.

Parameters:

Returns:

  • (nil)

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

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

.double_typeOpaqueType

(Not documented)

Returns:


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

attach_function :double_type, :LLVMDoubleType, [], OpaqueType

.double_type_in_context(c) ⇒ OpaqueType

Obtain a 64-bit floating point type from a context.

Parameters:

Returns:


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

attach_function :double_type_in_context, :LLVMDoubleTypeInContext, [OpaqueContext], OpaqueType

.dump_module(m) ⇒ nil

Dump a representation of a module to stderr.

Parameters:

Returns:

  • (nil)

See Also:

  • Module::dump()

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

attach_function :dump_module, :LLVMDumpModule, [OpaqueModule], :void

.dump_type(val) ⇒ nil

Dump a representation of a type to stderr.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Typellvm::Type::dump()

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

attach_function :dump_type, :LLVMDumpType, [OpaqueType], :void

.dump_value(val) ⇒ nil

Dump a representation of a value to stderr.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::dump()

1893
</