Module: LLVM::C

Extended by:
FFI::Library
Defined in:
lib/llvm.rb,
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, OpaqueExecutionEngine, OpaqueGenericValue, OpaqueMCJITMemoryManager, OpaqueMemoryBuffer, OpaqueModule, OpaqueModuleProvider, OpaquePassManager, OpaquePassManagerBuilder, OpaquePassRegistry, OpaqueTargetData, OpaqueTargetLibraryInfotData, OpaqueTargetMachine, OpaqueType, OpaqueUse, OpaqueValue, Target

Class Method Summary collapse

Class Method Details

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


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

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)


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

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)


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

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

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

Returns:

  • (Symbol)


718
719
720
721
722
723
724
725
# File 'lib/llvm/core_ffi.rb', line 718

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

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


764
765
766
767
768
769
770
771
772
773
774
775
776
# File 'lib/llvm/core_ffi.rb', line 764

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

Returns:

  • (Symbol)


146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/llvm/core_ffi.rb', line 146

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
]

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


533
534
535
536
537
538
539
540
541
# File 'lib/llvm/core_ffi.rb', line 533

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)


461
462
463
464
# File 'lib/llvm/target_ffi.rb', line 461

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)


387
388
389
390
391
392
# File 'lib/llvm/target_ffi.rb', line 387

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)


439
440
441
442
443
444
445
446
# File 'lib/llvm/target_ffi.rb', line 439

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

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


572
573
574
575
576
577
578
579
580
581
582
583
# File 'lib/llvm/core_ffi.rb', line 572

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)


658
659
660
661
# File 'lib/llvm/core_ffi.rb', line 658

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

< Function to be imported from DLL

:external_weak

< Function to be accessible from DLL

:ghost

< ExternalWeak linkage description

:common

< Obsolete

:linker_private

< Tentative definitions

:linker_private_weak

< Like Private, but linker removes.

Returns:

  • (Symbol)


469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
# File 'lib/llvm/core_ffi.rb', line 469

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

._enum_linker_mode_Symbol

(Not documented)

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

Options:

:linker_destroy_source

Returns:

  • (Symbol)


26
27
28
# File 'lib/llvm/linker_ffi.rb', line 26

enum :linker_mode, [
  :linker_destroy_source, 0
]

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


301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
# File 'lib/llvm/core_ffi.rb', line 301

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)


626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'lib/llvm/core_ffi.rb', line 626

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)


411
412
413
414
415
416
# File 'lib/llvm/target_ffi.rb', line 411

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)


682
683
684
685
686
687
688
# File 'lib/llvm/core_ffi.rb', line 682

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)


404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
# File 'lib/llvm/core_ffi.rb', line 404

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

(Not documented)

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)


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

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)


504
505
506
507
508
# File 'lib/llvm/core_ffi.rb', line 504

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

.abi_alignment_of_type(td, ty) ⇒ Integer

Computes the ABI alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Parameters:

Returns:

  • (Integer)


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

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

.abi_size_of_type(td, ty) ⇒ Integer

Computes the ABI size of a type in bytes for a target.

See the method llvm::DataLayout::getTypeAllocSize.

Parameters:

Returns:

  • (Integer)


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

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

.add_aggressive_dce_pass(pm) ⇒ nil

(Not documented)

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


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

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

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

(Not documented)

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


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

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)


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

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

.add_bb_vectorize_pass(pm) ⇒ nil

(Not documented)

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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


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

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


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

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


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

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:



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

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)


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

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)


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

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)


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

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)


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

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

.add_instr_attribute(instr, index, attribute) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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

.add_mem_cpy_opt_pass(pm) ⇒ nil

See llvm::createMemCpyOptPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)


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

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

.add_module(ee, m) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.add_module_provider(ee, mp) ⇒ nil

Deprecated: Use LLVMAddModule instead.

Parameters:

Returns:

  • (nil)


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

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


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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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

.add_sccp_pass(pm) ⇒ nil

See llvm::createSCCPPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)


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

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

.add_simplify_lib_calls_pass(pm) ⇒ nil

See llvm::createSimplifyLibCallsPass function.

Parameters:

  • pm (FFI::Pointer(PassManagerRef))

Returns:

  • (nil)


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

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)


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

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

.add_target_data(td, pm) ⇒ nil

Adds target data information to a pass manager. This does not take ownership

of the target data.
See the method llvm::PassManagerBase::add.

Parameters:

Returns:

  • (nil)


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

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


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

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

.add_target_library_info(tli, pm) ⇒ nil

Adds target library information to a pass manager. This does not take

ownership of the target library info.
See the method llvm::PassManagerBase::add.

Parameters:

Returns:

  • (nil)


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

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)


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

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)


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

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

.align_of(ty) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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


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

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


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

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:



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

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

.block_address(f, bb) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

Arithmetic

Parameters:

Returns:



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

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:



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

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:



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

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

.build_alloca(opaque_builder, ty, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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

.build_br(opaque_builder, dest) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_f_neg(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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:



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

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

.build_free(opaque_builder, pointer_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_global_string(b, str, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.build_global_string_ptr(b, str, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

Comparisons

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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:



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

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

.build_is_null(opaque_builder, val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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

.build_load(opaque_builder, pointer_val, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.build_malloc(opaque_builder, ty, name) ⇒ OpaqueValue

Memory

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_neg(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.build_not(opaque_builder, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_nsw_neg(b, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_nuw_neg(b, v, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

.build_phi(opaque_builder, ty, name) ⇒ OpaqueValue

Miscellaneous instructions

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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

.build_resume(b, exn) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.build_ret(opaque_builder, v) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.build_ret_void(opaque_builder) ⇒ OpaqueValue

Terminators

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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

.build_store(opaque_builder, val, ptr) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

Casts

Parameters:

Returns:



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

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:



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

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:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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

.build_unreachable(opaque_builder) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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

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

(Not documented)

Parameters:

Returns:



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

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:



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

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

.byte_order(td) ⇒ Symbol from _enum_byte_ordering_

Returns the byte order of a target, either LLVMBigEndian or

LLVMLittleEndian.
See the method llvm::DataLayout::isLittleEndian.

Parameters:

Returns:



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

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

.call_frame_alignment_of_type(td, ty) ⇒ Integer

Computes the call frame alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Parameters:

Returns:

  • (Integer)


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

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

.clear_insertion_position(builder) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.const_a_shr(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_addr_space_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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

.const_and(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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

.const_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_exact_s_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_extract_element(vector_constant, index_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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

.const_f_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_cmp(predicate, lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_f_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_fp_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_fp_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_fp_to_si(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_fp_to_ui(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_fp_trunc(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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

.const_i_cmp(predicate, lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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:



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

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


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

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

.const_int_cast(constant_val, to_type, is_signed) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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


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

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

Returns:

See Also:

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


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

attach_function :const_int_of_arbitrary_precision, :LLVMConstIntOfArbitraryPrecision, [OpaqueType, :uint, :char], 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()


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

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


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

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:



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

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

.const_l_shr(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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

.const_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_not(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nsw_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nsw_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nsw_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nsw_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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

.const_nuw_add(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nuw_mul(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nuw_neg(constant_val) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_nuw_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_or(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_pointer_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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

.const_ptr_to_int(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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

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



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

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:



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

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:



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

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

.const_s_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_s_ext_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_s_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_select(constant_condition, constant_if_true, constant_if_false) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_shl(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_si_to_fp(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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


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

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


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

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


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

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

.const_sub(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_trunc(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_trunc_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_u_div(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_u_rem(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_ui_to_fp(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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


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

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

.const_xor(lhs_constant, rhs_constant) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_z_ext(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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

.const_z_ext_or_bit_cast(constant_val, to_type) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

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:



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

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)


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

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

.copy_string_rep_of_target_data(td) ⇒ String

Converts target data to a target layout string. The string must be disposed

with LLVMDisposeMessage.
See the constructor llvm::DataLayout::DataLayout.

Parameters:

Returns:

  • (String)


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

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)


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

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)


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

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

.count_param_types(function_ty) ⇒ Integer

Obtain the number of parameters this function accepts.

Parameters:

Returns:

  • (Integer)


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

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


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

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


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

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

.create_builderOpaqueBuilder

(Not documented)

Returns:



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

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:



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

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)


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

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)


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

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

.create_function_pass_manager(mp) ⇒ OpaquePassManager

Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.

Parameters:

Returns:



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

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:



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

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:



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

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:



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

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:



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

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)


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

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)


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

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)


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

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)


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

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)


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

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)


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

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:



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

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:



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

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)


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

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

.create_message(message) ⇒ String

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

Parameters:

  • message (String)

Returns:

  • (String)


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

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:



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

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:



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

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:



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

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

Creates target data from a target layout string.

See the constructor llvm::DataLayout::DataLayout.

Parameters:

  • string_rep (String)

Returns:



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

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:



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

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


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

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


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

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

.delete_global(global_var) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_builder(builder) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_execution_engine(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_generic_value(gen_val) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_mcjit_memory_manager(mm) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_memory_buffer(mem_buf) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

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

.dispose_message(message) ⇒ nil

(Not documented)

Parameters:

  • message (String)

Returns:

  • (nil)


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

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)


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

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

.dispose_module_provider(m) ⇒ nil

Destroys the module M.

Parameters:

Returns:

  • (nil)


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

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)


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

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

.dispose_target_data(td) ⇒ nil

Deallocates a TargetData.

See the destructor llvm::DataLayout::~DataLayout.

Parameters:

Returns:

  • (nil)


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

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

.dispose_target_machine(t) ⇒ nil

Dispose the LLVMTargetMachineRef instance generated by

LLVMCreateTargetMachine.

Parameters:

Returns:

  • (nil)


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

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

.double_typeOpaqueType

(Not documented)

Returns:



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

attach_function :double_type, :LLVMDoubleType, [], OpaqueType

.double_type_in_context(c) ⇒ OpaqueType

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

Parameters:

Returns:



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

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


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

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


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

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


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

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

.element_at_offset(td, struct_ty, offset) ⇒ Integer

Computes the structure element that contains the byte offset for a target.

See the method llvm::StructLayout::getElementContainingOffset.

Parameters:

Returns:

  • (Integer)


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

attach_function :element_at_offset, :LLVMElementAtOffset, [OpaqueTargetData, :pointer, :ulong_long], :uint

.enable_pretty_stack_tracenil

Enable LLVM’s built-in stack trace code. This intercepts the OS’s crash signals and prints which component of LLVM you were in at the time if the crash.

Returns:

  • (nil)


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

attach_function :enable_pretty_stack_trace, :LLVMEnablePrettyStackTrace, [], :void

.finalize_function_pass_manager(fpm) ⇒ Integer

Finalizes all of the function passes scheduled in in the function pass

manager. Returns 1 if any of the passes modified the module, 0 otherwise.
@see llvm::FunctionPassManager::doFinalization

Parameters:

Returns:

  • (Integer)


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

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

.find_function(ee, name, out_fn) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

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

.float_typeOpaqueType

(Not documented)

Returns:



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

attach_function :float_type, :LLVMFloatType, [], OpaqueType

.float_type_in_context(c) ⇒ OpaqueType

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

Parameters:

Returns:



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

attach_function :float_type_in_context, :LLVMFloatTypeInContext, [OpaqueContext], OpaqueType

.fp128_typeOpaqueType

(Not documented)

Returns:



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

attach_function :fp128_type, :LLVMFP128Type, [], OpaqueType

.fp128_type_in_context(c) ⇒ OpaqueType

Obtain a 128-bit floating point type (112-bit mantissa) from a context.

Parameters:

Returns:



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

attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [OpaqueContext], OpaqueType

.free_machine_code_for_function(ee, f) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :free_machine_code_for_function, :LLVMFreeMachineCodeForFunction, [OpaqueExecutionEngine, :pointer], :void

.function_type(return_type, param_types, param_count, is_var_arg) ⇒ OpaqueType

Obtain a function type consisting of a specified signature.

The function is defined as a tuple of a return Type, a list of parameter types, and whether the function is variadic.

Parameters:

  • return_type (OpaqueType)
  • param_types (FFI::Pointer(*TypeRef))
  • param_count (Integer)
  • is_var_arg (Integer)

Returns:



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

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

.generic_value_int_width(gen_val_ref) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

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

.generic_value_to_float(ty_ref, gen_val) ⇒ Float

(Not documented)

Parameters:

Returns:



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

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

.generic_value_to_int(gen_val, is_signed) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :generic_value_to_int, :LLVMGenericValueToInt, [OpaqueGenericValue, :int], :ulong_long

.generic_value_to_pointer(gen_val) ⇒ FFI::Pointer(*Void)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


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

attach_function :generic_value_to_pointer, :LLVMGenericValueToPointer, [OpaqueGenericValue], :pointer

.get_alignment(v) ⇒ Integer

Obtain the preferred alignment of the value.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::LoadInstllvm::LoadInst::getAlignment()
  • llvmllvm::StoreInstllvm::StoreInst::getAlignment()
  • llvmllvm::GlobalValuellvm::GlobalValue::getAlignment()


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

attach_function :get_alignment, :LLVMGetAlignment, [OpaqueValue], :uint

.get_array_length(array_ty) ⇒ Integer

Obtain the length of an array type.

This only works on types that represent arrays.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::ArrayTypellvm::ArrayType::getNumElements()


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

attach_function :get_array_length, :LLVMGetArrayLength, [OpaqueType], :uint

.get_attribute(arg) ⇒ Symbol from _enum_attribute_

Get an attribute from a function argument.

Parameters:

Returns:



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

attach_function :get_attribute, :LLVMGetAttribute, [OpaqueValue], :attribute

.get_basic_block_parent(bb) ⇒ OpaqueValue

Obtain the function to which a basic block belongs.

Parameters:

Returns:

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::getParent()


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

attach_function :get_basic_block_parent, :LLVMGetBasicBlockParent, [OpaqueBasicBlock], OpaqueValue

.get_basic_block_terminator(bb) ⇒ OpaqueValue

Obtain the terminator instruction for a basic block.

If the basic block does not have a terminator (it is not well-formed if it doesn’t), then NULL is returned.

The returned LLVMValueRef corresponds to a llvm::TerminatorInst.

Parameters:

Returns:

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::getTerminator()


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

attach_function :get_basic_block_terminator, :LLVMGetBasicBlockTerminator, [OpaqueBasicBlock], OpaqueValue

.get_basic_blocks(fn, basic_blocks) ⇒ nil

Obtain all of the basic blocks in a function.

This operates on a function value. The BasicBlocks parameter is a pointer to a pre-allocated array of LLVMBasicBlockRef of at least LLVMCountBasicBlocks() in length. This array is populated with LLVMBasicBlockRef instances.

Parameters:

  • fn (OpaqueValue)
  • basic_blocks (FFI::Pointer(*BasicBlockRef))

Returns:

  • (nil)


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

attach_function :get_basic_blocks, :LLVMGetBasicBlocks, [OpaqueValue, :pointer], :void

.get_bitcode_module(mem_buf, out_m, out_message) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :get_bitcode_module, :LLVMGetBitcodeModule, [:pointer, :pointer, :pointer], :int

.get_bitcode_module_in_context(context_ref, mem_buf, out_m, out_message) ⇒ Integer

Reads a module from the specified path, returning via the OutMP parameter

a module provider which performs lazy deserialization. Returns 0 on success.
Optionally returns a human-readable error message via OutMessage.

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_m (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :get_bitcode_module_in_context, :LLVMGetBitcodeModuleInContext, [:pointer, :pointer, :pointer, :pointer], :int

.get_bitcode_module_provider(mem_buf, out_mp, out_message) ⇒ Integer

Deprecated: Use LLVMGetBitcodeModule instead.

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_mp (FFI::Pointer(*ModuleProviderRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :get_bitcode_module_provider, :LLVMGetBitcodeModuleProvider, [:pointer, :pointer, :pointer], :int

.get_bitcode_module_provider_in_context(context_ref, mem_buf, out_mp, out_message) ⇒ Integer

Deprecated: Use LLVMGetBitcodeModuleInContext instead.

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_mp (FFI::Pointer(*ModuleProviderRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :get_bitcode_module_provider_in_context, :LLVMGetBitcodeModuleProviderInContext, [:pointer, :pointer, :pointer, :pointer], :int

.get_buffer_size(mem_buf) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

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

.get_buffer_start(mem_buf) ⇒ String

(Not documented)

Parameters:

Returns:

  • (String)


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

attach_function :get_buffer_start, :LLVMGetBufferStart, [OpaqueMemoryBuffer], :string

.get_const_opcode(constant_val) ⇒ Symbol from _enum_opcode_

Functions in this group correspond to APIs on llvm::ConstantExpr.

@{

Parameters:

Returns:

See Also:

  • llvm::ConstantExpr.


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

attach_function :get_const_opcode, :LLVMGetConstOpcode, [OpaqueValue], :opcode

.get_current_debug_location(builder) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_current_debug_location, :LLVMGetCurrentDebugLocation, [OpaqueBuilder], OpaqueValue

.get_data_layout(m) ⇒ String

Obtain the data layout for a module.

Parameters:

Returns:

  • (String)

See Also:

  • Module::getDataLayout()


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

attach_function :get_data_layout, :LLVMGetDataLayout, [OpaqueModule], :string

.get_default_target_tripleString

Get a triple for the host machine as a string. The result needs to be

disposed with LLVMDisposeMessage.

Returns:

  • (String)


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

attach_function :get_default_target_triple, :LLVMGetDefaultTargetTriple, [], :string

.get_element_type(ty) ⇒ OpaqueType

Obtain the type of elements within a sequential type.

This works on array, vector, and pointer types.

Parameters:

Returns:

See Also:

  • llvmllvm::SequentialTypellvm::SequentialType::getElementType()


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

attach_function :get_element_type, :LLVMGetElementType, [OpaqueType], OpaqueType

.get_entry_basic_block(fn) ⇒ OpaqueBasicBlock

Obtain the basic block that corresponds to the entry point of a function.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::getEntryBlock()


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

attach_function :get_entry_basic_block, :LLVMGetEntryBasicBlock, [OpaqueValue], OpaqueBasicBlock

.get_execution_engine_target_data(ee) ⇒ FFI::Pointer(TargetDataRef)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(TargetDataRef))


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

attach_function :get_execution_engine_target_data, :LLVMGetExecutionEngineTargetData, [OpaqueExecutionEngine], :pointer

.get_first_basic_block(fn) ⇒ OpaqueBasicBlock

Obtain the first basic block in a function.

The returned basic block can be used as an iterator. You will likely eventually call into LLVMGetNextBasicBlock() with it.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::begin()


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

attach_function :get_first_basic_block, :LLVMGetFirstBasicBlock, [OpaqueValue], OpaqueBasicBlock

.get_first_function(m) ⇒ OpaqueValue

Obtain an iterator to the first Function in a Module.

Parameters:

Returns:

See Also:

  • llvmllvm::Modulellvm::Module::begin()


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

attach_function :get_first_function, :LLVMGetFirstFunction, [OpaqueModule], OpaqueValue

.get_first_global(m) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_first_global, :LLVMGetFirstGlobal, [OpaqueModule], OpaqueValue

.get_first_instruction(bb) ⇒ OpaqueValue

Obtain the first instruction in a basic block.

The returned LLVMValueRef corresponds to a llvm::Instruction instance.

Parameters:

Returns:



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

attach_function :get_first_instruction, :LLVMGetFirstInstruction, [OpaqueBasicBlock], OpaqueValue

.get_first_param(fn) ⇒ OpaqueValue

Obtain the first parameter to a function.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


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

attach_function :get_first_param, :LLVMGetFirstParam, [OpaqueValue], OpaqueValue

.get_first_targetTarget

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

Returns:



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

attach_function :get_first_target, :LLVMGetFirstTarget, [], Target

.get_first_use(val) ⇒ OpaqueUse

Obtain the first use of a value.

Uses are obtained in an iterator fashion. First, call this function to obtain a reference to the first use. Then, call LLVMGetNextUse() on that instance and all subsequently obtained instances until LLVMGetNextUse() returns NULL.

Parameters:

Returns:

See Also:

  • llvmllvm::Valuellvm::Value::use_begin()


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

attach_function :get_first_use, :LLVMGetFirstUse, [OpaqueValue], OpaqueUse

.get_function_attr(fn) ⇒ Symbol from _enum_attribute_

Obtain an attribute from a function.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::getAttributes()


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

attach_function :get_function_attr, :LLVMGetFunctionAttr, [OpaqueValue], :attribute

.get_function_call_conv(fn) ⇒ Integer

Obtain the calling function of a function.

The returned value corresponds to the LLVMCallConv enumeration.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Functionllvm::Function::getCallingConv()


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

attach_function :get_function_call_conv, :LLVMGetFunctionCallConv, [OpaqueValue], :uint

.get_gc(fn) ⇒ String

Obtain the name of the garbage collector to use during code generation.

Parameters:

Returns:

  • (String)

See Also:

  • llvmllvm::Functionllvm::Function::getGC()


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

attach_function :get_gc, :LLVMGetGC, [OpaqueValue], :string

.get_global_contextOpaqueContext

Obtain the global context instance.

Returns:



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

attach_function :get_global_context, :LLVMGetGlobalContext, [], OpaqueContext

.get_global_parent(global) ⇒ OpaqueModule

This group contains functions that operate on global values. Functions in this group relate to functions in the llvm::GlobalValue class tree.

@{

Parameters:

Returns:

See Also:

  • llvmllvm::GlobalValue


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

attach_function :get_global_parent, :LLVMGetGlobalParent, [OpaqueValue], OpaqueModule

.get_global_pass_registryOpaquePassRegistry

Return the global pass registry, for use with initialization functions.

@see llvm::PassRegistry::getPassRegistry

Returns:



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

attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], OpaquePassRegistry

.get_i_cmp_predicate(inst) ⇒ Symbol from _enum_int_predicate_

Obtain the predicate of an instruction.

This is only valid for instructions that correspond to llvm::ICmpInst or llvm::ConstantExpr whose opcode is llvm::Instruction::ICmp.

Parameters:

Returns:

See Also:

  • llvmllvm::ICmpInstllvm::ICmpInst::getPredicate()


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

attach_function :get_i_cmp_predicate, :LLVMGetICmpPredicate, [OpaqueValue], :int_predicate

.get_incoming_block(phi_node, index) ⇒ OpaqueBasicBlock

Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.

Parameters:

Returns:



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

attach_function :get_incoming_block, :LLVMGetIncomingBlock, [OpaqueValue, :uint], OpaqueBasicBlock

.get_incoming_value(phi_node, index) ⇒ OpaqueValue

Obtain an incoming value to a PHI node as an LLVMValueRef.

Parameters:

Returns:



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

attach_function :get_incoming_value, :LLVMGetIncomingValue, [OpaqueValue, :uint], OpaqueValue

.get_initializer(global_var) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_initializer, :LLVMGetInitializer, [OpaqueValue], OpaqueValue

.get_insert_block(builder) ⇒ OpaqueBasicBlock

(Not documented)

Parameters:

Returns:



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

attach_function :get_insert_block, :LLVMGetInsertBlock, [OpaqueBuilder], OpaqueBasicBlock

.get_instruction_call_conv(instr) ⇒ Integer

Obtain the calling convention for a call instruction.

This is the opposite of LLVMSetInstructionCallConv(). Reads its usage.

Parameters:

Returns:

  • (Integer)

See Also:

  • LLVMSetInstructionCallConv()


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

attach_function :get_instruction_call_conv, :LLVMGetInstructionCallConv, [OpaqueValue], :uint

.get_instruction_opcode(inst) ⇒ Symbol from _enum_opcode_

Obtain the code opcode for an individual instruction.

Parameters:

Returns:

See Also:

  • llvmllvm::Instructionllvm::Instruction::getOpCode()


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

attach_function :get_instruction_opcode, :LLVMGetInstructionOpcode, [OpaqueValue], :opcode

.get_instruction_parent(inst) ⇒ OpaqueBasicBlock

Obtain the basic block to which an instruction belongs.

Parameters:

Returns:

See Also:

  • llvmllvm::Instructionllvm::Instruction::getParent()


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

attach_function :get_instruction_parent, :LLVMGetInstructionParent, [OpaqueValue], OpaqueBasicBlock

.get_int_type_width(integer_ty) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :get_int_type_width, :LLVMGetIntTypeWidth, [OpaqueType], :uint

.get_intrinsic_id(fn) ⇒ Integer

Obtain the ID number from a function instance.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Functionllvm::Function::getIntrinsicID()


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

attach_function :get_intrinsic_id, :LLVMGetIntrinsicID, [OpaqueValue], :uint

.get_last_basic_block(fn) ⇒ OpaqueBasicBlock

Obtain the last basic block in a function.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::end()


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

attach_function :get_last_basic_block, :LLVMGetLastBasicBlock, [OpaqueValue], OpaqueBasicBlock

.get_last_function(m) ⇒ OpaqueValue

Obtain an iterator to the last Function in a Module.

Parameters:

Returns:

See Also:

  • llvmllvm::Modulellvm::Module::end()


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

attach_function :get_last_function, :LLVMGetLastFunction, [OpaqueModule], OpaqueValue

.get_last_global(m) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_last_global, :LLVMGetLastGlobal, [OpaqueModule], OpaqueValue

.get_last_instruction(bb) ⇒ OpaqueValue

Obtain the last instruction in a basic block.

The returned LLVMValueRef corresponds to an LLVM:Instruction.

Parameters:

Returns:



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

attach_function :get_last_instruction, :LLVMGetLastInstruction, [OpaqueBasicBlock], OpaqueValue

.get_last_param(fn) ⇒ OpaqueValue

Obtain the last parameter to a function.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::arg_end()


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

attach_function :get_last_param, :LLVMGetLastParam, [OpaqueValue], OpaqueValue

.get_linkage(global) ⇒ Symbol from _enum_linkage_

(Not documented)

Parameters:

Returns:



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

attach_function :get_linkage, :LLVMGetLinkage, [OpaqueValue], :linkage

.get_md_kind_id(name, s_len) ⇒ Integer

(Not documented)

Parameters:

  • name (String)
  • s_len (Integer)

Returns:

  • (Integer)


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

attach_function :get_md_kind_id, :LLVMGetMDKindID, [:string, :uint], :uint

.get_md_kind_id_in_context(c, name, s_len) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :get_md_kind_id_in_context, :LLVMGetMDKindIDInContext, [OpaqueContext, :string, :uint], :uint

.get_md_node_num_operands(v) ⇒ Object

Obtain the number of operands from an MDNode value.

Parameters:

  • V

    MDNode to get number of operands from.

  • v (OpaqueValue)

Returns:

  • Number of operands of the MDNode.

  • (Integer)


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

attach_function :get_md_node_num_operands, :LLVMGetMDNodeNumOperands, [OpaqueValue], :uint

.get_md_node_operands(v, dest) ⇒ nil

Obtain the given MDNode’s operands.

The passed LLVMValueRef pointer should point to enough memory to hold all of the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the MDNode’s operands.

Parameters:

  • V

    MDNode to get the operands from.

  • Dest

    Destination array for operands.

  • v (OpaqueValue)
  • dest (FFI::Pointer(*ValueRef))

Returns:

  • (nil)


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

attach_function :get_md_node_operands, :LLVMGetMDNodeOperands, [OpaqueValue, :pointer], :void

.get_md_string(v, len) ⇒ Object

Obtain the underlying string from a MDString value.

Parameters:

  • V

    Instance to obtain string from.

  • Len

    Memory address which will hold length of returned string.

  • v (OpaqueValue)
  • len (FFI::Pointer(*UInt))

Returns:

  • String data in MDString.

  • (String)


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

attach_function :get_md_string, :LLVMGetMDString, [OpaqueValue, :pointer], :string

.get_metadata(val, kind_id) ⇒ OpaqueValue

Return metadata associated with an instruction value.

Parameters:

Returns:



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

attach_function :get_metadata, :LLVMGetMetadata, [OpaqueValue, :uint], OpaqueValue

.get_module_context(m) ⇒ OpaqueContext

Obtain the context to which this module is associated.

Parameters:

Returns:

See Also:

  • Module::getContext()


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

attach_function :get_module_context, :LLVMGetModuleContext, [OpaqueModule], OpaqueContext

.get_named_function(m, name) ⇒ OpaqueValue

Obtain a Function value from a Module by its name.

The returned value corresponds to a llvm::Function value.

Parameters:

Returns:

See Also:

  • llvmllvm::Modulellvm::Module::getFunction()


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

attach_function :get_named_function, :LLVMGetNamedFunction, [OpaqueModule, :string], OpaqueValue

.get_named_global(m, name) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_named_global, :LLVMGetNamedGlobal, [OpaqueModule, :string], OpaqueValue

.get_named_metadata_num_operands(m, name) ⇒ Integer

Obtain the number of operands for named metadata in a module.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Modulellvm::Module::getNamedMetadata()


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

attach_function :get_named_metadata_num_operands, :LLVMGetNamedMetadataNumOperands, [OpaqueModule, :string], :uint

.get_named_metadata_operands(m, name, dest) ⇒ nil

Obtain the named metadata operands for a module.

The passed LLVMValueRef pointer should refer to an array of LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This array will be populated with the LLVMValueRef instances. Each instance corresponds to a llvm::MDNode.

Parameters:

  • m (OpaqueModule)
  • name (String)
  • dest (FFI::Pointer(*ValueRef))

Returns:

  • (nil)

See Also:

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


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

attach_function :get_named_metadata_operands, :LLVMGetNamedMetadataOperands, [OpaqueModule, :string, :pointer], :void

.get_next_basic_block(bb) ⇒ OpaqueBasicBlock

Advance a basic block iterator.

Parameters:

Returns:



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

attach_function :get_next_basic_block, :LLVMGetNextBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock

.get_next_function(fn) ⇒ OpaqueValue

Advance a Function iterator to the next Function.

Returns NULL if the iterator was already at the end and there are no more functions.

Parameters:

Returns:



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

attach_function :get_next_function, :LLVMGetNextFunction, [OpaqueValue], OpaqueValue

.get_next_global(global_var) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_next_global, :LLVMGetNextGlobal, [OpaqueValue], OpaqueValue

.get_next_instruction(inst) ⇒ OpaqueValue

Obtain the instruction that occurs after the one specified.

The next instruction will be from the same basic block.

If this is the last instruction in a basic block, NULL will be returned.

Parameters:

Returns:



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

attach_function :get_next_instruction, :LLVMGetNextInstruction, [OpaqueValue], OpaqueValue

.get_next_param(arg) ⇒ OpaqueValue

Obtain the next parameter to a function.

This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is actually a wrapped iterator) and obtains the next parameter from the underlying iterator.

Parameters:

Returns:



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

attach_function :get_next_param, :LLVMGetNextParam, [OpaqueValue], OpaqueValue

.get_next_target(t) ⇒ Target

Returns the next llvm::Target given a previous one (or null if there’s none)

Parameters:

Returns:



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

attach_function :get_next_target, :LLVMGetNextTarget, [Target], Target

.get_next_use(u) ⇒ OpaqueUse

Obtain the next use of a value.

This effectively advances the iterator. It returns NULL if you are on the final use and no more are available.

Parameters:

Returns:



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

attach_function :get_next_use, :LLVMGetNextUse, [OpaqueUse], OpaqueUse

.get_num_operands(val) ⇒ Integer

Obtain the number of operands in a llvm::User value.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Userllvm::User::getNumOperands()


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

attach_function :get_num_operands, :LLVMGetNumOperands, [OpaqueValue], :int

.get_operand(val, index) ⇒ OpaqueValue

Obtain an operand at a specific index in a llvm::User value.

Parameters:

Returns:

See Also:

  • llvmllvm::Userllvm::User::getOperand()


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

attach_function :get_operand, :LLVMGetOperand, [OpaqueValue, :uint], OpaqueValue

.get_param(fn, index) ⇒ OpaqueValue

Obtain the parameter at the specified index.

Parameters are indexed from 0.

Parameters:

Returns:

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


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

attach_function :get_param, :LLVMGetParam, [OpaqueValue, :uint], OpaqueValue

.get_param_parent(inst) ⇒ OpaqueValue

Obtain the function to which this argument belongs.

Unlike other functions in this group, this one takes an LLVMValueRef that corresponds to a llvm::Attribute.

The returned LLVMValueRef is the llvm::Function to which this argument belongs.

Parameters:

Returns:



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

attach_function :get_param_parent, :LLVMGetParamParent, [OpaqueValue], OpaqueValue

.get_param_types(function_ty, dest) ⇒ nil

Obtain the types of a function’s parameters.

The Dest parameter should point to a pre-allocated array of LLVMTypeRef at least LLVMCountParamTypes() large. On return, the first LLVMCountParamTypes() entries in the array will be populated with LLVMTypeRef instances.

Parameters:

  • FunctionTy

    The function type to operate on.

  • Dest

    Memory address of an array to be filled with result.

  • function_ty (OpaqueType)
  • dest (FFI::Pointer(*TypeRef))

Returns:

  • (nil)


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

attach_function :get_param_types, :LLVMGetParamTypes, [OpaqueType, :pointer], :void

.get_params(fn, params) ⇒ nil

Obtain the parameters in a function.

The takes a pointer to a pre-allocated array of LLVMValueRef that is at least LLVMCountParams() long. This array will be filled with LLVMValueRef instances which correspond to the parameters the function receives. Each LLVMValueRef corresponds to a llvm::Argument instance.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::arg_begin()


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

attach_function :get_params, :LLVMGetParams, [OpaqueValue, :pointer], :void

.get_pointer_address_space(pointer_ty) ⇒ Integer

Obtain the address space of a pointer type.

This only works on types that represent pointers.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::PointerTypellvm::PointerType::getAddressSpace()


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

attach_function :get_pointer_address_space, :LLVMGetPointerAddressSpace, [OpaqueType], :uint

.get_pointer_to_global(ee, global) ⇒ FFI::Pointer(*Void)

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


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

attach_function :get_pointer_to_global, :LLVMGetPointerToGlobal, [OpaqueExecutionEngine, :pointer], :pointer

.get_previous_basic_block(bb) ⇒ OpaqueBasicBlock

Go backwards in a basic block iterator.

Parameters:

Returns:



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

attach_function :get_previous_basic_block, :LLVMGetPreviousBasicBlock, [OpaqueBasicBlock], OpaqueBasicBlock

.get_previous_function(fn) ⇒ OpaqueValue

Decrement a Function iterator to the previous Function.

Returns NULL if the iterator was already at the beginning and there are no previous functions.

Parameters:

Returns:



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

attach_function :get_previous_function, :LLVMGetPreviousFunction, [OpaqueValue], OpaqueValue

.get_previous_global(global_var) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



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

attach_function :get_previous_global, :LLVMGetPreviousGlobal, [OpaqueValue], OpaqueValue

.get_previous_instruction(inst) ⇒ OpaqueValue

Obtain the instruction that occurred before this one.

If the instruction is the first instruction in a basic block, NULL will be returned.

Parameters:

Returns:



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

attach_function :get_previous_instruction, :LLVMGetPreviousInstruction, [OpaqueValue], OpaqueValue

.get_previous_param(arg) ⇒ OpaqueValue

Obtain the previous parameter to a function.

This is the opposite of LLVMGetNextParam().

Parameters:

Returns:



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

attach_function :get_previous_param, :LLVMGetPreviousParam, [OpaqueValue], OpaqueValue

.get_return_type(function_ty) ⇒ OpaqueType

Obtain the Type this function Type returns.

Parameters:

Returns:



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

attach_function :get_return_type, :LLVMGetReturnType, [OpaqueType], OpaqueType

.get_section(global) ⇒ String

(Not documented)

Parameters:

Returns:

  • (String)


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

attach_function :get_section, :LLVMGetSection, [OpaqueValue], :string

.get_struct_element_types(struct_ty, dest) ⇒ nil

Get the elements within a structure.

The function is passed the address of a pre-allocated array of LLVMTypeRef at least LLVMCountStructElementTypes() long. After invocation, this array will be populated with the structure’s elements. The objects in the destination array will have a lifetime of the structure type itself, which is the lifetime of the context it is contained in.

Parameters:

  • struct_ty (OpaqueType)
  • dest (FFI::Pointer(*TypeRef))

Returns:

  • (nil)


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

attach_function :get_struct_element_types, :LLVMGetStructElementTypes, [OpaqueType, :pointer], :void

.get_struct_name(ty) ⇒ String

Obtain the name of a structure.

Parameters:

Returns:

  • (String)

See Also:

  • llvmllvm::StructTypellvm::StructType::getName()


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

attach_function :get_struct_name, :LLVMGetStructName, [OpaqueType], :string

.get_switch_default_dest(switch_instr) ⇒ OpaqueBasicBlock

Obtain the default destination basic block of a switch instruction.

This only works on llvm::SwitchInst instructions.

Parameters:

Returns:

See Also:

  • llvmllvm::SwitchInstllvm::SwitchInst::getDefaultDest()


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

attach_function :get_switch_default_dest, :LLVMGetSwitchDefaultDest, [OpaqueValue], OpaqueBasicBlock

.get_target(m) ⇒ String

Obtain the target triple for a module.

Parameters:

Returns:

  • (String)

See Also:

  • Module::getTargetTriple()


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

attach_function :get_target, :LLVMGetTarget, [OpaqueModule], :string

.get_target_description(t) ⇒ String

Returns the description of a target. See llvm::Target::getDescription

Parameters:

Returns:

  • (String)


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

attach_function :get_target_description, :LLVMGetTargetDescription, [Target], :string

.get_target_from_name(name) ⇒ Target

Finds the target corresponding to the given name and stores it in p T.

Returns 0 on success.

Parameters:

  • name (String)

Returns:



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

attach_function :get_target_from_name, :LLVMGetTargetFromName, [:string], Target

.get_target_from_triple(triple, t, error_message) ⇒ Integer

Finds the target corresponding to the given triple and stores it in p T.

Returns 0 on success. Optionally returns any error in ErrorMessage.
Use LLVMDisposeMessage to dispose the message.

Parameters:

  • triple (String)
  • t (FFI::Pointer(*TargetRef))
  • error_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :get_target_from_triple, :LLVMGetTargetFromTriple, [:string, :pointer, :pointer], :int

.get_target_machine_cpu(t) ⇒ String

Returns the cpu used creating this target machine. See

llvm::TargetMachine::getCPU. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


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

attach_function :get_target_machine_cpu, :LLVMGetTargetMachineCPU, [OpaqueTargetMachine], :string

.get_target_machine_data(t) ⇒ OpaqueTargetData

Returns the llvm::DataLayout used for this llvm:TargetMachine.

Parameters:

Returns:



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

attach_function :get_target_machine_data, :LLVMGetTargetMachineData, [OpaqueTargetMachine], OpaqueTargetData

.get_target_machine_feature_string(t) ⇒ String

Returns the feature string used creating this target machine. See

llvm::TargetMachine::getFeatureString. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


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

attach_function :get_target_machine_feature_string, :LLVMGetTargetMachineFeatureString, [OpaqueTargetMachine], :string

.get_target_machine_target(t) ⇒ Target

Returns the Target used in a TargetMachine

Parameters:

Returns:



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

attach_function :get_target_machine_target, :LLVMGetTargetMachineTarget, [OpaqueTargetMachine], Target

.get_target_machine_triple(t) ⇒ String

Returns the triple used creating this target machine. See

llvm::TargetMachine::getTriple. The result needs to be disposed with
LLVMDisposeMessage.

Parameters:

Returns:

  • (String)


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

attach_function :get_target_machine_triple, :LLVMGetTargetMachineTriple, [OpaqueTargetMachine], :string

.get_target_name(t) ⇒ String

Returns the name of a target. See llvm::Target::getName

Parameters:

Returns:

  • (String)


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

attach_function :get_target_name, :LLVMGetTargetName, [Target], :string

.get_thread_local_mode(global_var) ⇒ Symbol from _enum_thread_local_mode_

(Not documented)

Parameters:

Returns:



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

attach_function :get_thread_local_mode, :LLVMGetThreadLocalMode, [OpaqueValue], :thread_local_mode

.get_type_by_name(m, name) ⇒ OpaqueType

Obtain a Type from a module by its registered name.

Parameters:

Returns:



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

attach_function :get_type_by_name, :LLVMGetTypeByName, [OpaqueModule, :string], OpaqueType

.get_type_context(ty) ⇒ OpaqueContext

Obtain the context to which this type instance is associated.

Parameters:

Returns:

See Also:

  • llvmllvm::Typellvm::Type::getContext()


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

attach_function :get_type_context, :LLVMGetTypeContext, [OpaqueType], OpaqueContext

.get_type_kind(ty) ⇒ Symbol from _enum_type_kind_

Obtain the enumerated type of a Type instance.

Parameters:

Returns:

See Also:

  • llvm::Type:getTypeID()


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

attach_function :get_type_kind, :LLVMGetTypeKind, [OpaqueType], :type_kind

.get_undef(ty) ⇒ OpaqueValue

Obtain a constant value referring to an undefined value of a type.

Parameters:

Returns:

See Also:

  • llvmllvm::UndefValuellvm::UndefValue::get()


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

attach_function :get_undef, :LLVMGetUndef, [OpaqueType], OpaqueValue

.get_used_value(u) ⇒ OpaqueValue

Obtain the value this use corresponds to.

Parameters:

Returns:

See Also:

  • llvm::Use::get().


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

attach_function :get_used_value, :LLVMGetUsedValue, [OpaqueUse], OpaqueValue

.get_user(u) ⇒ OpaqueValue

Obtain the user value for a user.

The returned value corresponds to a llvm::User type.

Parameters:

Returns:

See Also:

  • llvmllvm::Usellvm::Use::getUser()


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

attach_function :get_user, :LLVMGetUser, [OpaqueUse], OpaqueValue

.get_value_name(val) ⇒ String

Obtain the string name of a value.

Parameters:

Returns:

  • (String)

See Also:

  • llvmllvm::Valuellvm::Value::getName()


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

attach_function :get_value_name, :LLVMGetValueName, [OpaqueValue], :string

.get_vector_size(vector_ty) ⇒ Integer

Obtain the number of elements in a vector type.

This only works on types that represent vectors.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::VectorTypellvm::VectorType::getNumElements()


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

attach_function :get_vector_size, :LLVMGetVectorSize, [OpaqueType], :uint

.get_visibility(global) ⇒ Symbol from _enum_visibility_

(Not documented)

Parameters:

Returns:



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

attach_function :get_visibility, :LLVMGetVisibility, [OpaqueValue], :visibility

.get_volatile(memory_access_inst) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :get_volatile, :LLVMGetVolatile, [OpaqueValue], :int

.half_typeOpaqueType

Obtain a floating point type from the global context.

These map to the functions in this group of the same name.

Returns:



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

attach_function :half_type, :LLVMHalfType, [], OpaqueType

.half_type_in_context(c) ⇒ OpaqueType

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

Parameters:

Returns:



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

attach_function :half_type_in_context, :LLVMHalfTypeInContext, [OpaqueContext], OpaqueType

.has_metadata(val) ⇒ Integer

Determine whether an instruction has any metadata attached.

Parameters:

Returns:

  • (Integer)


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

attach_function :has_metadata, :LLVMHasMetadata, [OpaqueValue], :int

.initialize_all_asm_parsersnil

LLVMInitializeAllAsmParsers - The main program should call this function if

it wants all asm parsers that LLVM is configured to support, to make them
available via the TargetRegistry.

Returns:

  • (nil)


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

attach_function :initialize_all_asm_parsers, :LLVMInitializeAllAsmParsers, [], :void

.initialize_all_asm_printersnil

LLVMInitializeAllAsmPrinters - The main program should call this function if

it wants all asm printers that LLVM is configured to support, to make them
available via the TargetRegistry.

Returns:

  • (nil)


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

attach_function :initialize_all_asm_printers, :LLVMInitializeAllAsmPrinters, [], :void

.initialize_all_disassemblersnil

LLVMInitializeAllDisassemblers - The main program should call this function

if it wants all disassemblers that LLVM is configured to support, to make
them available via the TargetRegistry.

Returns:

  • (nil)


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

attach_function :initialize_all_disassemblers, :LLVMInitializeAllDisassemblers, [], :void

.initialize_all_target_infosnil

(Not documented)

Returns:

  • (nil)


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

attach_function :initialize_all_target_infos, :LLVMInitializeAllTargetInfos, [], :void

.initialize_all_target_m_csnil

LLVMInitializeAllTargetMCs - The main program should call this function if

it wants access to all available target MC that LLVM is configured to
support.

Returns:

  • (nil)


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

attach_function :initialize_all_target_m_cs, :LLVMInitializeAllTargetMCs, [], :void

.initialize_all_targetsnil

LLVMInitializeAllTargets - The main program should call this function if it

wants to link in all available targets that LLVM is configured to
support.

Returns:

  • (nil)


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

attach_function :initialize_all_targets, :LLVMInitializeAllTargets, [], :void

.initialize_core(r) ⇒ nil

@}

Parameters:

Returns:

  • (nil)


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

attach_function :initialize_core, :LLVMInitializeCore, [OpaquePassRegistry], :void

.initialize_function_pass_manager(fpm) ⇒ Integer

Initializes all of the function passes scheduled in the function pass

manager. Returns 1 if any of the passes modified the module, 0 otherwise.
@see llvm::FunctionPassManager::doInitialization

Parameters:

Returns:

  • (Integer)


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

attach_function :initialize_function_pass_manager, :LLVMInitializeFunctionPassManager, [OpaquePassManager], :int

.initialize_mcjit_compiler_options(options, size_of_options) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :initialize_mcjit_compiler_options, :LLVMInitializeMCJITCompilerOptions, [MCJITCompilerOptions, :ulong], :void

.initialize_native_asm_parserInteger

LLVMInitializeNativeTargetAsmParser - The main program should call this

function to initialize the parser for the native target corresponding to the
host.

Returns:

  • (Integer)


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

attach_function :initialize_native_asm_parser, :LLVMInitializeNativeAsmParser, [], :int

.initialize_native_asm_printerInteger

LLVMInitializeNativeTargetAsmPrinter - The main program should call this

function to initialize the printer for the native target corresponding to
the host.

Returns:

  • (Integer)


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

attach_function :initialize_native_asm_printer, :LLVMInitializeNativeAsmPrinter, [], :int

.initialize_native_disassemblerInteger

LLVMInitializeNativeTargetDisassembler - The main program should call this

function to initialize the disassembler for the native target corresponding
to the host.

Returns:

  • (Integer)


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

attach_function :initialize_native_disassembler, :LLVMInitializeNativeDisassembler, [], :int

.initialize_native_targetInteger

LLVMInitializeNativeTarget - The main program should call this function to

initialize the native target corresponding to the host.  This is useful
for JIT applications to ensure that the target gets linked in correctly.

Returns:

  • (Integer)


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

attach_function :initialize_native_target, :LLVMInitializeNativeTarget, [], :int

.insert_basic_block(insert_before_bb, name) ⇒ OpaqueBasicBlock

Insert a basic block in a function using the global context.

Parameters:

Returns:

See Also:

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


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

attach_function :insert_basic_block, :LLVMInsertBasicBlock, [OpaqueBasicBlock, :string], OpaqueBasicBlock

.insert_basic_block_in_context(c, bb, name) ⇒ OpaqueBasicBlock

Insert a basic block in a function before another basic block.

The function to add to is determined by the function of the passed basic block.

Parameters:

Returns:

See Also:

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


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

attach_function :insert_basic_block_in_context, :LLVMInsertBasicBlockInContext, [OpaqueContext, OpaqueBasicBlock, :string], OpaqueBasicBlock

.insert_into_builder(builder, instr) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :insert_into_builder, :LLVMInsertIntoBuilder, [OpaqueBuilder, OpaqueValue], :void

.insert_into_builder_with_name(builder, instr, name) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :insert_into_builder_with_name, :LLVMInsertIntoBuilderWithName, [OpaqueBuilder, OpaqueValue, :string], :void

.install_fatal_error_handler(handler) ⇒ nil

Install a fatal error handler. By default, if LLVM detects a fatal error, it will call exit(1). This may not be appropriate in many contexts. For example, doing exit(1) will bypass many crash reporting/tracing system tools. This function allows you to install a callback that will be invoked prior to the call to exit(1).

Parameters:

  • handler (FFI::Pointer(FatalErrorHandler))

Returns:

  • (nil)


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

attach_function :install_fatal_error_handler, :LLVMInstallFatalErrorHandler, [:pointer], :void

.instruction_erase_from_parent(inst) ⇒ nil

Remove and delete an instruction.

The instruction specified is removed from its containing building block and then deleted.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Instructionllvm::Instruction::eraseFromParent()


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

attach_function :instruction_erase_from_parent, :LLVMInstructionEraseFromParent, [OpaqueValue], :void

.int16_typeOpaqueType

(Not documented)

Returns:



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

attach_function :int16_type, :LLVMInt16Type, [], OpaqueType

.int16_type_in_context(c) ⇒ OpaqueType

(Not documented)

Parameters:

Returns:



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

attach_function :int16_type_in_context, :LLVMInt16TypeInContext, [OpaqueContext], OpaqueType

.int1_typeOpaqueType

Obtain an integer type from the global context with a specified bit width.

Returns:



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

attach_function :int1_type, :LLVMInt1Type, [], OpaqueType

.int1_type_in_context(c) ⇒ OpaqueType

Obtain an integer type from a context with specified bit width.

Parameters:

Returns:



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

attach_function :int1_type_in_context, :LLVMInt1TypeInContext, [OpaqueContext], OpaqueType

.int32_typeOpaqueType

(Not documented)

Returns:



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

attach_function :int32_type, :LLVMInt32Type, [], OpaqueType

.int32_type_in_context(c) ⇒ OpaqueType

(Not documented)

Parameters:

Returns:



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

attach_function :int32_type_in_context, :LLVMInt32TypeInContext, [OpaqueContext], OpaqueType

.int64_typeOpaqueType

(Not documented)

Returns:



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

attach_function :int64_type, :LLVMInt64Type, [], OpaqueType

.int64_type_in_context(c) ⇒ OpaqueType

(Not documented)

Parameters:

Returns:



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

attach_function :int64_type_in_context, :LLVMInt64TypeInContext, [OpaqueContext], OpaqueType

.int8_typeOpaqueType

(Not documented)

Returns:



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

attach_function :int8_type, :LLVMInt8Type, [], OpaqueType

.int8_type_in_context(c) ⇒ OpaqueType

(Not documented)

Parameters:

Returns:



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

attach_function :int8_type_in_context, :LLVMInt8TypeInContext, [OpaqueContext], OpaqueType

.int_ptr_type(td) ⇒ FFI::Pointer(TypeRef)

Returns the integer type that is the same size as a pointer on a target.

See the method llvm::DataLayout::getIntPtrType.

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


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

attach_function :int_ptr_type, :LLVMIntPtrType, [OpaqueTargetData], :pointer

.int_ptr_type_for_as(td, as) ⇒ FFI::Pointer(TypeRef)

Returns the integer type that is the same size as a pointer on a target.

This version allows the address space to be specified.
See the method llvm::DataLayout::getIntPtrType.

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


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

attach_function :int_ptr_type_for_as, :LLVMIntPtrTypeForAS, [OpaqueTargetData, :uint], :pointer

.int_ptr_type_for_as_in_context(c, td, as) ⇒ FFI::Pointer(TypeRef)

Returns the integer type that is the same size as a pointer on a target.

This version allows the address space to be specified.
See the method llvm::DataLayout::getIntPtrType.

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


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

attach_function :int_ptr_type_for_as_in_context, :LLVMIntPtrTypeForASInContext, [:pointer, OpaqueTargetData, :uint], :pointer

.int_ptr_type_in_context(c, td) ⇒ FFI::Pointer(TypeRef)

Returns the integer type that is the same size as a pointer on a target.

See the method llvm::DataLayout::getIntPtrType.

Parameters:

Returns:

  • (FFI::Pointer(TypeRef))


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

attach_function :int_ptr_type_in_context, :LLVMIntPtrTypeInContext, [:pointer, OpaqueTargetData], :pointer

.int_type(num_bits) ⇒ OpaqueType

(Not documented)

Parameters:

  • num_bits (Integer)

Returns:



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

attach_function :int_type, :LLVMIntType, [:uint], OpaqueType

.int_type_in_context(c, num_bits) ⇒ OpaqueType

(Not documented)

Parameters:

Returns:



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

attach_function :int_type_in_context, :LLVMIntTypeInContext, [OpaqueContext, :uint], OpaqueType

.is_a_addr_space_cast_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_addr_space_cast_inst, :LLVMIsAAddrSpaceCastInst, [OpaqueValue], OpaqueValue

.is_a_alloca_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_alloca_inst, :LLVMIsAAllocaInst, [OpaqueValue], OpaqueValue

.is_a_argument(val) ⇒ OpaqueValue

Convert value instances between types.

Internally, an LLVMValueRef is “pinned” to a specific type. This series of functions allows you to cast an instance to a specific type.

If the cast is not valid for the specified type, NULL is returned.

Parameters:

Returns:

See Also:

  • llvmllvm::dyn_cast_or_null<>


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

attach_function :is_a_argument, :LLVMIsAArgument, [OpaqueValue], OpaqueValue

.is_a_basic_block(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_basic_block, :LLVMIsABasicBlock, [OpaqueValue], OpaqueValue

.is_a_binary_operator(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_binary_operator, :LLVMIsABinaryOperator, [OpaqueValue], OpaqueValue

.is_a_bit_cast_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_bit_cast_inst, :LLVMIsABitCastInst, [OpaqueValue], OpaqueValue

.is_a_block_address(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_block_address, :LLVMIsABlockAddress, [OpaqueValue], OpaqueValue

.is_a_branch_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_branch_inst, :LLVMIsABranchInst, [OpaqueValue], OpaqueValue

.is_a_call_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_call_inst, :LLVMIsACallInst, [OpaqueValue], OpaqueValue

.is_a_cast_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_cast_inst, :LLVMIsACastInst, [OpaqueValue], OpaqueValue

.is_a_cmp_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_cmp_inst, :LLVMIsACmpInst, [OpaqueValue], OpaqueValue

.is_a_constant(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant, :LLVMIsAConstant, [OpaqueValue], OpaqueValue

.is_a_constant_aggregate_zero(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_aggregate_zero, :LLVMIsAConstantAggregateZero, [OpaqueValue], OpaqueValue

.is_a_constant_array(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_array, :LLVMIsAConstantArray, [OpaqueValue], OpaqueValue

.is_a_constant_data_array(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_data_array, :LLVMIsAConstantDataArray, [OpaqueValue], OpaqueValue

.is_a_constant_data_sequential(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_data_sequential, :LLVMIsAConstantDataSequential, [OpaqueValue], OpaqueValue

.is_a_constant_data_vector(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_data_vector, :LLVMIsAConstantDataVector, [OpaqueValue], OpaqueValue

.is_a_constant_expr(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_expr, :LLVMIsAConstantExpr, [OpaqueValue], OpaqueValue

.is_a_constant_fp(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_fp, :LLVMIsAConstantFP, [OpaqueValue], OpaqueValue

.is_a_constant_int(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_int, :LLVMIsAConstantInt, [OpaqueValue], OpaqueValue

.is_a_constant_pointer_null(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_pointer_null, :LLVMIsAConstantPointerNull, [OpaqueValue], OpaqueValue

.is_a_constant_struct(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_struct, :LLVMIsAConstantStruct, [OpaqueValue], OpaqueValue

.is_a_constant_vector(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_constant_vector, :LLVMIsAConstantVector, [OpaqueValue], OpaqueValue

.is_a_dbg_declare_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_dbg_declare_inst, :LLVMIsADbgDeclareInst, [OpaqueValue], OpaqueValue

.is_a_dbg_info_intrinsic(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_dbg_info_intrinsic, :LLVMIsADbgInfoIntrinsic, [OpaqueValue], OpaqueValue

.is_a_extract_element_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_extract_element_inst, :LLVMIsAExtractElementInst, [OpaqueValue], OpaqueValue

.is_a_extract_value_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_extract_value_inst, :LLVMIsAExtractValueInst, [OpaqueValue], OpaqueValue

.is_a_function(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_function, :LLVMIsAFunction, [OpaqueValue], OpaqueValue

.is_a_get_element_ptr_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_get_element_ptr_inst, :LLVMIsAGetElementPtrInst, [OpaqueValue], OpaqueValue

.is_a_global_alias(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_global_alias, :LLVMIsAGlobalAlias, [OpaqueValue], OpaqueValue

.is_a_global_value(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_global_value, :LLVMIsAGlobalValue, [OpaqueValue], OpaqueValue

.is_a_global_variable(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_global_variable, :LLVMIsAGlobalVariable, [OpaqueValue], OpaqueValue

.is_a_indirect_br_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_indirect_br_inst, :LLVMIsAIndirectBrInst, [OpaqueValue], OpaqueValue

.is_a_inline_asm(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_inline_asm, :LLVMIsAInlineAsm, [OpaqueValue], OpaqueValue

.is_a_insert_element_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_insert_element_inst, :LLVMIsAInsertElementInst, [OpaqueValue], OpaqueValue

.is_a_insert_value_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_insert_value_inst, :LLVMIsAInsertValueInst, [OpaqueValue], OpaqueValue

.is_a_instruction(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_instruction, :LLVMIsAInstruction, [OpaqueValue], OpaqueValue

.is_a_int_to_ptr_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_int_to_ptr_inst, :LLVMIsAIntToPtrInst, [OpaqueValue], OpaqueValue

.is_a_intrinsic_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_intrinsic_inst, :LLVMIsAIntrinsicInst, [OpaqueValue], OpaqueValue

.is_a_invoke_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_invoke_inst, :LLVMIsAInvokeInst, [OpaqueValue], OpaqueValue

.is_a_landing_pad_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_landing_pad_inst, :LLVMIsALandingPadInst, [OpaqueValue], OpaqueValue

.is_a_load_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_load_inst, :LLVMIsALoadInst, [OpaqueValue], OpaqueValue

.is_a_mem_cpy_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_mem_cpy_inst, :LLVMIsAMemCpyInst, [OpaqueValue], OpaqueValue

.is_a_mem_intrinsic(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_mem_intrinsic, :LLVMIsAMemIntrinsic, [OpaqueValue], OpaqueValue

.is_a_mem_move_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_mem_move_inst, :LLVMIsAMemMoveInst, [OpaqueValue], OpaqueValue

.is_a_mem_set_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_mem_set_inst, :LLVMIsAMemSetInst, [OpaqueValue], OpaqueValue

.is_a_ptr_to_int_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_ptr_to_int_inst, :LLVMIsAPtrToIntInst, [OpaqueValue], OpaqueValue

.is_a_resume_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_resume_inst, :LLVMIsAResumeInst, [OpaqueValue], OpaqueValue

.is_a_return_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_return_inst, :LLVMIsAReturnInst, [OpaqueValue], OpaqueValue

.is_a_select_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_select_inst, :LLVMIsASelectInst, [OpaqueValue], OpaqueValue

.is_a_shuffle_vector_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_shuffle_vector_inst, :LLVMIsAShuffleVectorInst, [OpaqueValue], OpaqueValue

.is_a_store_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_store_inst, :LLVMIsAStoreInst, [OpaqueValue], OpaqueValue

.is_a_switch_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_switch_inst, :LLVMIsASwitchInst, [OpaqueValue], OpaqueValue

.is_a_terminator_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_terminator_inst, :LLVMIsATerminatorInst, [OpaqueValue], OpaqueValue

.is_a_trunc_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_trunc_inst, :LLVMIsATruncInst, [OpaqueValue], OpaqueValue

.is_a_unary_instruction(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_unary_instruction, :LLVMIsAUnaryInstruction, [OpaqueValue], OpaqueValue

.is_a_undef_value(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_undef_value, :LLVMIsAUndefValue, [OpaqueValue], OpaqueValue

.is_a_unreachable_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_unreachable_inst, :LLVMIsAUnreachableInst, [OpaqueValue], OpaqueValue

.is_a_user(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_a_user, :LLVMIsAUser, [OpaqueValue], OpaqueValue

.is_af_cmp_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_af_cmp_inst, :LLVMIsAFCmpInst, [OpaqueValue], OpaqueValue

.is_afp_ext_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_afp_ext_inst, :LLVMIsAFPExtInst, [OpaqueValue], OpaqueValue

.is_afp_to_si_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_afp_to_si_inst, :LLVMIsAFPToSIInst, [OpaqueValue], OpaqueValue

.is_afp_to_ui_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_afp_to_ui_inst, :LLVMIsAFPToUIInst, [OpaqueValue], OpaqueValue

.is_afp_trunc_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_afp_trunc_inst, :LLVMIsAFPTruncInst, [OpaqueValue], OpaqueValue

.is_ai_cmp_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_ai_cmp_inst, :LLVMIsAICmpInst, [OpaqueValue], OpaqueValue

.is_amd_node(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_amd_node, :LLVMIsAMDNode, [OpaqueValue], OpaqueValue

.is_amd_string(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_amd_string, :LLVMIsAMDString, [OpaqueValue], OpaqueValue

.is_aphi_node(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_aphi_node, :LLVMIsAPHINode, [OpaqueValue], OpaqueValue

.is_as_ext_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_as_ext_inst, :LLVMIsASExtInst, [OpaqueValue], OpaqueValue

.is_asi_to_fp_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_asi_to_fp_inst, :LLVMIsASIToFPInst, [OpaqueValue], OpaqueValue

.is_aui_to_fp_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_aui_to_fp_inst, :LLVMIsAUIToFPInst, [OpaqueValue], OpaqueValue

.is_ava_arg_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_ava_arg_inst, :LLVMIsAVAArgInst, [OpaqueValue], OpaqueValue

.is_az_ext_inst(val) ⇒ OpaqueValue

@}

Parameters:

Returns:



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

attach_function :is_az_ext_inst, :LLVMIsAZExtInst, [OpaqueValue], OpaqueValue

.is_constant(val) ⇒ Integer

Determine whether the specified constant instance is constant.

Parameters:

Returns:

  • (Integer)


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

attach_function :is_constant, :LLVMIsConstant, [OpaqueValue], :int

.is_declaration(global) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :is_declaration, :LLVMIsDeclaration, [OpaqueValue], :int

.is_externally_initialized(global_var) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :is_externally_initialized, :LLVMIsExternallyInitialized, [OpaqueValue], :int

.is_function_var_arg(function_ty) ⇒ Integer

Returns whether a function type is variadic.

Parameters:

Returns:

  • (Integer)


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

attach_function :is_function_var_arg, :LLVMIsFunctionVarArg, [OpaqueType], :int

.is_global_constant(global_var) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :is_global_constant, :LLVMIsGlobalConstant, [OpaqueValue], :int

.is_multithreadedInteger

Check whether LLVM is executing in thread-safe mode or not.

@see llvm::llvm_is_multithreaded

Returns:

  • (Integer)


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

attach_function :is_multithreaded, :LLVMIsMultithreaded, [], :int

.is_null(val) ⇒ Integer

Determine whether a value instance is null.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Constantllvm::Constant::isNullValue()


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

attach_function :is_null, :LLVMIsNull, [OpaqueValue], :int

.is_opaque_struct(struct_ty) ⇒ Integer

Determine whether a structure is opaque.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::StructTypellvm::StructType::isOpaque()


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

attach_function :is_opaque_struct, :LLVMIsOpaqueStruct, [OpaqueType], :int

.is_packed_struct(struct_ty) ⇒ Integer

Determine whether a structure is packed.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::StructTypellvm::StructType::isPacked()


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

attach_function :is_packed_struct, :LLVMIsPackedStruct, [OpaqueType], :int

.is_tail_call(call_inst) ⇒ Integer

Obtain whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::CallInstllvm::CallInst::isTailCall()


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

attach_function :is_tail_call, :LLVMIsTailCall, [OpaqueValue], :int

.is_thread_local(global_var) ⇒ Integer

(Not documented)

Parameters:

Returns:

  • (Integer)


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

attach_function :is_thread_local, :LLVMIsThreadLocal, [OpaqueValue], :int

.is_undef(val) ⇒ Integer

Determine whether a value instance is undefined.

Parameters:

Returns:

  • (Integer)


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

attach_function :is_undef, :LLVMIsUndef, [OpaqueValue], :int

.label_typeOpaqueType

(Not documented)

Returns:



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

attach_function :label_type, :LLVMLabelType, [], OpaqueType

.label_type_in_context(c) ⇒ OpaqueType

Create a label type in a context.

Parameters:

Returns:



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

attach_function :label_type_in_context, :LLVMLabelTypeInContext, [OpaqueContext], OpaqueType

(Not documented)

Returns:

  • (nil)


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

attach_function :link_in_interpreter, :LLVMLinkInInterpreter, [], :void

(Not documented)

Returns:

  • (nil)


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

attach_function :link_in_jit, :LLVMLinkInJIT, [], :void

(Not documented)

Returns:

  • (nil)


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

attach_function :link_in_mcjit, :LLVMLinkInMCJIT, [], :void

Links the source module into the destination module, taking ownership of the source module away from the caller. Optionally returns a human-readable description of any errors that occurred in linking. OutMessage must be disposed with LLVMDisposeMessage. The return value is true if an error occurred, false otherwise.

Parameters:

  • dest (FFI::Pointer(ModuleRef))
  • src (FFI::Pointer(ModuleRef))
  • mode (Symbol from _enum_linker_mode_)
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


43
# File 'lib/llvm/linker_ffi.rb', line 43

attach_function :link_modules, :LLVMLinkModules, [:pointer, :pointer, :linker_mode, :pointer], :int

.md_node(vals, count) ⇒ OpaqueValue

Obtain a MDNode value from the global context.

Parameters:

  • vals (FFI::Pointer(*ValueRef))
  • count (Integer)

Returns:



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

attach_function :md_node, :LLVMMDNode, [:pointer, :uint], OpaqueValue

.md_node_in_context(c, vals, count) ⇒ OpaqueValue

Obtain a MDNode value from a context.

The returned value corresponds to the llvm::MDNode class.

Parameters:

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

Returns:



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

attach_function :md_node_in_context, :LLVMMDNodeInContext, [OpaqueContext, :pointer, :uint], OpaqueValue

.md_string(str, s_len) ⇒ OpaqueValue

Obtain a MDString value from the global context.

Parameters:

  • str (String)
  • s_len (Integer)

Returns:



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

attach_function :md_string, :LLVMMDString, [:string, :uint], OpaqueValue

.md_string_in_context(c, str, s_len) ⇒ OpaqueValue

Obtain a MDString value from a context.

The returned instance corresponds to the llvm::MDString class.

The instance is specified by string data of a specified length. The string content is copied, so the backing memory can be freed after this function returns.

Parameters:

Returns:



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

attach_function :md_string_in_context, :LLVMMDStringInContext, [OpaqueContext, :string, :uint], OpaqueValue

.module_create_with_name(module_id) ⇒ OpaqueModule

Create a new, empty module in the global context.

This is equivalent to calling LLVMModuleCreateWithNameInContext with LLVMGetGlobalContext() as the context parameter.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

Parameters:

  • module_id (String)

Returns:



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

attach_function :module_create_with_name, :LLVMModuleCreateWithName, [:string], OpaqueModule

.module_create_with_name_in_context(module_id, c) ⇒ OpaqueModule

Create a new, empty module in a specific context.

Every invocation should be paired with LLVMDisposeModule() or memory will be leaked.

Parameters:

Returns:



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

attach_function :module_create_with_name_in_context, :LLVMModuleCreateWithNameInContext, [:string, OpaqueContext], OpaqueModule

.move_basic_block_after(bb, move_pos) ⇒ nil

Move a basic block to after another one.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::moveAfter()


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

attach_function :move_basic_block_after, :LLVMMoveBasicBlockAfter, [OpaqueBasicBlock, OpaqueBasicBlock], :void

.move_basic_block_before(bb, move_pos) ⇒ nil

Move a basic block to before another one.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::moveBefore()


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

attach_function :move_basic_block_before, :LLVMMoveBasicBlockBefore, [OpaqueBasicBlock, OpaqueBasicBlock], :void

.offset_of_element(td, struct_ty, element) ⇒ Integer

Computes the byte offset of the indexed struct element for a target.

See the method llvm::StructLayout::getElementContainingOffset.

Parameters:

Returns:

  • (Integer)


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

attach_function :offset_of_element, :LLVMOffsetOfElement, [OpaqueTargetData, :pointer, :uint], :ulong_long

.parse_bitcode(mem_buf, out_module, out_message) ⇒ Integer

(Not documented)

Parameters:

  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :parse_bitcode, :LLVMParseBitcode, [:pointer, :pointer, :pointer], :int

.parse_bitcode_in_context(context_ref, mem_buf, out_module, out_message) ⇒ Integer

(Not documented)

Parameters:

  • context_ref (FFI::Pointer(ContextRef))
  • mem_buf (FFI::Pointer(MemoryBufferRef))
  • out_module (FFI::Pointer(*ModuleRef))
  • out_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)


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

attach_function :parse_bitcode_in_context, :LLVMParseBitcodeInContext, [:pointer, :pointer, :pointer, :pointer], :int

.pass_manager_builder_createOpaquePassManagerBuilder

See llvm::PassManagerBuilder.



25
# File 'lib/llvm/transforms/builder_ffi.rb', line 25

attach_function :pass_manager_builder_create, :LLVMPassManagerBuilderCreate, [], OpaquePassManagerBuilder

.pass_manager_builder_dispose(pmb) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


33
# File 'lib/llvm/transforms/builder_ffi.rb', line 33

attach_function :pass_manager_builder_dispose, :LLVMPassManagerBuilderDispose, [OpaquePassManagerBuilder], :void

.pass_manager_builder_populate_function_pass_manager(pmb, pm) ⇒ nil

See llvm::PassManagerBuilder::populateFunctionPassManager.

Parameters:

Returns:

  • (nil)


96
# File 'lib/llvm/transforms/builder_ffi.rb', line 96

attach_function :pass_manager_builder_populate_function_pass_manager, :LLVMPassManagerBuilderPopulateFunctionPassManager, [OpaquePassManagerBuilder, :pointer], :void

.pass_manager_builder_populate_lto_pass_manager(pmb, pm, internalize, run_inliner) ⇒ nil

See llvm::PassManagerBuilder::populateLTOPassManager.

Parameters:

Returns:

  • (nil)


116
# File 'lib/llvm/transforms/builder_ffi.rb', line 116

attach_function :pass_manager_builder_populate_lto_pass_manager, :LLVMPassManagerBuilderPopulateLTOPassManager, [OpaquePassManagerBuilder, :pointer, :int, :int], :void

.pass_manager_builder_populate_module_pass_manager(pmb, pm) ⇒ nil

See llvm::PassManagerBuilder::populateModulePassManager.

Parameters:

Returns:

  • (nil)


105
# File 'lib/llvm/transforms/builder_ffi.rb', line 105

attach_function :pass_manager_builder_populate_module_pass_manager, :LLVMPassManagerBuilderPopulateModulePassManager, [OpaquePassManagerBuilder, :pointer], :void

.pass_manager_builder_set_disable_simplify_lib_calls(pmb, value) ⇒ nil

See llvm::PassManagerBuilder::DisableSimplifyLibCalls

Parameters:

Returns:

  • (nil)


78
# File 'lib/llvm/transforms/builder_ffi.rb', line 78

attach_function :pass_manager_builder_set_disable_simplify_lib_calls, :LLVMPassManagerBuilderSetDisableSimplifyLibCalls, [OpaquePassManagerBuilder, :int], :void

.pass_manager_builder_set_disable_unit_at_a_time(pmb, value) ⇒ nil

See llvm::PassManagerBuilder::DisableUnitAtATime.

Parameters:

Returns:

  • (nil)


60
# File 'lib/llvm/transforms/builder_ffi.rb', line 60

attach_function :pass_manager_builder_set_disable_unit_at_a_time, :LLVMPassManagerBuilderSetDisableUnitAtATime, [OpaquePassManagerBuilder, :int], :void

.pass_manager_builder_set_disable_unroll_loops(pmb, value) ⇒ nil

See llvm::PassManagerBuilder::DisableUnrollLoops.

Parameters:

Returns:

  • (nil)


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

attach_function :pass_manager_builder_set_disable_unroll_loops, :LLVMPassManagerBuilderSetDisableUnrollLoops, [OpaquePassManagerBuilder, :int], :void

.pass_manager_builder_set_opt_level(pmb, opt_level) ⇒ nil

See llvm::PassManagerBuilder::OptLevel.

Parameters:

Returns:

  • (nil)


42
# File 'lib/llvm/transforms/builder_ffi.rb', line 42

attach_function :pass_manager_builder_set_opt_level, :LLVMPassManagerBuilderSetOptLevel, [OpaquePassManagerBuilder, :uint], :void

.pass_manager_builder_set_size_level(pmb, size_level) ⇒ nil

See llvm::PassManagerBuilder::SizeLevel.

Parameters:

Returns:

  • (nil)


51
# File 'lib/llvm/transforms/builder_ffi.rb', line 51

attach_function :pass_manager_builder_set_size_level, :LLVMPassManagerBuilderSetSizeLevel, [OpaquePassManagerBuilder, :uint], :void

.pass_manager_builder_use_inliner_with_threshold(pmb, threshold) ⇒ nil

See llvm::PassManagerBuilder::Inliner.

Parameters:

Returns:

  • (nil)


87
# File 'lib/llvm/transforms/builder_ffi.rb', line 87

attach_function :pass_manager_builder_use_inliner_with_threshold, :LLVMPassManagerBuilderUseInlinerWithThreshold, [OpaquePassManagerBuilder, :uint], :void

.pointer_size(td) ⇒ Integer

Returns the pointer size in bytes for a target.

See the method llvm::DataLayout::getPointerSize.

Parameters:

Returns:

  • (Integer)


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

attach_function :pointer_size, :LLVMPointerSize, [OpaqueTargetData], :uint

.pointer_size_for_as(td, as) ⇒ Integer

Returns the pointer size in bytes for a target for a specified

address space.
See the method llvm::DataLayout::getPointerSize.

Parameters:

Returns:

  • (Integer)


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

attach_function :pointer_size_for_as, :LLVMPointerSizeForAS, [OpaqueTargetData, :uint], :uint

.pointer_type(element_type, address_space) ⇒ OpaqueType

Create a pointer type that points to a defined type.

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

Parameters:

  • element_type (OpaqueType)
  • address_space (Integer)

Returns:

See Also:

  • llvmllvm::PointerTypellvm::PointerType::get()


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

attach_function :pointer_type, :LLVMPointerType, [OpaqueType, :uint], OpaqueType

.position_builder(builder, block, instr) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :position_builder, :LLVMPositionBuilder, [OpaqueBuilder, OpaqueBasicBlock, OpaqueValue], :void

.position_builder_at_end(builder, block) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :position_builder_at_end, :LLVMPositionBuilderAtEnd, [OpaqueBuilder, OpaqueBasicBlock], :void

.position_builder_before(builder, instr) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


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

attach_function :position_builder_before, :LLVMPositionBuilderBefore, [OpaqueBuilder, OpaqueValue], :void

.ppcfp128_typeOpaqueType

(Not documented)

Returns:



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

attach_function :ppcfp128_type, :LLVMPPCFP128Type, [], OpaqueType

.ppcfp128_type_in_context(c) ⇒ OpaqueType

Obtain a 128-bit floating point type (two 64-bits) from a context.

Parameters:

Returns:



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

attach_function :ppcfp128_type_in_context, :LLVMPPCFP128TypeInContext, [OpaqueContext], OpaqueType

.preferred_alignment_of_global(td, global_var) ⇒ Integer

Computes the preferred alignment of a global variable in bytes for a target.

See the method llvm::DataLayout::getPreferredAlignment.

Parameters:

Returns:

  • (Integer)


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

attach_function :preferred_alignment_of_global, :LLVMPreferredAlignmentOfGlobal, [OpaqueTargetData, :pointer], :uint

.preferred_alignment_of_type(td, ty) ⇒ Integer

Computes the preferred alignment of a type in bytes for a target.

See the method llvm::DataLayout::getTypeABISize.

Parameters:

Returns:

  • (Integer)


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

attach_function :preferred_alignment_of_type, :LLVMPreferredAlignmentOfType, [OpaqueTargetData, :pointer], :uint

Print a representation of a module to a file. The ErrorMessage needs to be disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.

Parameters:

  • m (OpaqueModule)
  • filename (String)
  • error_message (FFI::Pointer(**CharS))

Returns:

  • (Integer)

See Also:

  • Module::print()


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

attach_function :print_module_to_file, :LLVMPrintModuleToFile, [OpaqueModule, :string, :pointer], :int

Return a string representation of the module. Use LLVMDisposeMessage to free the string.

Parameters:

Returns:

  • (String)

See Also:

  • Module::print()


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

attach_function :print_module_to_string, :LLVMPrintModuleToString, [OpaqueModule], :string

Return a string representation of the type. Use LLVMDisposeMessage to free the string.

Parameters:

Returns:

  • (String)

See Also:

  • llvmllvm::Typellvm::Type::print()


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

attach_function :print_type_to_string, :LLVMPrintTypeToString, [OpaqueType], :string

Return a string representation of the value. Use LLVMDisposeMessage to free the string.

Parameters:

Returns:

  • (String)

See Also:

  • llvmllvm::Valuellvm::Value::print()


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

attach_function :print_value_to_string, :LLVMPrintValueToString, [OpaqueValue], :string

(Not documented)

Parameters:

Returns:

  • (FFI::Pointer(*Void))


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

attach_function :recompile_and_relink_function, :LLVMRecompileAndRelinkFunction, [OpaqueExecutionEngine, :pointer], :pointer

.remove_attribute(arg, pa) ⇒ nil

Remove an attribute from a function argument.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Argumentllvm::Argument::removeAttr()


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

attach_function :remove_attribute, :LLVMRemoveAttribute, [OpaqueValue, :attribute], :void

.remove_basic_block_from_parent(bb) ⇒ nil

Remove a basic block from a function.

This deletes the basic block from its containing function but keep the basic block alive.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::BasicBlockllvm::BasicBlock::removeFromParent()


4087
# File 'lib/llvm/core_ffi.rb', line 4087

attach_function :remove_basic_block_from_parent, :LLVMRemoveBasicBlockFromParent, [OpaqueBasicBlock], :void

.remove_function_attr(fn, pa) ⇒ nil

Remove an attribute from a function.

Parameters:

Returns:

  • (nil)


3663
# File 'lib/llvm/core_ffi.rb', line 3663

attach_function :remove_function_attr, :LLVMRemoveFunctionAttr, [OpaqueValue, :attribute], :void

.remove_instr_attribute(instr, index, attribute) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


4275
# File 'lib/llvm/core_ffi.rb', line 4275

attach_function :remove_instr_attribute, :LLVMRemoveInstrAttribute, [OpaqueValue, :uint, :attribute], :void

.remove_module(ee, m, out_mod, out_error) ⇒ Integer

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • m (FFI::Pointer(ModuleRef))
  • out_mod (FFI::Pointer(*ModuleRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


321
# File 'lib/llvm/execution_engine_ffi.rb', line 321

attach_function :remove_module, :LLVMRemoveModule, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int

.remove_module_provider(ee, mp, out_mod, out_error) ⇒ Integer

Deprecated: Use LLVMRemoveModule instead.

Parameters:

  • ee (OpaqueExecutionEngine)
  • mp (FFI::Pointer(ModuleProviderRef))
  • out_mod (FFI::Pointer(*ModuleRef))
  • out_error (FFI::Pointer(**CharS))

Returns:

  • (Integer)


332
# File 'lib/llvm/execution_engine_ffi.rb', line 332

attach_function :remove_module_provider, :LLVMRemoveModuleProvider, [OpaqueExecutionEngine, :pointer, :pointer, :pointer], :int

.replace_all_uses_with(old_val, new_val) ⇒ nil

Replace all uses of a value with another one.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::replaceAllUsesWith()


1747
# File 'lib/llvm/core_ffi.rb', line 1747

attach_function :replace_all_uses_with, :LLVMReplaceAllUsesWith, [OpaqueValue, OpaqueValue], :void

.reset_fatal_error_handlernil

Reset the fatal error handler. This resets LLVM’s fatal error handling behavior to the default.

Returns:

  • (nil)


829
# File 'lib/llvm/core_ffi.rb', line 829

attach_function :reset_fatal_error_handler, :LLVMResetFatalErrorHandler, [], :void

.run_function(ee, f, num_args, args) ⇒ OpaqueGenericValue

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • f (FFI::Pointer(ValueRef))
  • num_args (Integer)
  • args (FFI::Pointer(*GenericValueRef))

Returns:



283
# File 'lib/llvm/execution_engine_ffi.rb', line 283

attach_function :run_function, :LLVMRunFunction, [OpaqueExecutionEngine, :pointer, :uint, :pointer], OpaqueGenericValue

.run_function_as_main(ee, f, arg_c, arg_v, env_p) ⇒ Integer

(Not documented)

Parameters:

  • ee (OpaqueExecutionEngine)
  • f (FFI::Pointer(ValueRef))
  • arg_c (Integer)
  • arg_v (FFI::Pointer(**CharS))
  • env_p (FFI::Pointer(**CharS))

Returns:

  • (Integer)


272
# File 'lib/llvm/execution_engine_ffi.rb', line 272

attach_function :run_function_as_main, :LLVMRunFunctionAsMain, [OpaqueExecutionEngine, :pointer, :uint, :pointer, :pointer], :int

.run_function_pass_manager(fpm, f) ⇒ Integer

Executes all of the function passes scheduled in the function pass manager

on the provided function. Returns 1 if any of the passes modified the
function, false otherwise.
@see llvm::FunctionPassManager::run(Function&)

Parameters:

Returns:

  • (Integer)


5649
# File 'lib/llvm/core_ffi.rb', line 5649

attach_function :run_function_pass_manager, :LLVMRunFunctionPassManager, [OpaquePassManager, OpaqueValue], :int

.run_pass_manager(pm, m) ⇒ Integer

Initializes, executes on the provided module, and finalizes all of the

passes scheduled in the pass manager. Returns 1 if any of the passes
modified the module, 0 otherwise.
@see llvm::PassManager::run(Module&)

Parameters:

Returns:

  • (Integer)


5627
# File 'lib/llvm/core_ffi.rb', line 5627

attach_function :run_pass_manager, :LLVMRunPassManager, [OpaquePassManager, OpaqueModule], :int

.run_static_constructors(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


252
# File 'lib/llvm/execution_engine_ffi.rb', line 252

attach_function :run_static_constructors, :LLVMRunStaticConstructors, [OpaqueExecutionEngine], :void

.run_static_destructors(ee) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


260
# File 'lib/llvm/execution_engine_ffi.rb', line 260

attach_function :run_static_destructors, :LLVMRunStaticDestructors, [OpaqueExecutionEngine], :void

.set_alignment(v, bytes) ⇒ nil

Set the preferred alignment of the value.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::LoadInstllvm::LoadInst::setAlignment()
  • llvmllvm::StoreInstllvm::StoreInst::setAlignment()
  • llvmllvm::GlobalValuellvm::GlobalValue::setAlignment()


3376
# File 'lib/llvm/core_ffi.rb', line 3376

attach_function :set_alignment, :LLVMSetAlignment, [OpaqueValue, :uint], :void

.set_cleanup(landing_pad, val) ⇒ nil

Set the ‘cleanup’ flag in the landingpad instruction

Parameters:

Returns:

  • (nil)


4624
# File 'lib/llvm/core_ffi.rb', line 4624

attach_function :set_cleanup, :LLVMSetCleanup, [OpaqueValue, :int], :void

.set_current_debug_location(builder, l) ⇒ nil

Metadata

Parameters:

Returns:

  • (nil)


4459
# File 'lib/llvm/core_ffi.rb', line 4459

attach_function :set_current_debug_location, :LLVMSetCurrentDebugLocation, [OpaqueBuilder, OpaqueValue], :void

.set_data_layout(m, triple) ⇒ nil

Set the data layout for a module.

Parameters:

Returns:

  • (nil)

See Also:

  • Module::setDataLayout()


943
# File 'lib/llvm/core_ffi.rb', line 943

attach_function :set_data_layout, :LLVMSetDataLayout, [OpaqueModule, :string], :void

.set_externally_initialized(global_var, is_ext_init) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3537
# File 'lib/llvm/core_ffi.rb', line 3537

attach_function :set_externally_initialized, :LLVMSetExternallyInitialized, [OpaqueValue, :int], :void

.set_function_call_conv(fn, cc) ⇒ nil

Set the calling convention of a function.

Parameters:

  • Fn

    Function to operate on

  • CC

    LLVMCallConv to set calling convention to

  • fn (OpaqueValue)
  • cc (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::setCallingConv()


3600
# File 'lib/llvm/core_ffi.rb', line 3600

attach_function :set_function_call_conv, :LLVMSetFunctionCallConv, [OpaqueValue, :uint], :void

.set_gc(fn, name) ⇒ nil

Define the garbage collector to use during code generation.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Functionllvm::Function::setGC()


3622
# File 'lib/llvm/core_ffi.rb', line 3622

attach_function :set_gc, :LLVMSetGC, [OpaqueValue, :string], :void

.set_global_constant(global_var, is_constant) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3503
# File 'lib/llvm/core_ffi.rb', line 3503

attach_function :set_global_constant, :LLVMSetGlobalConstant, [OpaqueValue, :int], :void

.set_initializer(global_var, constant_val) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3469
# File 'lib/llvm/core_ffi.rb', line 3469

attach_function :set_initializer, :LLVMSetInitializer, [OpaqueValue, OpaqueValue], :void

.set_inst_debug_location(builder, inst) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


4476
# File 'lib/llvm/core_ffi.rb', line 4476

attach_function :set_inst_debug_location, :LLVMSetInstDebugLocation, [OpaqueBuilder, OpaqueValue], :void

.set_instr_param_alignment(instr, index, align) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


4285
# File 'lib/llvm/core_ffi.rb', line 4285

attach_function :set_instr_param_alignment, :LLVMSetInstrParamAlignment, [OpaqueValue, :uint, :uint], :void

.set_instruction_call_conv(instr, cc) ⇒ nil

Set the calling convention for a call instruction.

This expects an LLVMValueRef that corresponds to a llvm::CallInst or llvm::InvokeInst.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::CallInstllvm::CallInst::setCallingConv()
  • llvmllvm::InvokeInstllvm::InvokeInst::setCallingConv()


4242
# File 'lib/llvm/core_ffi.rb', line 4242

attach_function :set_instruction_call_conv, :LLVMSetInstructionCallConv, [OpaqueValue, :uint], :void

.set_linkage(global, linkage) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3319
# File 'lib/llvm/core_ffi.rb', line 3319

attach_function :set_linkage, :LLVMSetLinkage, [OpaqueValue, :linkage], :void

.set_metadata(val, kind_id, node) ⇒ nil

Set metadata associated with an instruction value.

Parameters:

Returns:

  • (nil)


4157
# File 'lib/llvm/core_ffi.rb', line 4157

attach_function :set_metadata, :LLVMSetMetadata, [OpaqueValue, :uint, OpaqueValue], :void

.set_module_inline_asm(m, asm) ⇒ nil

Set inline assembly for a module.

Parameters:

Returns:

  • (nil)

See Also:

  • Module::setModuleInlineAsm()


1009
# File 'lib/llvm/core_ffi.rb', line 1009

attach_function :set_module_inline_asm, :LLVMSetModuleInlineAsm, [OpaqueModule, :string], :void

.set_operand(user, index, val) ⇒ nil

Set an operand at a specific index in a llvm::User value.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Userllvm::User::setOperand()


2426
# File 'lib/llvm/core_ffi.rb', line 2426

attach_function :set_operand, :LLVMSetOperand, [OpaqueValue, :uint, OpaqueValue], :void

.set_param_alignment(arg, align) ⇒ nil

Set the alignment for a function parameter.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Argumentllvm::Argument::addAttr()
  • llvmllvm::AttrBuilderllvm::AttrBuilder::addAlignmentAttr()


3801
# File 'lib/llvm/core_ffi.rb', line 3801

attach_function :set_param_alignment, :LLVMSetParamAlignment, [OpaqueValue, :uint], :void

.set_section(global, section) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3336
# File 'lib/llvm/core_ffi.rb', line 3336

attach_function :set_section, :LLVMSetSection, [OpaqueValue, :string], :void

.set_tail_call(call_inst, is_tail_call) ⇒ nil

Set whether a call instruction is a tail call.

This only works on llvm::CallInst instructions.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::CallInstllvm::CallInst::setTailCall()


4310
# File 'lib/llvm/core_ffi.rb', line 4310

attach_function :set_tail_call, :LLVMSetTailCall, [OpaqueValue, :int], :void

.set_target(m, triple) ⇒ nil

Set the target triple for a module.

Parameters:

Returns:

  • (nil)

See Also:

  • Module::setTargetTriple()


964
# File 'lib/llvm/core_ffi.rb', line 964

attach_function :set_target, :LLVMSetTarget, [OpaqueModule, :string], :void

.set_target_machine_asm_verbosity(t, verbose_asm) ⇒ nil

Set the target machine’s ASM verbosity.

Parameters:

Returns:

  • (nil)


618
# File 'lib/llvm/target_ffi.rb', line 618

attach_function :set_target_machine_asm_verbosity, :LLVMSetTargetMachineAsmVerbosity, [OpaqueTargetMachine, :int], :void

.set_thread_local(global_var, is_thread_local) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3486
# File 'lib/llvm/core_ffi.rb', line 3486

attach_function :set_thread_local, :LLVMSetThreadLocal, [OpaqueValue, :int], :void

.set_thread_local_mode(global_var, mode) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3520
# File 'lib/llvm/core_ffi.rb', line 3520

attach_function :set_thread_local_mode, :LLVMSetThreadLocalMode, [OpaqueValue, :thread_local_mode], :void

.set_value_name(val, name) ⇒ nil

Set the string name of a value.

Parameters:

Returns:

  • (nil)

See Also:

  • llvmllvm::Valuellvm::Value::setName()


1715
# File 'lib/llvm/core_ffi.rb', line 1715

attach_function :set_value_name, :LLVMSetValueName, [OpaqueValue, :string], :void

.set_visibility(global, viz) ⇒ nil

(Not documented)

Parameters:

Returns:

  • (nil)


3353
# File 'lib/llvm/core_ffi.rb', line 3353

attach_function :set_visibility, :LLVMSetVisibility, [OpaqueValue, :visibility], :void

.set_volatile(memory_access_inst, is_volatile) ⇒ nil

(Not documented)

Parameters:

  • memory_access_inst (OpaqueValue)
  • is_volatile (Integer)

Returns:

  • (nil)


5104
# File 'lib/llvm/core_ffi.rb', line 5104

attach_function :set_volatile, :LLVMSetVolatile, [OpaqueValue, :int], :void

.shutdownnil

Deallocate and destroy all ManagedStatic variables.

@see llvm::llvm_shutdown
@see ManagedStatic

Returns:

  • (nil)


793
# File 'lib/llvm/core_ffi.rb', line 793

attach_function :shutdown, :LLVMShutdown, [], :void

.size_of(ty) ⇒ OpaqueValue

(Not documented)

Parameters:

Returns:



2721
# File 'lib/llvm/core_ffi.rb', line 2721

attach_function :size_of, :LLVMSizeOf, [OpaqueType], OpaqueValue

.size_of_type_in_bits(td, ty) ⇒ Integer

Computes the size of a type in bytes for a target.

See the method llvm::DataLayout::getTypeSizeInBits.

Parameters:

Returns:

  • (Integer)


252
# File 'lib/llvm/target_ffi.rb', line 252

attach_function :size_of_type_in_bits, :LLVMSizeOfTypeInBits, [OpaqueTargetData, :pointer], :ulong_long

.start_multithreadedInteger

Allocate and initialize structures needed to make LLVM safe for

multithreading. The return value indicates whether multithreaded
initialization succeeded. Must be executed in isolation from all
other LLVM api calls.
@see llvm::llvm_start_multithreaded

Returns:

  • (Integer)


5680
# File 'lib/llvm/core_ffi.rb', line 5680

attach_function :start_multithreaded, :LLVMStartMultithreaded, [], :int

.stop_multithreadednil

Deallocate structures necessary to make LLVM safe for multithreading.

Must be executed in isolation from all other LLVM api calls.
@see llvm::llvm_stop_multithreaded

Returns:

  • (nil)


5689
# File 'lib/llvm/core_ffi.rb', line 5689

attach_function :stop_multithreaded, :LLVMStopMultithreaded, [], :void

.store_size_of_type(td, ty) ⇒ Integer

Computes the storage size of a type in bytes for a target.

See the method llvm::DataLayout::getTypeStoreSize.

Parameters:

Returns:

  • (Integer)


262
# File 'lib/llvm/target_ffi.rb', line 262

attach_function :store_size_of_type, :LLVMStoreSizeOfType, [OpaqueTargetData, :pointer], :ulong_long

.struct_create_named(c, name) ⇒ OpaqueType

Create an empty structure in a context having a specified name.

Parameters:

Returns:

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1478
# File 'lib/llvm/core_ffi.rb', line 1478

attach_function :struct_create_named, :LLVMStructCreateNamed, [OpaqueContext, :string], OpaqueType

.struct_set_body(struct_ty, element_types, element_count, packed) ⇒ nil

Set the contents of a structure type.

Parameters:

  • struct_ty (OpaqueType)
  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

  • (nil)

See Also:

  • llvmllvm::StructTypellvm::StructType::setBody()


1501
# File 'lib/llvm/core_ffi.rb', line 1501

attach_function :struct_set_body, :LLVMStructSetBody, [OpaqueType, :pointer, :uint, :int], :void

.struct_type(element_types, element_count, packed) ⇒ OpaqueType

Create a new structure type in the global context.

Parameters:

  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1467
# File 'lib/llvm/core_ffi.rb', line 1467

attach_function :struct_type, :LLVMStructType, [:pointer, :uint, :int], OpaqueType

.struct_type_in_context(c, element_types, element_count, packed) ⇒ OpaqueType

Create a new structure type in a context.

A structure is specified by a list of inner elements/types and whether these can be packed together.

Parameters:

  • c (OpaqueContext)
  • element_types (FFI::Pointer(*TypeRef))
  • element_count (Integer)
  • packed (Integer)

Returns:

See Also:

  • llvmllvm::StructTypellvm::StructType::create()


1455
# File 'lib/llvm/core_ffi.rb', line 1455

attach_function :struct_type_in_context, :LLVMStructTypeInContext, [OpaqueContext, :pointer, :uint, :int], OpaqueType

.target_has_asm_backend(t) ⇒ Integer

Returns if the target as an ASM backend (required for emitting output)

Parameters:

Returns:

  • (Integer)


540
# File 'lib/llvm/target_ffi.rb', line 540

attach_function :target_has_asm_backend, :LLVMTargetHasAsmBackend, [Target], :int

.target_has_jit(t) ⇒ Integer

Returns if the target has a JIT

Parameters:

Returns:

  • (Integer)


524
# File 'lib/llvm/target_ffi.rb', line 524

attach_function :target_has_jit, :LLVMTargetHasJIT, [Target], :int

.target_has_target_machine(t) ⇒ Integer

Returns if the target has a TargetMachine associated

Parameters:

Returns:

  • (Integer)


532
# File 'lib/llvm/target_ffi.rb', line 532

attach_function :target_has_target_machine, :LLVMTargetHasTargetMachine, [Target], :int

.target_machine_emit_to_file(t, m, filename, codegen, error_message) ⇒ Integer

Emits an asm or object file for the given module to the filename. This

wraps several c++ only classes (among them a file stream). Returns any
error in ErrorMessage. Use LLVMDisposeMessage to dispose the message.

Parameters:

Returns:

  • (Integer)


632
# File 'lib/llvm/target_ffi.rb', line 632

attach_function :target_machine_emit_to_file, :LLVMTargetMachineEmitToFile, [OpaqueTargetMachine, :pointer, :string, :code_gen_file_type, :pointer], :int

.target_machine_emit_to_memory_buffer(t, m, codegen, error_message, out_mem_buf) ⇒ Integer

Compile the LLVM IR stored in p M and store the result in p OutMemBuf.

Parameters:

Returns:

  • (Integer)


644
# File 'lib/llvm/target_ffi.rb', line 644

attach_function :target_machine_emit_to_memory_buffer, :LLVMTargetMachineEmitToMemoryBuffer, [OpaqueTargetMachine, :pointer, :code_gen_file_type, :pointer, :pointer], :int

.type_is_sized(ty) ⇒ Integer

Whether the type has a known size.

Things that don’t have a size are abstract types, labels, and void.a

Parameters:

Returns:

  • (Integer)

See Also:

  • llvmllvm::Typellvm::Type::isSized()


1159
# File 'lib/llvm/core_ffi.rb', line 1159

attach_function :type_is_sized, :LLVMTypeIsSized, [OpaqueType], :int

.type_of(val) ⇒ OpaqueType

Obtain the type of a value.

Parameters:

Returns:

See Also:

  • llvmllvm::Valuellvm::Value::getType()


1694
# File 'lib/llvm/core_ffi.rb', line 1694

attach_function :type_of, :LLVMTypeOf, [OpaqueValue], OpaqueType

.value_as_basic_block(val) ⇒ OpaqueBasicBlock

Convert an LLVMValueRef to an LLVMBasicBlockRef instance.

Parameters:

Returns:



3912
# File 'lib/llvm/core_ffi.rb', line 3912

attach_function :value_as_basic_block, :LLVMValueAsBasicBlock, [OpaqueValue], OpaqueBasicBlock

.value_is_basic_block(val) ⇒ Integer

Determine whether an LLVMValueRef is itself a basic block.

Parameters:

Returns:

  • (Integer)


3904
# File 'lib/llvm/core_ffi.rb', line 3904

attach_function :value_is_basic_block, :LLVMValueIsBasicBlock, [OpaqueValue], :int

.vector_type(element_type, element_count) ⇒ OpaqueType

Create a vector type that contains a defined type and has a specific number of elements.

The created type will exist in the context thats its element type exists in.

Parameters:

  • element_type (OpaqueType)
  • element_count (Integer)

Returns:

See Also:

  • llvmllvm::VectorTypellvm::VectorType::get()


1626
# File 'lib/llvm/core_ffi.rb', line 1626

attach_function :vector_type, :LLVMVectorType, [OpaqueType, :uint], OpaqueType

.verify_function(fn, action) ⇒ Integer

Verifies that a single function is valid, taking the specified action. Useful

for debugging.

Parameters:

Returns:

  • (Integer)


56
# File 'lib/llvm/analysis_ffi.rb', line 56

attach_function :verify_function, :LLVMVerifyFunction, [:pointer, :verifier_failure_action], :int

.verify_module(m, action, out_message) ⇒ Integer

Verifies that a module is valid, taking the specified action if not.

Optionally returns a human-readable description of any invalid constructs.
OutMessage must be disposed with LLVMDisposeMessage.

Parameters:

Returns:

  • (Integer)


46
# File 'lib/llvm/analysis_ffi.rb', line 46

attach_function :verify_module, :LLVMVerifyModule, [:pointer, :verifier_failure_action, :pointer], :int

.view_function_cfg(fn) ⇒ nil

Open up a ghostview window that displays the CFG of the current function.

Useful for debugging.

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)


65
# File 'lib/llvm/analysis_ffi.rb', line 65

attach_function :view_function_cfg, :LLVMViewFunctionCFG, [:pointer], :void

.view_function_cfg_only(fn) ⇒ nil

(Not documented)

Parameters:

  • fn (FFI::Pointer(ValueRef))

Returns:

  • (nil)


73
# File 'lib/llvm/analysis_ffi.rb', line 73

attach_function :view_function_cfg_only, :LLVMViewFunctionCFGOnly, [:pointer], :void

.void_typeOpaqueType

These are similar to the above functions except they operate on the global context.

Returns:



1670
# File 'lib/llvm/core_ffi.rb', line 1670

attach_function :void_type, :LLVMVoidType, [], OpaqueType

.void_type_in_context(c) ⇒ OpaqueType

Create a void type in a context.

Parameters:

Returns:



1646
# File 'lib/llvm/core_ffi.rb', line 1646

attach_function :void_type_in_context, :LLVMVoidTypeInContext, [OpaqueContext], OpaqueType

.write_bitcode_to_fd(m, fd, should_close, unbuffered) ⇒ Integer

Writes a module to an open file descriptor. Returns 0 on success.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • fd (Integer)
  • should_close (Integer)
  • unbuffered (Integer)

Returns:

  • (Integer)


98
# File 'lib/llvm/core/bitcode_ffi.rb', line 98

attach_function :write_bitcode_to_fd, :LLVMWriteBitcodeToFD, [:pointer, :int, :int, :int], :int

.write_bitcode_to_file(m, path) ⇒ Integer

(Not documented)

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • path (String)

Returns:

  • (Integer)


87
# File 'lib/llvm/core/bitcode_ffi.rb', line 87

attach_function :write_bitcode_to_file, :LLVMWriteBitcodeToFile, [:pointer, :string], :int

.write_bitcode_to_file_handle(m, handle) ⇒ Integer

Deprecated for LLVMWriteBitcodeToFD. Writes a module to an open file

descriptor. Returns 0 on success. Closes the Handle.

Parameters:

  • m (FFI::Pointer(ModuleRef))
  • handle (Integer)

Returns:

  • (Integer)


108
# File 'lib/llvm/core/bitcode_ffi.rb', line 108

attach_function :write_bitcode_to_file_handle, :LLVMWriteBitcodeToFileHandle, [:pointer, :int], :int

.x86fp80_typeOpaqueType

(Not documented)

Returns:



1370
# File 'lib/llvm/core_ffi.rb', line 1370

attach_function :x86fp80_type, :LLVMX86FP80Type, [], OpaqueType

.x86fp80_type_in_context(c) ⇒ OpaqueType

Obtain a 80-bit floating point type (X87) from a context.

Parameters:

Returns:



1323
# File 'lib/llvm/core_ffi.rb', line 1323

attach_function :x86fp80_type_in_context, :LLVMX86FP80TypeInContext, [OpaqueContext], OpaqueType

.x86mmx_typeOpaqueType

(Not documented)

Returns:



1684
# File 'lib/llvm/core_ffi.rb', line 1684

attach_function :x86mmx_type, :LLVMX86MMXType, [], OpaqueType

.x86mmx_type_in_context(c) ⇒ OpaqueType

Create a X86 MMX type in a context.

Parameters:

Returns:



1662
# File 'lib/llvm/core_ffi.rb', line 1662

attach_function :x86mmx_type_in_context, :LLVMX86MMXTypeInContext, [OpaqueContext], OpaqueType