ruby-llvm 3.0.0.beta → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +6 -3
- data/ext/ruby-llvm-support/Rakefile +1 -0
- data/lib/llvm/analysis.rb +8 -18
- data/lib/llvm/analysis_ffi.rb +68 -0
- data/lib/llvm/core.rb +2 -598
- data/lib/llvm/core/bitcode.rb +12 -16
- data/lib/llvm/core/bitcode_ffi.rb +104 -0
- data/lib/llvm/core/builder.rb +85 -84
- data/lib/llvm/core/context.rb +5 -3
- data/lib/llvm/core/module.rb +24 -22
- data/lib/llvm/core/pass_manager.rb +13 -11
- data/lib/llvm/core/type.rb +56 -24
- data/lib/llvm/core/value.rb +98 -99
- data/lib/llvm/core_ffi.rb +4712 -0
- data/lib/llvm/execution_engine.rb +46 -57
- data/lib/llvm/execution_engine_ffi.rb +310 -0
- data/lib/llvm/support.rb +2 -2
- data/lib/llvm/target.rb +2 -4
- data/lib/llvm/target_ffi.rb +217 -0
- data/lib/llvm/transforms/ipo.rb +3 -8
- data/lib/llvm/transforms/ipo_ffi.rb +122 -0
- data/lib/llvm/transforms/scalar.rb +22 -46
- data/lib/llvm/transforms/scalar_ffi.rb +250 -0
- data/lib/llvm/version.rb +1 -1
- data/test/conversions_test.rb +6 -0
- data/test/equality_test.rb +2 -2
- data/test/struct_test.rb +11 -2
- metadata +97 -83
@@ -0,0 +1,4712 @@
|
|
1
|
+
# Generated by ffi_gen. Please do not change this file by hand.
|
2
|
+
|
3
|
+
require 'ffi'
|
4
|
+
|
5
|
+
module LLVM::C
|
6
|
+
extend FFI::Library
|
7
|
+
ffi_lib 'LLVM-3.0'
|
8
|
+
|
9
|
+
# The top-level container for all LLVM global data. See the LLVMContext class.
|
10
|
+
#
|
11
|
+
# = Fields:
|
12
|
+
#
|
13
|
+
class OpaqueContext < FFI::Struct
|
14
|
+
end
|
15
|
+
|
16
|
+
# The top-level container for all other LLVM Intermediate Representation (IR)
|
17
|
+
# objects. See the llvm::Module class.
|
18
|
+
#
|
19
|
+
# = Fields:
|
20
|
+
#
|
21
|
+
class OpaqueModule < FFI::Struct
|
22
|
+
end
|
23
|
+
|
24
|
+
# Each value in the LLVM IR has a type, an LLVMTypeRef. See the llvm::Type
|
25
|
+
# class.
|
26
|
+
#
|
27
|
+
# = Fields:
|
28
|
+
#
|
29
|
+
class OpaqueType < FFI::Struct
|
30
|
+
end
|
31
|
+
|
32
|
+
# (Not documented)
|
33
|
+
#
|
34
|
+
# = Fields:
|
35
|
+
#
|
36
|
+
class OpaqueValue < FFI::Struct
|
37
|
+
end
|
38
|
+
|
39
|
+
# (Not documented)
|
40
|
+
#
|
41
|
+
# = Fields:
|
42
|
+
#
|
43
|
+
class OpaqueBasicBlock < FFI::Struct
|
44
|
+
end
|
45
|
+
|
46
|
+
# (Not documented)
|
47
|
+
#
|
48
|
+
# = Fields:
|
49
|
+
#
|
50
|
+
class OpaqueBuilder < FFI::Struct
|
51
|
+
end
|
52
|
+
|
53
|
+
# Interface used to provide a module to JIT or interpreter. This is now just a
|
54
|
+
# synonym for llvm::Module, but we have to keep using the different type to
|
55
|
+
# keep binary compatibility.
|
56
|
+
#
|
57
|
+
# = Fields:
|
58
|
+
#
|
59
|
+
class OpaqueModuleProvider < FFI::Struct
|
60
|
+
end
|
61
|
+
|
62
|
+
# Used to provide a module to JIT or interpreter.
|
63
|
+
# See the llvm::MemoryBuffer class.
|
64
|
+
#
|
65
|
+
# = Fields:
|
66
|
+
#
|
67
|
+
class OpaqueMemoryBuffer < FFI::Struct
|
68
|
+
end
|
69
|
+
|
70
|
+
# See the llvm::PassManagerBase class.
|
71
|
+
#
|
72
|
+
# = Fields:
|
73
|
+
#
|
74
|
+
class OpaquePassManager < FFI::Struct
|
75
|
+
end
|
76
|
+
|
77
|
+
# See the llvm::PassRegistry class.
|
78
|
+
#
|
79
|
+
# = Fields:
|
80
|
+
#
|
81
|
+
class OpaquePassRegistry < FFI::Struct
|
82
|
+
end
|
83
|
+
|
84
|
+
# Used to get the users and usees of a Value. See the llvm::Use class.
|
85
|
+
#
|
86
|
+
# = Fields:
|
87
|
+
#
|
88
|
+
class OpaqueUse < FFI::Struct
|
89
|
+
end
|
90
|
+
|
91
|
+
# (Not documented)
|
92
|
+
#
|
93
|
+
# === Options:
|
94
|
+
#
|
95
|
+
# @return [Array<Symbol>]
|
96
|
+
def self.attribute_enum
|
97
|
+
[]
|
98
|
+
end
|
99
|
+
enum :attribute, [
|
100
|
+
|
101
|
+
]
|
102
|
+
|
103
|
+
# (Not documented)
|
104
|
+
#
|
105
|
+
# === Options:
|
106
|
+
# :ret ::
|
107
|
+
# Terminator Instructions
|
108
|
+
# :br ::
|
109
|
+
#
|
110
|
+
# :switch ::
|
111
|
+
#
|
112
|
+
# :indirect_br ::
|
113
|
+
#
|
114
|
+
# :invoke ::
|
115
|
+
#
|
116
|
+
# :unreachable ::
|
117
|
+
# removed 6 due to API changes
|
118
|
+
# :add ::
|
119
|
+
# Standard Binary Operators
|
120
|
+
# :f_add ::
|
121
|
+
#
|
122
|
+
# :sub ::
|
123
|
+
#
|
124
|
+
# :f_sub ::
|
125
|
+
#
|
126
|
+
# :mul ::
|
127
|
+
#
|
128
|
+
# :f_mul ::
|
129
|
+
#
|
130
|
+
# :u_div ::
|
131
|
+
#
|
132
|
+
# :s_div ::
|
133
|
+
#
|
134
|
+
# :f_div ::
|
135
|
+
#
|
136
|
+
# :u_rem ::
|
137
|
+
#
|
138
|
+
# :s_rem ::
|
139
|
+
#
|
140
|
+
# :f_rem ::
|
141
|
+
#
|
142
|
+
# :shl ::
|
143
|
+
# Logical Operators
|
144
|
+
# :l_shr ::
|
145
|
+
#
|
146
|
+
# :a_shr ::
|
147
|
+
#
|
148
|
+
# :and ::
|
149
|
+
#
|
150
|
+
# :or ::
|
151
|
+
#
|
152
|
+
# :xor ::
|
153
|
+
#
|
154
|
+
# :alloca ::
|
155
|
+
# Memory Operators
|
156
|
+
# :load ::
|
157
|
+
#
|
158
|
+
# :store ::
|
159
|
+
#
|
160
|
+
# :get_element_ptr ::
|
161
|
+
#
|
162
|
+
# :trunc ::
|
163
|
+
# Cast Operators
|
164
|
+
# :z_ext ::
|
165
|
+
#
|
166
|
+
# :s_ext ::
|
167
|
+
#
|
168
|
+
# :fp_to_ui ::
|
169
|
+
#
|
170
|
+
# :fp_to_si ::
|
171
|
+
#
|
172
|
+
# :ui_to_fp ::
|
173
|
+
#
|
174
|
+
# :si_to_fp ::
|
175
|
+
#
|
176
|
+
# :fp_trunc ::
|
177
|
+
#
|
178
|
+
# :fp_ext ::
|
179
|
+
#
|
180
|
+
# :ptr_to_int ::
|
181
|
+
#
|
182
|
+
# :int_to_ptr ::
|
183
|
+
#
|
184
|
+
# :bit_cast ::
|
185
|
+
#
|
186
|
+
# :i_cmp ::
|
187
|
+
# Other Operators
|
188
|
+
# :f_cmp ::
|
189
|
+
#
|
190
|
+
# :phi ::
|
191
|
+
#
|
192
|
+
# :call ::
|
193
|
+
#
|
194
|
+
# :select ::
|
195
|
+
#
|
196
|
+
# :user_op1 ::
|
197
|
+
#
|
198
|
+
# :user_op2 ::
|
199
|
+
#
|
200
|
+
# :va_arg ::
|
201
|
+
#
|
202
|
+
# :extract_element ::
|
203
|
+
#
|
204
|
+
# :insert_element ::
|
205
|
+
#
|
206
|
+
# :shuffle_vector ::
|
207
|
+
#
|
208
|
+
# :extract_value ::
|
209
|
+
#
|
210
|
+
# :insert_value ::
|
211
|
+
#
|
212
|
+
# :fence ::
|
213
|
+
# Atomic operators
|
214
|
+
# :atomic_cmp_xchg ::
|
215
|
+
#
|
216
|
+
# :atomic_rmw ::
|
217
|
+
#
|
218
|
+
# :resume ::
|
219
|
+
# Exception Handling Operators
|
220
|
+
# :landing_pad ::
|
221
|
+
#
|
222
|
+
# :unwind ::
|
223
|
+
#
|
224
|
+
#
|
225
|
+
# @return [Array<Symbol>]
|
226
|
+
def self.opcode_enum
|
227
|
+
[:ret, :br, :switch, :indirect_br, :invoke, :unreachable, :add, :f_add, :sub, :f_sub, :mul, :f_mul, :u_div, :s_div, :f_div, :u_rem, :s_rem, :f_rem, :shl, :l_shr, :a_shr, :and, :or, :xor, :alloca, :load, :store, :get_element_ptr, :trunc, :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, :i_cmp, :f_cmp, :phi, :call, :select, :user_op1, :user_op2, :va_arg, :extract_element, :insert_element, :shuffle_vector, :extract_value, :insert_value, :fence, :atomic_cmp_xchg, :atomic_rmw, :resume, :landing_pad, :unwind]
|
228
|
+
end
|
229
|
+
enum :opcode, [
|
230
|
+
:ret, 1,
|
231
|
+
:br, 2,
|
232
|
+
:switch, 3,
|
233
|
+
:indirect_br, 4,
|
234
|
+
:invoke, 5,
|
235
|
+
:unreachable, 7,
|
236
|
+
:add, 8,
|
237
|
+
:f_add, 9,
|
238
|
+
:sub, 10,
|
239
|
+
:f_sub, 11,
|
240
|
+
:mul, 12,
|
241
|
+
:f_mul, 13,
|
242
|
+
:u_div, 14,
|
243
|
+
:s_div, 15,
|
244
|
+
:f_div, 16,
|
245
|
+
:u_rem, 17,
|
246
|
+
:s_rem, 18,
|
247
|
+
:f_rem, 19,
|
248
|
+
:shl, 20,
|
249
|
+
:l_shr, 21,
|
250
|
+
:a_shr, 22,
|
251
|
+
:and, 23,
|
252
|
+
:or, 24,
|
253
|
+
:xor, 25,
|
254
|
+
:alloca, 26,
|
255
|
+
:load, 27,
|
256
|
+
:store, 28,
|
257
|
+
:get_element_ptr, 29,
|
258
|
+
:trunc, 30,
|
259
|
+
:z_ext, 31,
|
260
|
+
:s_ext, 32,
|
261
|
+
:fp_to_ui, 33,
|
262
|
+
:fp_to_si, 34,
|
263
|
+
:ui_to_fp, 35,
|
264
|
+
:si_to_fp, 36,
|
265
|
+
:fp_trunc, 37,
|
266
|
+
:fp_ext, 38,
|
267
|
+
:ptr_to_int, 39,
|
268
|
+
:int_to_ptr, 40,
|
269
|
+
:bit_cast, 41,
|
270
|
+
:i_cmp, 42,
|
271
|
+
:f_cmp, 43,
|
272
|
+
:phi, 44,
|
273
|
+
:call, 45,
|
274
|
+
:select, 46,
|
275
|
+
:user_op1, 47,
|
276
|
+
:user_op2, 48,
|
277
|
+
:va_arg, 49,
|
278
|
+
:extract_element, 50,
|
279
|
+
:insert_element, 51,
|
280
|
+
:shuffle_vector, 52,
|
281
|
+
:extract_value, 53,
|
282
|
+
:insert_value, 54,
|
283
|
+
:fence, 55,
|
284
|
+
:atomic_cmp_xchg, 56,
|
285
|
+
:atomic_rmw, 57,
|
286
|
+
:resume, 58,
|
287
|
+
:landing_pad, 59,
|
288
|
+
:unwind, 60
|
289
|
+
]
|
290
|
+
|
291
|
+
# (Not documented)
|
292
|
+
#
|
293
|
+
# === Options:
|
294
|
+
# :void ::
|
295
|
+
#
|
296
|
+
# :float ::
|
297
|
+
# < type with no size
|
298
|
+
# :double ::
|
299
|
+
# < 32 bit floating point type
|
300
|
+
# :x86_fp80 ::
|
301
|
+
# < 64 bit floating point type
|
302
|
+
# :fp128 ::
|
303
|
+
# < 80 bit floating point type (X87)
|
304
|
+
# :ppc_fp128 ::
|
305
|
+
# < 128 bit floating point type (112-bit mantissa)
|
306
|
+
# :label ::
|
307
|
+
# < 128 bit floating point type (two 64-bits)
|
308
|
+
# :integer ::
|
309
|
+
# < Labels
|
310
|
+
# :function ::
|
311
|
+
# < Arbitrary bit width integers
|
312
|
+
# :struct ::
|
313
|
+
# < Functions
|
314
|
+
# :array ::
|
315
|
+
# < Structures
|
316
|
+
# :pointer ::
|
317
|
+
# < Arrays
|
318
|
+
# :vector ::
|
319
|
+
# < Pointers
|
320
|
+
# :metadata ::
|
321
|
+
# < SIMD 'packed' format, or other vector type
|
322
|
+
# :x86_mmx ::
|
323
|
+
# < Metadata
|
324
|
+
#
|
325
|
+
# @return [Array<Symbol>]
|
326
|
+
def self.type_kind_enum
|
327
|
+
[:void, :float, :double, :x86_fp80, :fp128, :ppc_fp128, :label, :integer, :function, :struct, :array, :pointer, :vector, :metadata, :x86_mmx]
|
328
|
+
end
|
329
|
+
enum :type_kind, [
|
330
|
+
:void,
|
331
|
+
:float,
|
332
|
+
:double,
|
333
|
+
:x86_fp80,
|
334
|
+
:fp128,
|
335
|
+
:ppc_fp128,
|
336
|
+
:label,
|
337
|
+
:integer,
|
338
|
+
:function,
|
339
|
+
:struct,
|
340
|
+
:array,
|
341
|
+
:pointer,
|
342
|
+
:vector,
|
343
|
+
:metadata,
|
344
|
+
:x86_mmx
|
345
|
+
]
|
346
|
+
|
347
|
+
# (Not documented)
|
348
|
+
#
|
349
|
+
# === Options:
|
350
|
+
# :external ::
|
351
|
+
#
|
352
|
+
# :available_externally ::
|
353
|
+
# < Externally visible function
|
354
|
+
# :link_once_any ::
|
355
|
+
#
|
356
|
+
# :link_once_odr ::
|
357
|
+
# < Keep one copy of function when linking (inline)
|
358
|
+
# :weak_any ::
|
359
|
+
# < Same, but only replaced by something
|
360
|
+
# equivalent.
|
361
|
+
# :weak_odr ::
|
362
|
+
# < Keep one copy of function when linking (weak)
|
363
|
+
# :appending ::
|
364
|
+
# < Same, but only replaced by something
|
365
|
+
# equivalent.
|
366
|
+
# :internal ::
|
367
|
+
# < Special purpose, only applies to global arrays
|
368
|
+
# :private ::
|
369
|
+
# < Rename collisions when linking (static
|
370
|
+
# functions)
|
371
|
+
# :dll_import ::
|
372
|
+
# < Like Internal, but omit from symbol table
|
373
|
+
# :dll_export ::
|
374
|
+
# < Function to be imported from DLL
|
375
|
+
# :external_weak ::
|
376
|
+
# < Function to be accessible from DLL
|
377
|
+
# :ghost ::
|
378
|
+
# < ExternalWeak linkage description
|
379
|
+
# :common ::
|
380
|
+
# < Obsolete
|
381
|
+
# :linker_private ::
|
382
|
+
# < Tentative definitions
|
383
|
+
# :linker_private_weak ::
|
384
|
+
# < Like Private, but linker removes.
|
385
|
+
# :linker_private_weak_def_auto ::
|
386
|
+
# < Like LinkerPrivate, but is weak.
|
387
|
+
#
|
388
|
+
# @return [Array<Symbol>]
|
389
|
+
def self.linkage_enum
|
390
|
+
[:external, :available_externally, :link_once_any, :link_once_odr, :weak_any, :weak_odr, :appending, :internal, :private, :dll_import, :dll_export, :external_weak, :ghost, :common, :linker_private, :linker_private_weak, :linker_private_weak_def_auto]
|
391
|
+
end
|
392
|
+
enum :linkage, [
|
393
|
+
:external,
|
394
|
+
:available_externally,
|
395
|
+
:link_once_any,
|
396
|
+
:link_once_odr,
|
397
|
+
:weak_any,
|
398
|
+
:weak_odr,
|
399
|
+
:appending,
|
400
|
+
:internal,
|
401
|
+
:private,
|
402
|
+
:dll_import,
|
403
|
+
:dll_export,
|
404
|
+
:external_weak,
|
405
|
+
:ghost,
|
406
|
+
:common,
|
407
|
+
:linker_private,
|
408
|
+
:linker_private_weak,
|
409
|
+
:linker_private_weak_def_auto
|
410
|
+
]
|
411
|
+
|
412
|
+
# (Not documented)
|
413
|
+
#
|
414
|
+
# === Options:
|
415
|
+
# :default ::
|
416
|
+
#
|
417
|
+
# :hidden ::
|
418
|
+
# < The GV is visible
|
419
|
+
# :protected ::
|
420
|
+
# < The GV is hidden
|
421
|
+
#
|
422
|
+
# @return [Array<Symbol>]
|
423
|
+
def self.visibility_enum
|
424
|
+
[:default, :hidden, :protected]
|
425
|
+
end
|
426
|
+
enum :visibility, [
|
427
|
+
:default,
|
428
|
+
:hidden,
|
429
|
+
:protected
|
430
|
+
]
|
431
|
+
|
432
|
+
# (Not documented)
|
433
|
+
#
|
434
|
+
# === Options:
|
435
|
+
# :c ::
|
436
|
+
#
|
437
|
+
# :fast ::
|
438
|
+
#
|
439
|
+
# :cold ::
|
440
|
+
#
|
441
|
+
# :x86_stdcall ::
|
442
|
+
#
|
443
|
+
# :x86_fastcall ::
|
444
|
+
#
|
445
|
+
#
|
446
|
+
# @return [Array<Symbol>]
|
447
|
+
def self.call_conv_enum
|
448
|
+
[:c, :fast, :cold, :x86_stdcall, :x86_fastcall]
|
449
|
+
end
|
450
|
+
enum :call_conv, [
|
451
|
+
:c, 0,
|
452
|
+
:fast, 8,
|
453
|
+
:cold, 9,
|
454
|
+
:x86_stdcall, 64,
|
455
|
+
:x86_fastcall, 65
|
456
|
+
]
|
457
|
+
|
458
|
+
# (Not documented)
|
459
|
+
#
|
460
|
+
# === Options:
|
461
|
+
# :eq ::
|
462
|
+
#
|
463
|
+
# :ne ::
|
464
|
+
# < equal
|
465
|
+
# :ugt ::
|
466
|
+
# < not equal
|
467
|
+
# :uge ::
|
468
|
+
# < unsigned greater than
|
469
|
+
# :ult ::
|
470
|
+
# < unsigned greater or equal
|
471
|
+
# :ule ::
|
472
|
+
# < unsigned less than
|
473
|
+
# :sgt ::
|
474
|
+
# < unsigned less or equal
|
475
|
+
# :sge ::
|
476
|
+
# < signed greater than
|
477
|
+
# :slt ::
|
478
|
+
# < signed greater or equal
|
479
|
+
# :sle ::
|
480
|
+
# < signed less than
|
481
|
+
#
|
482
|
+
# @return [Array<Symbol>]
|
483
|
+
def self.int_predicate_enum
|
484
|
+
[:eq, :ne, :ugt, :uge, :ult, :ule, :sgt, :sge, :slt, :sle]
|
485
|
+
end
|
486
|
+
enum :int_predicate, [
|
487
|
+
:eq, 32,
|
488
|
+
:ne,
|
489
|
+
:ugt,
|
490
|
+
:uge,
|
491
|
+
:ult,
|
492
|
+
:ule,
|
493
|
+
:sgt,
|
494
|
+
:sge,
|
495
|
+
:slt,
|
496
|
+
:sle
|
497
|
+
]
|
498
|
+
|
499
|
+
# (Not documented)
|
500
|
+
#
|
501
|
+
# === Options:
|
502
|
+
# :predicate_false ::
|
503
|
+
#
|
504
|
+
# :oeq ::
|
505
|
+
# < Always false (always folded)
|
506
|
+
# :ogt ::
|
507
|
+
# < True if ordered and equal
|
508
|
+
# :oge ::
|
509
|
+
# < True if ordered and greater than
|
510
|
+
# :olt ::
|
511
|
+
# < True if ordered and greater than or equal
|
512
|
+
# :ole ::
|
513
|
+
# < True if ordered and less than
|
514
|
+
# :one ::
|
515
|
+
# < True if ordered and less than or equal
|
516
|
+
# :ord ::
|
517
|
+
# < True if ordered and operands are unequal
|
518
|
+
# :uno ::
|
519
|
+
# < True if ordered (no nans)
|
520
|
+
# :ueq ::
|
521
|
+
# < True if unordered: isnan(X) | isnan(Y)
|
522
|
+
# :ugt ::
|
523
|
+
# < True if unordered or equal
|
524
|
+
# :uge ::
|
525
|
+
# < True if unordered or greater than
|
526
|
+
# :ult ::
|
527
|
+
# < True if unordered, greater than, or equal
|
528
|
+
# :ule ::
|
529
|
+
# < True if unordered or less than
|
530
|
+
# :une ::
|
531
|
+
# < True if unordered, less than, or equal
|
532
|
+
# :predicate_true ::
|
533
|
+
# < True if unordered or not equal
|
534
|
+
#
|
535
|
+
# @return [Array<Symbol>]
|
536
|
+
def self.real_predicate_enum
|
537
|
+
[:predicate_false, :oeq, :ogt, :oge, :olt, :ole, :one, :ord, :uno, :ueq, :ugt, :uge, :ult, :ule, :une, :predicate_true]
|
538
|
+
end
|
539
|
+
enum :real_predicate, [
|
540
|
+
:predicate_false,
|
541
|
+
:oeq,
|
542
|
+
:ogt,
|
543
|
+
:oge,
|
544
|
+
:olt,
|
545
|
+
:ole,
|
546
|
+
:one,
|
547
|
+
:ord,
|
548
|
+
:uno,
|
549
|
+
:ueq,
|
550
|
+
:ugt,
|
551
|
+
:uge,
|
552
|
+
:ult,
|
553
|
+
:ule,
|
554
|
+
:une,
|
555
|
+
:predicate_true
|
556
|
+
]
|
557
|
+
|
558
|
+
# (Not documented)
|
559
|
+
#
|
560
|
+
# === Options:
|
561
|
+
# :catch ::
|
562
|
+
#
|
563
|
+
# :filter ::
|
564
|
+
# < A catch clause
|
565
|
+
#
|
566
|
+
# @return [Array<Symbol>]
|
567
|
+
def self.landing_pad_clause_ty_enum
|
568
|
+
[:catch, :filter]
|
569
|
+
end
|
570
|
+
enum :landing_pad_clause_ty, [
|
571
|
+
:catch,
|
572
|
+
:filter
|
573
|
+
]
|
574
|
+
|
575
|
+
# (Not documented)
|
576
|
+
#
|
577
|
+
# @method initialize_core(r)
|
578
|
+
# @param [FFI::Pointer(PassRegistryRef)] r
|
579
|
+
# @return [nil]
|
580
|
+
# @scope class
|
581
|
+
attach_function :initialize_core, :LLVMInitializeCore, [:pointer], :void
|
582
|
+
|
583
|
+
# ===-- Error handling ----------------------------------------------------===
|
584
|
+
#
|
585
|
+
# @method dispose_message(message)
|
586
|
+
# @param [String] message
|
587
|
+
# @return [nil]
|
588
|
+
# @scope class
|
589
|
+
attach_function :dispose_message, :LLVMDisposeMessage, [:string], :void
|
590
|
+
|
591
|
+
# Create and destroy contexts.
|
592
|
+
#
|
593
|
+
# @method context_create()
|
594
|
+
# @return [FFI::Pointer(ContextRef)]
|
595
|
+
# @scope class
|
596
|
+
attach_function :context_create, :LLVMContextCreate, [], :pointer
|
597
|
+
|
598
|
+
# (Not documented)
|
599
|
+
#
|
600
|
+
# @method get_global_context()
|
601
|
+
# @return [FFI::Pointer(ContextRef)]
|
602
|
+
# @scope class
|
603
|
+
attach_function :get_global_context, :LLVMGetGlobalContext, [], :pointer
|
604
|
+
|
605
|
+
# (Not documented)
|
606
|
+
#
|
607
|
+
# @method context_dispose(c)
|
608
|
+
# @param [FFI::Pointer(ContextRef)] c
|
609
|
+
# @return [nil]
|
610
|
+
# @scope class
|
611
|
+
attach_function :context_dispose, :LLVMContextDispose, [:pointer], :void
|
612
|
+
|
613
|
+
# (Not documented)
|
614
|
+
#
|
615
|
+
# @method get_md_kind_id_in_context(c, name, s_len)
|
616
|
+
# @param [FFI::Pointer(ContextRef)] c
|
617
|
+
# @param [String] name
|
618
|
+
# @param [Integer] s_len
|
619
|
+
# @return [Integer]
|
620
|
+
# @scope class
|
621
|
+
attach_function :get_md_kind_id_in_context, :LLVMGetMDKindIDInContext, [:pointer, :string, :uint], :uint
|
622
|
+
|
623
|
+
# (Not documented)
|
624
|
+
#
|
625
|
+
# @method get_md_kind_id(name, s_len)
|
626
|
+
# @param [String] name
|
627
|
+
# @param [Integer] s_len
|
628
|
+
# @return [Integer]
|
629
|
+
# @scope class
|
630
|
+
attach_function :get_md_kind_id, :LLVMGetMDKindID, [:string, :uint], :uint
|
631
|
+
|
632
|
+
# See llvm::Module::Module.
|
633
|
+
#
|
634
|
+
# @method module_create_with_name(module_id)
|
635
|
+
# @param [String] module_id
|
636
|
+
# @return [FFI::Pointer(ModuleRef)]
|
637
|
+
# @scope class
|
638
|
+
attach_function :module_create_with_name, :LLVMModuleCreateWithName, [:string], :pointer
|
639
|
+
|
640
|
+
# (Not documented)
|
641
|
+
#
|
642
|
+
# @method module_create_with_name_in_context(module_id, c)
|
643
|
+
# @param [String] module_id
|
644
|
+
# @param [FFI::Pointer(ContextRef)] c
|
645
|
+
# @return [FFI::Pointer(ModuleRef)]
|
646
|
+
# @scope class
|
647
|
+
attach_function :module_create_with_name_in_context, :LLVMModuleCreateWithNameInContext, [:string, :pointer], :pointer
|
648
|
+
|
649
|
+
# See llvm::Module::~Module.
|
650
|
+
#
|
651
|
+
# @method dispose_module(m)
|
652
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
653
|
+
# @return [nil]
|
654
|
+
# @scope class
|
655
|
+
attach_function :dispose_module, :LLVMDisposeModule, [:pointer], :void
|
656
|
+
|
657
|
+
# Data layout. See Module::getDataLayout.
|
658
|
+
#
|
659
|
+
# @method get_data_layout(m)
|
660
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
661
|
+
# @return [String]
|
662
|
+
# @scope class
|
663
|
+
attach_function :get_data_layout, :LLVMGetDataLayout, [:pointer], :string
|
664
|
+
|
665
|
+
# (Not documented)
|
666
|
+
#
|
667
|
+
# @method set_data_layout(m, triple)
|
668
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
669
|
+
# @param [String] triple
|
670
|
+
# @return [nil]
|
671
|
+
# @scope class
|
672
|
+
attach_function :set_data_layout, :LLVMSetDataLayout, [:pointer, :string], :void
|
673
|
+
|
674
|
+
# Target triple. See Module::getTargetTriple.
|
675
|
+
#
|
676
|
+
# @method get_target(m)
|
677
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
678
|
+
# @return [String]
|
679
|
+
# @scope class
|
680
|
+
attach_function :get_target, :LLVMGetTarget, [:pointer], :string
|
681
|
+
|
682
|
+
# (Not documented)
|
683
|
+
#
|
684
|
+
# @method set_target(m, triple)
|
685
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
686
|
+
# @param [String] triple
|
687
|
+
# @return [nil]
|
688
|
+
# @scope class
|
689
|
+
attach_function :set_target, :LLVMSetTarget, [:pointer, :string], :void
|
690
|
+
|
691
|
+
# See Module::dump.
|
692
|
+
#
|
693
|
+
# @method dump_module(m)
|
694
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
695
|
+
# @return [nil]
|
696
|
+
# @scope class
|
697
|
+
attach_function :dump_module, :LLVMDumpModule, [:pointer], :void
|
698
|
+
|
699
|
+
# See Module::setModuleInlineAsm.
|
700
|
+
#
|
701
|
+
# @method set_module_inline_asm(m, asm)
|
702
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
703
|
+
# @param [String] asm
|
704
|
+
# @return [nil]
|
705
|
+
# @scope class
|
706
|
+
attach_function :set_module_inline_asm, :LLVMSetModuleInlineAsm, [:pointer, :string], :void
|
707
|
+
|
708
|
+
# See Module::getContext.
|
709
|
+
#
|
710
|
+
# @method get_module_context(m)
|
711
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
712
|
+
# @return [FFI::Pointer(ContextRef)]
|
713
|
+
# @scope class
|
714
|
+
attach_function :get_module_context, :LLVMGetModuleContext, [:pointer], :pointer
|
715
|
+
|
716
|
+
# See llvm::LLVMTypeKind::getTypeID.
|
717
|
+
#
|
718
|
+
# @method get_type_kind(ty)
|
719
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
720
|
+
# @return [Symbol from type_kind_enum]
|
721
|
+
# @scope class
|
722
|
+
attach_function :get_type_kind, :LLVMGetTypeKind, [:pointer], :type_kind
|
723
|
+
|
724
|
+
# (Not documented)
|
725
|
+
#
|
726
|
+
# @method type_is_sized(ty)
|
727
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
728
|
+
# @return [Integer]
|
729
|
+
# @scope class
|
730
|
+
attach_function :type_is_sized, :LLVMTypeIsSized, [:pointer], :int
|
731
|
+
|
732
|
+
# See llvm::LLVMType::getContext.
|
733
|
+
#
|
734
|
+
# @method get_type_context(ty)
|
735
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
736
|
+
# @return [FFI::Pointer(ContextRef)]
|
737
|
+
# @scope class
|
738
|
+
attach_function :get_type_context, :LLVMGetTypeContext, [:pointer], :pointer
|
739
|
+
|
740
|
+
# Operations on integer types
|
741
|
+
#
|
742
|
+
# @method int1_type_in_context(c)
|
743
|
+
# @param [FFI::Pointer(ContextRef)] c
|
744
|
+
# @return [FFI::Pointer(TypeRef)]
|
745
|
+
# @scope class
|
746
|
+
attach_function :int1_type_in_context, :LLVMInt1TypeInContext, [:pointer], :pointer
|
747
|
+
|
748
|
+
# (Not documented)
|
749
|
+
#
|
750
|
+
# @method int8_type_in_context(c)
|
751
|
+
# @param [FFI::Pointer(ContextRef)] c
|
752
|
+
# @return [FFI::Pointer(TypeRef)]
|
753
|
+
# @scope class
|
754
|
+
attach_function :int8_type_in_context, :LLVMInt8TypeInContext, [:pointer], :pointer
|
755
|
+
|
756
|
+
# (Not documented)
|
757
|
+
#
|
758
|
+
# @method int16_type_in_context(c)
|
759
|
+
# @param [FFI::Pointer(ContextRef)] c
|
760
|
+
# @return [FFI::Pointer(TypeRef)]
|
761
|
+
# @scope class
|
762
|
+
attach_function :int16_type_in_context, :LLVMInt16TypeInContext, [:pointer], :pointer
|
763
|
+
|
764
|
+
# (Not documented)
|
765
|
+
#
|
766
|
+
# @method int32_type_in_context(c)
|
767
|
+
# @param [FFI::Pointer(ContextRef)] c
|
768
|
+
# @return [FFI::Pointer(TypeRef)]
|
769
|
+
# @scope class
|
770
|
+
attach_function :int32_type_in_context, :LLVMInt32TypeInContext, [:pointer], :pointer
|
771
|
+
|
772
|
+
# (Not documented)
|
773
|
+
#
|
774
|
+
# @method int64_type_in_context(c)
|
775
|
+
# @param [FFI::Pointer(ContextRef)] c
|
776
|
+
# @return [FFI::Pointer(TypeRef)]
|
777
|
+
# @scope class
|
778
|
+
attach_function :int64_type_in_context, :LLVMInt64TypeInContext, [:pointer], :pointer
|
779
|
+
|
780
|
+
# (Not documented)
|
781
|
+
#
|
782
|
+
# @method int_type_in_context(c, num_bits)
|
783
|
+
# @param [FFI::Pointer(ContextRef)] c
|
784
|
+
# @param [Integer] num_bits
|
785
|
+
# @return [FFI::Pointer(TypeRef)]
|
786
|
+
# @scope class
|
787
|
+
attach_function :int_type_in_context, :LLVMIntTypeInContext, [:pointer, :uint], :pointer
|
788
|
+
|
789
|
+
# (Not documented)
|
790
|
+
#
|
791
|
+
# @method int1_type()
|
792
|
+
# @return [FFI::Pointer(TypeRef)]
|
793
|
+
# @scope class
|
794
|
+
attach_function :int1_type, :LLVMInt1Type, [], :pointer
|
795
|
+
|
796
|
+
# (Not documented)
|
797
|
+
#
|
798
|
+
# @method int8_type()
|
799
|
+
# @return [FFI::Pointer(TypeRef)]
|
800
|
+
# @scope class
|
801
|
+
attach_function :int8_type, :LLVMInt8Type, [], :pointer
|
802
|
+
|
803
|
+
# (Not documented)
|
804
|
+
#
|
805
|
+
# @method int16_type()
|
806
|
+
# @return [FFI::Pointer(TypeRef)]
|
807
|
+
# @scope class
|
808
|
+
attach_function :int16_type, :LLVMInt16Type, [], :pointer
|
809
|
+
|
810
|
+
# (Not documented)
|
811
|
+
#
|
812
|
+
# @method int32_type()
|
813
|
+
# @return [FFI::Pointer(TypeRef)]
|
814
|
+
# @scope class
|
815
|
+
attach_function :int32_type, :LLVMInt32Type, [], :pointer
|
816
|
+
|
817
|
+
# (Not documented)
|
818
|
+
#
|
819
|
+
# @method int64_type()
|
820
|
+
# @return [FFI::Pointer(TypeRef)]
|
821
|
+
# @scope class
|
822
|
+
attach_function :int64_type, :LLVMInt64Type, [], :pointer
|
823
|
+
|
824
|
+
# (Not documented)
|
825
|
+
#
|
826
|
+
# @method int_type(num_bits)
|
827
|
+
# @param [Integer] num_bits
|
828
|
+
# @return [FFI::Pointer(TypeRef)]
|
829
|
+
# @scope class
|
830
|
+
attach_function :int_type, :LLVMIntType, [:uint], :pointer
|
831
|
+
|
832
|
+
# (Not documented)
|
833
|
+
#
|
834
|
+
# @method get_int_type_width(integer_ty)
|
835
|
+
# @param [FFI::Pointer(TypeRef)] integer_ty
|
836
|
+
# @return [Integer]
|
837
|
+
# @scope class
|
838
|
+
attach_function :get_int_type_width, :LLVMGetIntTypeWidth, [:pointer], :uint
|
839
|
+
|
840
|
+
# Operations on real types
|
841
|
+
#
|
842
|
+
# @method float_type_in_context(c)
|
843
|
+
# @param [FFI::Pointer(ContextRef)] c
|
844
|
+
# @return [FFI::Pointer(TypeRef)]
|
845
|
+
# @scope class
|
846
|
+
attach_function :float_type_in_context, :LLVMFloatTypeInContext, [:pointer], :pointer
|
847
|
+
|
848
|
+
# (Not documented)
|
849
|
+
#
|
850
|
+
# @method double_type_in_context(c)
|
851
|
+
# @param [FFI::Pointer(ContextRef)] c
|
852
|
+
# @return [FFI::Pointer(TypeRef)]
|
853
|
+
# @scope class
|
854
|
+
attach_function :double_type_in_context, :LLVMDoubleTypeInContext, [:pointer], :pointer
|
855
|
+
|
856
|
+
# (Not documented)
|
857
|
+
#
|
858
|
+
# @method x86fp80_type_in_context(c)
|
859
|
+
# @param [FFI::Pointer(ContextRef)] c
|
860
|
+
# @return [FFI::Pointer(TypeRef)]
|
861
|
+
# @scope class
|
862
|
+
attach_function :x86fp80_type_in_context, :LLVMX86FP80TypeInContext, [:pointer], :pointer
|
863
|
+
|
864
|
+
# (Not documented)
|
865
|
+
#
|
866
|
+
# @method fp128_type_in_context(c)
|
867
|
+
# @param [FFI::Pointer(ContextRef)] c
|
868
|
+
# @return [FFI::Pointer(TypeRef)]
|
869
|
+
# @scope class
|
870
|
+
attach_function :fp128_type_in_context, :LLVMFP128TypeInContext, [:pointer], :pointer
|
871
|
+
|
872
|
+
# (Not documented)
|
873
|
+
#
|
874
|
+
# @method ppcfp128_type_in_context(c)
|
875
|
+
# @param [FFI::Pointer(ContextRef)] c
|
876
|
+
# @return [FFI::Pointer(TypeRef)]
|
877
|
+
# @scope class
|
878
|
+
attach_function :ppcfp128_type_in_context, :LLVMPPCFP128TypeInContext, [:pointer], :pointer
|
879
|
+
|
880
|
+
# (Not documented)
|
881
|
+
#
|
882
|
+
# @method float_type()
|
883
|
+
# @return [FFI::Pointer(TypeRef)]
|
884
|
+
# @scope class
|
885
|
+
attach_function :float_type, :LLVMFloatType, [], :pointer
|
886
|
+
|
887
|
+
# (Not documented)
|
888
|
+
#
|
889
|
+
# @method double_type()
|
890
|
+
# @return [FFI::Pointer(TypeRef)]
|
891
|
+
# @scope class
|
892
|
+
attach_function :double_type, :LLVMDoubleType, [], :pointer
|
893
|
+
|
894
|
+
# (Not documented)
|
895
|
+
#
|
896
|
+
# @method x86fp80_type()
|
897
|
+
# @return [FFI::Pointer(TypeRef)]
|
898
|
+
# @scope class
|
899
|
+
attach_function :x86fp80_type, :LLVMX86FP80Type, [], :pointer
|
900
|
+
|
901
|
+
# (Not documented)
|
902
|
+
#
|
903
|
+
# @method fp128_type()
|
904
|
+
# @return [FFI::Pointer(TypeRef)]
|
905
|
+
# @scope class
|
906
|
+
attach_function :fp128_type, :LLVMFP128Type, [], :pointer
|
907
|
+
|
908
|
+
# (Not documented)
|
909
|
+
#
|
910
|
+
# @method ppcfp128_type()
|
911
|
+
# @return [FFI::Pointer(TypeRef)]
|
912
|
+
# @scope class
|
913
|
+
attach_function :ppcfp128_type, :LLVMPPCFP128Type, [], :pointer
|
914
|
+
|
915
|
+
# Operations on function types
|
916
|
+
#
|
917
|
+
# @method function_type(return_type, param_types, param_count, is_var_arg)
|
918
|
+
# @param [FFI::Pointer(TypeRef)] return_type
|
919
|
+
# @param [FFI::Pointer(*TypeRef)] param_types
|
920
|
+
# @param [Integer] param_count
|
921
|
+
# @param [Integer] is_var_arg
|
922
|
+
# @return [FFI::Pointer(TypeRef)]
|
923
|
+
# @scope class
|
924
|
+
attach_function :function_type, :LLVMFunctionType, [:pointer, :pointer, :uint, :int], :pointer
|
925
|
+
|
926
|
+
# (Not documented)
|
927
|
+
#
|
928
|
+
# @method is_function_var_arg(function_ty)
|
929
|
+
# @param [FFI::Pointer(TypeRef)] function_ty
|
930
|
+
# @return [Integer]
|
931
|
+
# @scope class
|
932
|
+
attach_function :is_function_var_arg, :LLVMIsFunctionVarArg, [:pointer], :int
|
933
|
+
|
934
|
+
# (Not documented)
|
935
|
+
#
|
936
|
+
# @method get_return_type(function_ty)
|
937
|
+
# @param [FFI::Pointer(TypeRef)] function_ty
|
938
|
+
# @return [FFI::Pointer(TypeRef)]
|
939
|
+
# @scope class
|
940
|
+
attach_function :get_return_type, :LLVMGetReturnType, [:pointer], :pointer
|
941
|
+
|
942
|
+
# (Not documented)
|
943
|
+
#
|
944
|
+
# @method count_param_types(function_ty)
|
945
|
+
# @param [FFI::Pointer(TypeRef)] function_ty
|
946
|
+
# @return [Integer]
|
947
|
+
# @scope class
|
948
|
+
attach_function :count_param_types, :LLVMCountParamTypes, [:pointer], :uint
|
949
|
+
|
950
|
+
# (Not documented)
|
951
|
+
#
|
952
|
+
# @method get_param_types(function_ty, dest)
|
953
|
+
# @param [FFI::Pointer(TypeRef)] function_ty
|
954
|
+
# @param [FFI::Pointer(*TypeRef)] dest
|
955
|
+
# @return [nil]
|
956
|
+
# @scope class
|
957
|
+
attach_function :get_param_types, :LLVMGetParamTypes, [:pointer, :pointer], :void
|
958
|
+
|
959
|
+
# Operations on struct types
|
960
|
+
#
|
961
|
+
# @method struct_type_in_context(c, element_types, element_count, packed)
|
962
|
+
# @param [FFI::Pointer(ContextRef)] c
|
963
|
+
# @param [FFI::Pointer(*TypeRef)] element_types
|
964
|
+
# @param [Integer] element_count
|
965
|
+
# @param [Integer] packed
|
966
|
+
# @return [FFI::Pointer(TypeRef)]
|
967
|
+
# @scope class
|
968
|
+
attach_function :struct_type_in_context, :LLVMStructTypeInContext, [:pointer, :pointer, :uint, :int], :pointer
|
969
|
+
|
970
|
+
# (Not documented)
|
971
|
+
#
|
972
|
+
# @method struct_type(element_types, element_count, packed)
|
973
|
+
# @param [FFI::Pointer(*TypeRef)] element_types
|
974
|
+
# @param [Integer] element_count
|
975
|
+
# @param [Integer] packed
|
976
|
+
# @return [FFI::Pointer(TypeRef)]
|
977
|
+
# @scope class
|
978
|
+
attach_function :struct_type, :LLVMStructType, [:pointer, :uint, :int], :pointer
|
979
|
+
|
980
|
+
# (Not documented)
|
981
|
+
#
|
982
|
+
# @method struct_create_named(c, name)
|
983
|
+
# @param [FFI::Pointer(ContextRef)] c
|
984
|
+
# @param [String] name
|
985
|
+
# @return [FFI::Pointer(TypeRef)]
|
986
|
+
# @scope class
|
987
|
+
attach_function :struct_create_named, :LLVMStructCreateNamed, [:pointer, :string], :pointer
|
988
|
+
|
989
|
+
# (Not documented)
|
990
|
+
#
|
991
|
+
# @method get_struct_name(ty)
|
992
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
993
|
+
# @return [String]
|
994
|
+
# @scope class
|
995
|
+
attach_function :get_struct_name, :LLVMGetStructName, [:pointer], :string
|
996
|
+
|
997
|
+
# (Not documented)
|
998
|
+
#
|
999
|
+
# @method struct_set_body(struct_ty, element_types, element_count, packed)
|
1000
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
1001
|
+
# @param [FFI::Pointer(*TypeRef)] element_types
|
1002
|
+
# @param [Integer] element_count
|
1003
|
+
# @param [Integer] packed
|
1004
|
+
# @return [nil]
|
1005
|
+
# @scope class
|
1006
|
+
attach_function :struct_set_body, :LLVMStructSetBody, [:pointer, :pointer, :uint, :int], :void
|
1007
|
+
|
1008
|
+
# (Not documented)
|
1009
|
+
#
|
1010
|
+
# @method count_struct_element_types(struct_ty)
|
1011
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
1012
|
+
# @return [Integer]
|
1013
|
+
# @scope class
|
1014
|
+
attach_function :count_struct_element_types, :LLVMCountStructElementTypes, [:pointer], :uint
|
1015
|
+
|
1016
|
+
# (Not documented)
|
1017
|
+
#
|
1018
|
+
# @method get_struct_element_types(struct_ty, dest)
|
1019
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
1020
|
+
# @param [FFI::Pointer(*TypeRef)] dest
|
1021
|
+
# @return [nil]
|
1022
|
+
# @scope class
|
1023
|
+
attach_function :get_struct_element_types, :LLVMGetStructElementTypes, [:pointer, :pointer], :void
|
1024
|
+
|
1025
|
+
# (Not documented)
|
1026
|
+
#
|
1027
|
+
# @method is_packed_struct(struct_ty)
|
1028
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
1029
|
+
# @return [Integer]
|
1030
|
+
# @scope class
|
1031
|
+
attach_function :is_packed_struct, :LLVMIsPackedStruct, [:pointer], :int
|
1032
|
+
|
1033
|
+
# (Not documented)
|
1034
|
+
#
|
1035
|
+
# @method is_opaque_struct(struct_ty)
|
1036
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
1037
|
+
# @return [Integer]
|
1038
|
+
# @scope class
|
1039
|
+
attach_function :is_opaque_struct, :LLVMIsOpaqueStruct, [:pointer], :int
|
1040
|
+
|
1041
|
+
# (Not documented)
|
1042
|
+
#
|
1043
|
+
# @method get_type_by_name(m, name)
|
1044
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
1045
|
+
# @param [String] name
|
1046
|
+
# @return [FFI::Pointer(TypeRef)]
|
1047
|
+
# @scope class
|
1048
|
+
attach_function :get_type_by_name, :LLVMGetTypeByName, [:pointer, :string], :pointer
|
1049
|
+
|
1050
|
+
# Operations on array, pointer, and vector types (sequence types)
|
1051
|
+
#
|
1052
|
+
# @method array_type(element_type, element_count)
|
1053
|
+
# @param [FFI::Pointer(TypeRef)] element_type
|
1054
|
+
# @param [Integer] element_count
|
1055
|
+
# @return [FFI::Pointer(TypeRef)]
|
1056
|
+
# @scope class
|
1057
|
+
attach_function :array_type, :LLVMArrayType, [:pointer, :uint], :pointer
|
1058
|
+
|
1059
|
+
# (Not documented)
|
1060
|
+
#
|
1061
|
+
# @method pointer_type(element_type, address_space)
|
1062
|
+
# @param [FFI::Pointer(TypeRef)] element_type
|
1063
|
+
# @param [Integer] address_space
|
1064
|
+
# @return [FFI::Pointer(TypeRef)]
|
1065
|
+
# @scope class
|
1066
|
+
attach_function :pointer_type, :LLVMPointerType, [:pointer, :uint], :pointer
|
1067
|
+
|
1068
|
+
# (Not documented)
|
1069
|
+
#
|
1070
|
+
# @method vector_type(element_type, element_count)
|
1071
|
+
# @param [FFI::Pointer(TypeRef)] element_type
|
1072
|
+
# @param [Integer] element_count
|
1073
|
+
# @return [FFI::Pointer(TypeRef)]
|
1074
|
+
# @scope class
|
1075
|
+
attach_function :vector_type, :LLVMVectorType, [:pointer, :uint], :pointer
|
1076
|
+
|
1077
|
+
# (Not documented)
|
1078
|
+
#
|
1079
|
+
# @method get_element_type(ty)
|
1080
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
1081
|
+
# @return [FFI::Pointer(TypeRef)]
|
1082
|
+
# @scope class
|
1083
|
+
attach_function :get_element_type, :LLVMGetElementType, [:pointer], :pointer
|
1084
|
+
|
1085
|
+
# (Not documented)
|
1086
|
+
#
|
1087
|
+
# @method get_array_length(array_ty)
|
1088
|
+
# @param [FFI::Pointer(TypeRef)] array_ty
|
1089
|
+
# @return [Integer]
|
1090
|
+
# @scope class
|
1091
|
+
attach_function :get_array_length, :LLVMGetArrayLength, [:pointer], :uint
|
1092
|
+
|
1093
|
+
# (Not documented)
|
1094
|
+
#
|
1095
|
+
# @method get_pointer_address_space(pointer_ty)
|
1096
|
+
# @param [FFI::Pointer(TypeRef)] pointer_ty
|
1097
|
+
# @return [Integer]
|
1098
|
+
# @scope class
|
1099
|
+
attach_function :get_pointer_address_space, :LLVMGetPointerAddressSpace, [:pointer], :uint
|
1100
|
+
|
1101
|
+
# (Not documented)
|
1102
|
+
#
|
1103
|
+
# @method get_vector_size(vector_ty)
|
1104
|
+
# @param [FFI::Pointer(TypeRef)] vector_ty
|
1105
|
+
# @return [Integer]
|
1106
|
+
# @scope class
|
1107
|
+
attach_function :get_vector_size, :LLVMGetVectorSize, [:pointer], :uint
|
1108
|
+
|
1109
|
+
# Operations on other types
|
1110
|
+
#
|
1111
|
+
# @method void_type_in_context(c)
|
1112
|
+
# @param [FFI::Pointer(ContextRef)] c
|
1113
|
+
# @return [FFI::Pointer(TypeRef)]
|
1114
|
+
# @scope class
|
1115
|
+
attach_function :void_type_in_context, :LLVMVoidTypeInContext, [:pointer], :pointer
|
1116
|
+
|
1117
|
+
# (Not documented)
|
1118
|
+
#
|
1119
|
+
# @method label_type_in_context(c)
|
1120
|
+
# @param [FFI::Pointer(ContextRef)] c
|
1121
|
+
# @return [FFI::Pointer(TypeRef)]
|
1122
|
+
# @scope class
|
1123
|
+
attach_function :label_type_in_context, :LLVMLabelTypeInContext, [:pointer], :pointer
|
1124
|
+
|
1125
|
+
# (Not documented)
|
1126
|
+
#
|
1127
|
+
# @method x86mmx_type_in_context(c)
|
1128
|
+
# @param [FFI::Pointer(ContextRef)] c
|
1129
|
+
# @return [FFI::Pointer(TypeRef)]
|
1130
|
+
# @scope class
|
1131
|
+
attach_function :x86mmx_type_in_context, :LLVMX86MMXTypeInContext, [:pointer], :pointer
|
1132
|
+
|
1133
|
+
# (Not documented)
|
1134
|
+
#
|
1135
|
+
# @method void_type()
|
1136
|
+
# @return [FFI::Pointer(TypeRef)]
|
1137
|
+
# @scope class
|
1138
|
+
attach_function :void_type, :LLVMVoidType, [], :pointer
|
1139
|
+
|
1140
|
+
# (Not documented)
|
1141
|
+
#
|
1142
|
+
# @method label_type()
|
1143
|
+
# @return [FFI::Pointer(TypeRef)]
|
1144
|
+
# @scope class
|
1145
|
+
attach_function :label_type, :LLVMLabelType, [], :pointer
|
1146
|
+
|
1147
|
+
# (Not documented)
|
1148
|
+
#
|
1149
|
+
# @method x86mmx_type()
|
1150
|
+
# @return [FFI::Pointer(TypeRef)]
|
1151
|
+
# @scope class
|
1152
|
+
attach_function :x86mmx_type, :LLVMX86MMXType, [], :pointer
|
1153
|
+
|
1154
|
+
# Operations on all values
|
1155
|
+
#
|
1156
|
+
# @method type_of(val)
|
1157
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1158
|
+
# @return [FFI::Pointer(TypeRef)]
|
1159
|
+
# @scope class
|
1160
|
+
attach_function :type_of, :LLVMTypeOf, [:pointer], :pointer
|
1161
|
+
|
1162
|
+
# (Not documented)
|
1163
|
+
#
|
1164
|
+
# @method get_value_name(val)
|
1165
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1166
|
+
# @return [String]
|
1167
|
+
# @scope class
|
1168
|
+
attach_function :get_value_name, :LLVMGetValueName, [:pointer], :string
|
1169
|
+
|
1170
|
+
# (Not documented)
|
1171
|
+
#
|
1172
|
+
# @method set_value_name(val, name)
|
1173
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1174
|
+
# @param [String] name
|
1175
|
+
# @return [nil]
|
1176
|
+
# @scope class
|
1177
|
+
attach_function :set_value_name, :LLVMSetValueName, [:pointer, :string], :void
|
1178
|
+
|
1179
|
+
# (Not documented)
|
1180
|
+
#
|
1181
|
+
# @method dump_value(val)
|
1182
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1183
|
+
# @return [nil]
|
1184
|
+
# @scope class
|
1185
|
+
attach_function :dump_value, :LLVMDumpValue, [:pointer], :void
|
1186
|
+
|
1187
|
+
# (Not documented)
|
1188
|
+
#
|
1189
|
+
# @method replace_all_uses_with(old_val, new_val)
|
1190
|
+
# @param [FFI::Pointer(ValueRef)] old_val
|
1191
|
+
# @param [FFI::Pointer(ValueRef)] new_val
|
1192
|
+
# @return [nil]
|
1193
|
+
# @scope class
|
1194
|
+
attach_function :replace_all_uses_with, :LLVMReplaceAllUsesWith, [:pointer, :pointer], :void
|
1195
|
+
|
1196
|
+
# (Not documented)
|
1197
|
+
#
|
1198
|
+
# @method has_metadata(val)
|
1199
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1200
|
+
# @return [Integer]
|
1201
|
+
# @scope class
|
1202
|
+
attach_function :has_metadata, :LLVMHasMetadata, [:pointer], :int
|
1203
|
+
|
1204
|
+
# (Not documented)
|
1205
|
+
#
|
1206
|
+
# @method get_metadata(val, kind_id)
|
1207
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1208
|
+
# @param [Integer] kind_id
|
1209
|
+
# @return [FFI::Pointer(ValueRef)]
|
1210
|
+
# @scope class
|
1211
|
+
attach_function :get_metadata, :LLVMGetMetadata, [:pointer, :uint], :pointer
|
1212
|
+
|
1213
|
+
# (Not documented)
|
1214
|
+
#
|
1215
|
+
# @method set_metadata(val, kind_id, node)
|
1216
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1217
|
+
# @param [Integer] kind_id
|
1218
|
+
# @param [FFI::Pointer(ValueRef)] node
|
1219
|
+
# @return [nil]
|
1220
|
+
# @scope class
|
1221
|
+
attach_function :set_metadata, :LLVMSetMetadata, [:pointer, :uint, :pointer], :void
|
1222
|
+
|
1223
|
+
# (Not documented)
|
1224
|
+
#
|
1225
|
+
# @method is_a_argument(val)
|
1226
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1227
|
+
# @return [FFI::Pointer(ValueRef)]
|
1228
|
+
# @scope class
|
1229
|
+
attach_function :is_a_argument, :LLVMIsAArgument, [:pointer], :pointer
|
1230
|
+
|
1231
|
+
# (Not documented)
|
1232
|
+
#
|
1233
|
+
# @method is_a_basic_block(val)
|
1234
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1235
|
+
# @return [FFI::Pointer(ValueRef)]
|
1236
|
+
# @scope class
|
1237
|
+
attach_function :is_a_basic_block, :LLVMIsABasicBlock, [:pointer], :pointer
|
1238
|
+
|
1239
|
+
# (Not documented)
|
1240
|
+
#
|
1241
|
+
# @method is_a_inline_asm(val)
|
1242
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1243
|
+
# @return [FFI::Pointer(ValueRef)]
|
1244
|
+
# @scope class
|
1245
|
+
attach_function :is_a_inline_asm, :LLVMIsAInlineAsm, [:pointer], :pointer
|
1246
|
+
|
1247
|
+
# (Not documented)
|
1248
|
+
#
|
1249
|
+
# @method is_amd_node(val)
|
1250
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1251
|
+
# @return [FFI::Pointer(ValueRef)]
|
1252
|
+
# @scope class
|
1253
|
+
attach_function :is_amd_node, :LLVMIsAMDNode, [:pointer], :pointer
|
1254
|
+
|
1255
|
+
# (Not documented)
|
1256
|
+
#
|
1257
|
+
# @method is_amd_string(val)
|
1258
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1259
|
+
# @return [FFI::Pointer(ValueRef)]
|
1260
|
+
# @scope class
|
1261
|
+
attach_function :is_amd_string, :LLVMIsAMDString, [:pointer], :pointer
|
1262
|
+
|
1263
|
+
# (Not documented)
|
1264
|
+
#
|
1265
|
+
# @method is_a_user(val)
|
1266
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1267
|
+
# @return [FFI::Pointer(ValueRef)]
|
1268
|
+
# @scope class
|
1269
|
+
attach_function :is_a_user, :LLVMIsAUser, [:pointer], :pointer
|
1270
|
+
|
1271
|
+
# (Not documented)
|
1272
|
+
#
|
1273
|
+
# @method is_a_constant(val)
|
1274
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1275
|
+
# @return [FFI::Pointer(ValueRef)]
|
1276
|
+
# @scope class
|
1277
|
+
attach_function :is_a_constant, :LLVMIsAConstant, [:pointer], :pointer
|
1278
|
+
|
1279
|
+
# (Not documented)
|
1280
|
+
#
|
1281
|
+
# @method is_a_block_address(val)
|
1282
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1283
|
+
# @return [FFI::Pointer(ValueRef)]
|
1284
|
+
# @scope class
|
1285
|
+
attach_function :is_a_block_address, :LLVMIsABlockAddress, [:pointer], :pointer
|
1286
|
+
|
1287
|
+
# (Not documented)
|
1288
|
+
#
|
1289
|
+
# @method is_a_constant_aggregate_zero(val)
|
1290
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1291
|
+
# @return [FFI::Pointer(ValueRef)]
|
1292
|
+
# @scope class
|
1293
|
+
attach_function :is_a_constant_aggregate_zero, :LLVMIsAConstantAggregateZero, [:pointer], :pointer
|
1294
|
+
|
1295
|
+
# (Not documented)
|
1296
|
+
#
|
1297
|
+
# @method is_a_constant_array(val)
|
1298
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1299
|
+
# @return [FFI::Pointer(ValueRef)]
|
1300
|
+
# @scope class
|
1301
|
+
attach_function :is_a_constant_array, :LLVMIsAConstantArray, [:pointer], :pointer
|
1302
|
+
|
1303
|
+
# (Not documented)
|
1304
|
+
#
|
1305
|
+
# @method is_a_constant_expr(val)
|
1306
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1307
|
+
# @return [FFI::Pointer(ValueRef)]
|
1308
|
+
# @scope class
|
1309
|
+
attach_function :is_a_constant_expr, :LLVMIsAConstantExpr, [:pointer], :pointer
|
1310
|
+
|
1311
|
+
# (Not documented)
|
1312
|
+
#
|
1313
|
+
# @method is_a_constant_fp(val)
|
1314
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1315
|
+
# @return [FFI::Pointer(ValueRef)]
|
1316
|
+
# @scope class
|
1317
|
+
attach_function :is_a_constant_fp, :LLVMIsAConstantFP, [:pointer], :pointer
|
1318
|
+
|
1319
|
+
# (Not documented)
|
1320
|
+
#
|
1321
|
+
# @method is_a_constant_int(val)
|
1322
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1323
|
+
# @return [FFI::Pointer(ValueRef)]
|
1324
|
+
# @scope class
|
1325
|
+
attach_function :is_a_constant_int, :LLVMIsAConstantInt, [:pointer], :pointer
|
1326
|
+
|
1327
|
+
# (Not documented)
|
1328
|
+
#
|
1329
|
+
# @method is_a_constant_pointer_null(val)
|
1330
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1331
|
+
# @return [FFI::Pointer(ValueRef)]
|
1332
|
+
# @scope class
|
1333
|
+
attach_function :is_a_constant_pointer_null, :LLVMIsAConstantPointerNull, [:pointer], :pointer
|
1334
|
+
|
1335
|
+
# (Not documented)
|
1336
|
+
#
|
1337
|
+
# @method is_a_constant_struct(val)
|
1338
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1339
|
+
# @return [FFI::Pointer(ValueRef)]
|
1340
|
+
# @scope class
|
1341
|
+
attach_function :is_a_constant_struct, :LLVMIsAConstantStruct, [:pointer], :pointer
|
1342
|
+
|
1343
|
+
# (Not documented)
|
1344
|
+
#
|
1345
|
+
# @method is_a_constant_vector(val)
|
1346
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1347
|
+
# @return [FFI::Pointer(ValueRef)]
|
1348
|
+
# @scope class
|
1349
|
+
attach_function :is_a_constant_vector, :LLVMIsAConstantVector, [:pointer], :pointer
|
1350
|
+
|
1351
|
+
# (Not documented)
|
1352
|
+
#
|
1353
|
+
# @method is_a_global_value(val)
|
1354
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1355
|
+
# @return [FFI::Pointer(ValueRef)]
|
1356
|
+
# @scope class
|
1357
|
+
attach_function :is_a_global_value, :LLVMIsAGlobalValue, [:pointer], :pointer
|
1358
|
+
|
1359
|
+
# (Not documented)
|
1360
|
+
#
|
1361
|
+
# @method is_a_function(val)
|
1362
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1363
|
+
# @return [FFI::Pointer(ValueRef)]
|
1364
|
+
# @scope class
|
1365
|
+
attach_function :is_a_function, :LLVMIsAFunction, [:pointer], :pointer
|
1366
|
+
|
1367
|
+
# (Not documented)
|
1368
|
+
#
|
1369
|
+
# @method is_a_global_alias(val)
|
1370
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1371
|
+
# @return [FFI::Pointer(ValueRef)]
|
1372
|
+
# @scope class
|
1373
|
+
attach_function :is_a_global_alias, :LLVMIsAGlobalAlias, [:pointer], :pointer
|
1374
|
+
|
1375
|
+
# (Not documented)
|
1376
|
+
#
|
1377
|
+
# @method is_a_global_variable(val)
|
1378
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1379
|
+
# @return [FFI::Pointer(ValueRef)]
|
1380
|
+
# @scope class
|
1381
|
+
attach_function :is_a_global_variable, :LLVMIsAGlobalVariable, [:pointer], :pointer
|
1382
|
+
|
1383
|
+
# (Not documented)
|
1384
|
+
#
|
1385
|
+
# @method is_a_undef_value(val)
|
1386
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1387
|
+
# @return [FFI::Pointer(ValueRef)]
|
1388
|
+
# @scope class
|
1389
|
+
attach_function :is_a_undef_value, :LLVMIsAUndefValue, [:pointer], :pointer
|
1390
|
+
|
1391
|
+
# (Not documented)
|
1392
|
+
#
|
1393
|
+
# @method is_a_instruction(val)
|
1394
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1395
|
+
# @return [FFI::Pointer(ValueRef)]
|
1396
|
+
# @scope class
|
1397
|
+
attach_function :is_a_instruction, :LLVMIsAInstruction, [:pointer], :pointer
|
1398
|
+
|
1399
|
+
# (Not documented)
|
1400
|
+
#
|
1401
|
+
# @method is_a_binary_operator(val)
|
1402
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1403
|
+
# @return [FFI::Pointer(ValueRef)]
|
1404
|
+
# @scope class
|
1405
|
+
attach_function :is_a_binary_operator, :LLVMIsABinaryOperator, [:pointer], :pointer
|
1406
|
+
|
1407
|
+
# (Not documented)
|
1408
|
+
#
|
1409
|
+
# @method is_a_call_inst(val)
|
1410
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1411
|
+
# @return [FFI::Pointer(ValueRef)]
|
1412
|
+
# @scope class
|
1413
|
+
attach_function :is_a_call_inst, :LLVMIsACallInst, [:pointer], :pointer
|
1414
|
+
|
1415
|
+
# (Not documented)
|
1416
|
+
#
|
1417
|
+
# @method is_a_intrinsic_inst(val)
|
1418
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1419
|
+
# @return [FFI::Pointer(ValueRef)]
|
1420
|
+
# @scope class
|
1421
|
+
attach_function :is_a_intrinsic_inst, :LLVMIsAIntrinsicInst, [:pointer], :pointer
|
1422
|
+
|
1423
|
+
# (Not documented)
|
1424
|
+
#
|
1425
|
+
# @method is_a_dbg_info_intrinsic(val)
|
1426
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1427
|
+
# @return [FFI::Pointer(ValueRef)]
|
1428
|
+
# @scope class
|
1429
|
+
attach_function :is_a_dbg_info_intrinsic, :LLVMIsADbgInfoIntrinsic, [:pointer], :pointer
|
1430
|
+
|
1431
|
+
# (Not documented)
|
1432
|
+
#
|
1433
|
+
# @method is_a_dbg_declare_inst(val)
|
1434
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1435
|
+
# @return [FFI::Pointer(ValueRef)]
|
1436
|
+
# @scope class
|
1437
|
+
attach_function :is_a_dbg_declare_inst, :LLVMIsADbgDeclareInst, [:pointer], :pointer
|
1438
|
+
|
1439
|
+
# (Not documented)
|
1440
|
+
#
|
1441
|
+
# @method is_aeh_exception_inst(val)
|
1442
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1443
|
+
# @return [FFI::Pointer(ValueRef)]
|
1444
|
+
# @scope class
|
1445
|
+
attach_function :is_aeh_exception_inst, :LLVMIsAEHExceptionInst, [:pointer], :pointer
|
1446
|
+
|
1447
|
+
# (Not documented)
|
1448
|
+
#
|
1449
|
+
# @method is_aeh_selector_inst(val)
|
1450
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1451
|
+
# @return [FFI::Pointer(ValueRef)]
|
1452
|
+
# @scope class
|
1453
|
+
attach_function :is_aeh_selector_inst, :LLVMIsAEHSelectorInst, [:pointer], :pointer
|
1454
|
+
|
1455
|
+
# (Not documented)
|
1456
|
+
#
|
1457
|
+
# @method is_a_mem_intrinsic(val)
|
1458
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1459
|
+
# @return [FFI::Pointer(ValueRef)]
|
1460
|
+
# @scope class
|
1461
|
+
attach_function :is_a_mem_intrinsic, :LLVMIsAMemIntrinsic, [:pointer], :pointer
|
1462
|
+
|
1463
|
+
# (Not documented)
|
1464
|
+
#
|
1465
|
+
# @method is_a_mem_cpy_inst(val)
|
1466
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1467
|
+
# @return [FFI::Pointer(ValueRef)]
|
1468
|
+
# @scope class
|
1469
|
+
attach_function :is_a_mem_cpy_inst, :LLVMIsAMemCpyInst, [:pointer], :pointer
|
1470
|
+
|
1471
|
+
# (Not documented)
|
1472
|
+
#
|
1473
|
+
# @method is_a_mem_move_inst(val)
|
1474
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1475
|
+
# @return [FFI::Pointer(ValueRef)]
|
1476
|
+
# @scope class
|
1477
|
+
attach_function :is_a_mem_move_inst, :LLVMIsAMemMoveInst, [:pointer], :pointer
|
1478
|
+
|
1479
|
+
# (Not documented)
|
1480
|
+
#
|
1481
|
+
# @method is_a_mem_set_inst(val)
|
1482
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1483
|
+
# @return [FFI::Pointer(ValueRef)]
|
1484
|
+
# @scope class
|
1485
|
+
attach_function :is_a_mem_set_inst, :LLVMIsAMemSetInst, [:pointer], :pointer
|
1486
|
+
|
1487
|
+
# (Not documented)
|
1488
|
+
#
|
1489
|
+
# @method is_a_cmp_inst(val)
|
1490
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1491
|
+
# @return [FFI::Pointer(ValueRef)]
|
1492
|
+
# @scope class
|
1493
|
+
attach_function :is_a_cmp_inst, :LLVMIsACmpInst, [:pointer], :pointer
|
1494
|
+
|
1495
|
+
# (Not documented)
|
1496
|
+
#
|
1497
|
+
# @method is_af_cmp_inst(val)
|
1498
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1499
|
+
# @return [FFI::Pointer(ValueRef)]
|
1500
|
+
# @scope class
|
1501
|
+
attach_function :is_af_cmp_inst, :LLVMIsAFCmpInst, [:pointer], :pointer
|
1502
|
+
|
1503
|
+
# (Not documented)
|
1504
|
+
#
|
1505
|
+
# @method is_ai_cmp_inst(val)
|
1506
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1507
|
+
# @return [FFI::Pointer(ValueRef)]
|
1508
|
+
# @scope class
|
1509
|
+
attach_function :is_ai_cmp_inst, :LLVMIsAICmpInst, [:pointer], :pointer
|
1510
|
+
|
1511
|
+
# (Not documented)
|
1512
|
+
#
|
1513
|
+
# @method is_a_extract_element_inst(val)
|
1514
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1515
|
+
# @return [FFI::Pointer(ValueRef)]
|
1516
|
+
# @scope class
|
1517
|
+
attach_function :is_a_extract_element_inst, :LLVMIsAExtractElementInst, [:pointer], :pointer
|
1518
|
+
|
1519
|
+
# (Not documented)
|
1520
|
+
#
|
1521
|
+
# @method is_a_get_element_ptr_inst(val)
|
1522
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1523
|
+
# @return [FFI::Pointer(ValueRef)]
|
1524
|
+
# @scope class
|
1525
|
+
attach_function :is_a_get_element_ptr_inst, :LLVMIsAGetElementPtrInst, [:pointer], :pointer
|
1526
|
+
|
1527
|
+
# (Not documented)
|
1528
|
+
#
|
1529
|
+
# @method is_a_insert_element_inst(val)
|
1530
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1531
|
+
# @return [FFI::Pointer(ValueRef)]
|
1532
|
+
# @scope class
|
1533
|
+
attach_function :is_a_insert_element_inst, :LLVMIsAInsertElementInst, [:pointer], :pointer
|
1534
|
+
|
1535
|
+
# (Not documented)
|
1536
|
+
#
|
1537
|
+
# @method is_a_insert_value_inst(val)
|
1538
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1539
|
+
# @return [FFI::Pointer(ValueRef)]
|
1540
|
+
# @scope class
|
1541
|
+
attach_function :is_a_insert_value_inst, :LLVMIsAInsertValueInst, [:pointer], :pointer
|
1542
|
+
|
1543
|
+
# (Not documented)
|
1544
|
+
#
|
1545
|
+
# @method is_a_landing_pad_inst(val)
|
1546
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1547
|
+
# @return [FFI::Pointer(ValueRef)]
|
1548
|
+
# @scope class
|
1549
|
+
attach_function :is_a_landing_pad_inst, :LLVMIsALandingPadInst, [:pointer], :pointer
|
1550
|
+
|
1551
|
+
# (Not documented)
|
1552
|
+
#
|
1553
|
+
# @method is_aphi_node(val)
|
1554
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1555
|
+
# @return [FFI::Pointer(ValueRef)]
|
1556
|
+
# @scope class
|
1557
|
+
attach_function :is_aphi_node, :LLVMIsAPHINode, [:pointer], :pointer
|
1558
|
+
|
1559
|
+
# (Not documented)
|
1560
|
+
#
|
1561
|
+
# @method is_a_select_inst(val)
|
1562
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1563
|
+
# @return [FFI::Pointer(ValueRef)]
|
1564
|
+
# @scope class
|
1565
|
+
attach_function :is_a_select_inst, :LLVMIsASelectInst, [:pointer], :pointer
|
1566
|
+
|
1567
|
+
# (Not documented)
|
1568
|
+
#
|
1569
|
+
# @method is_a_shuffle_vector_inst(val)
|
1570
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1571
|
+
# @return [FFI::Pointer(ValueRef)]
|
1572
|
+
# @scope class
|
1573
|
+
attach_function :is_a_shuffle_vector_inst, :LLVMIsAShuffleVectorInst, [:pointer], :pointer
|
1574
|
+
|
1575
|
+
# (Not documented)
|
1576
|
+
#
|
1577
|
+
# @method is_a_store_inst(val)
|
1578
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1579
|
+
# @return [FFI::Pointer(ValueRef)]
|
1580
|
+
# @scope class
|
1581
|
+
attach_function :is_a_store_inst, :LLVMIsAStoreInst, [:pointer], :pointer
|
1582
|
+
|
1583
|
+
# (Not documented)
|
1584
|
+
#
|
1585
|
+
# @method is_a_terminator_inst(val)
|
1586
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1587
|
+
# @return [FFI::Pointer(ValueRef)]
|
1588
|
+
# @scope class
|
1589
|
+
attach_function :is_a_terminator_inst, :LLVMIsATerminatorInst, [:pointer], :pointer
|
1590
|
+
|
1591
|
+
# (Not documented)
|
1592
|
+
#
|
1593
|
+
# @method is_a_branch_inst(val)
|
1594
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1595
|
+
# @return [FFI::Pointer(ValueRef)]
|
1596
|
+
# @scope class
|
1597
|
+
attach_function :is_a_branch_inst, :LLVMIsABranchInst, [:pointer], :pointer
|
1598
|
+
|
1599
|
+
# (Not documented)
|
1600
|
+
#
|
1601
|
+
# @method is_a_indirect_br_inst(val)
|
1602
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1603
|
+
# @return [FFI::Pointer(ValueRef)]
|
1604
|
+
# @scope class
|
1605
|
+
attach_function :is_a_indirect_br_inst, :LLVMIsAIndirectBrInst, [:pointer], :pointer
|
1606
|
+
|
1607
|
+
# (Not documented)
|
1608
|
+
#
|
1609
|
+
# @method is_a_invoke_inst(val)
|
1610
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1611
|
+
# @return [FFI::Pointer(ValueRef)]
|
1612
|
+
# @scope class
|
1613
|
+
attach_function :is_a_invoke_inst, :LLVMIsAInvokeInst, [:pointer], :pointer
|
1614
|
+
|
1615
|
+
# (Not documented)
|
1616
|
+
#
|
1617
|
+
# @method is_a_return_inst(val)
|
1618
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1619
|
+
# @return [FFI::Pointer(ValueRef)]
|
1620
|
+
# @scope class
|
1621
|
+
attach_function :is_a_return_inst, :LLVMIsAReturnInst, [:pointer], :pointer
|
1622
|
+
|
1623
|
+
# (Not documented)
|
1624
|
+
#
|
1625
|
+
# @method is_a_switch_inst(val)
|
1626
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1627
|
+
# @return [FFI::Pointer(ValueRef)]
|
1628
|
+
# @scope class
|
1629
|
+
attach_function :is_a_switch_inst, :LLVMIsASwitchInst, [:pointer], :pointer
|
1630
|
+
|
1631
|
+
# (Not documented)
|
1632
|
+
#
|
1633
|
+
# @method is_a_unreachable_inst(val)
|
1634
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1635
|
+
# @return [FFI::Pointer(ValueRef)]
|
1636
|
+
# @scope class
|
1637
|
+
attach_function :is_a_unreachable_inst, :LLVMIsAUnreachableInst, [:pointer], :pointer
|
1638
|
+
|
1639
|
+
# (Not documented)
|
1640
|
+
#
|
1641
|
+
# @method is_a_resume_inst(val)
|
1642
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1643
|
+
# @return [FFI::Pointer(ValueRef)]
|
1644
|
+
# @scope class
|
1645
|
+
attach_function :is_a_resume_inst, :LLVMIsAResumeInst, [:pointer], :pointer
|
1646
|
+
|
1647
|
+
# (Not documented)
|
1648
|
+
#
|
1649
|
+
# @method is_a_unary_instruction(val)
|
1650
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1651
|
+
# @return [FFI::Pointer(ValueRef)]
|
1652
|
+
# @scope class
|
1653
|
+
attach_function :is_a_unary_instruction, :LLVMIsAUnaryInstruction, [:pointer], :pointer
|
1654
|
+
|
1655
|
+
# (Not documented)
|
1656
|
+
#
|
1657
|
+
# @method is_a_alloca_inst(val)
|
1658
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1659
|
+
# @return [FFI::Pointer(ValueRef)]
|
1660
|
+
# @scope class
|
1661
|
+
attach_function :is_a_alloca_inst, :LLVMIsAAllocaInst, [:pointer], :pointer
|
1662
|
+
|
1663
|
+
# (Not documented)
|
1664
|
+
#
|
1665
|
+
# @method is_a_cast_inst(val)
|
1666
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1667
|
+
# @return [FFI::Pointer(ValueRef)]
|
1668
|
+
# @scope class
|
1669
|
+
attach_function :is_a_cast_inst, :LLVMIsACastInst, [:pointer], :pointer
|
1670
|
+
|
1671
|
+
# (Not documented)
|
1672
|
+
#
|
1673
|
+
# @method is_a_bit_cast_inst(val)
|
1674
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1675
|
+
# @return [FFI::Pointer(ValueRef)]
|
1676
|
+
# @scope class
|
1677
|
+
attach_function :is_a_bit_cast_inst, :LLVMIsABitCastInst, [:pointer], :pointer
|
1678
|
+
|
1679
|
+
# (Not documented)
|
1680
|
+
#
|
1681
|
+
# @method is_afp_ext_inst(val)
|
1682
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1683
|
+
# @return [FFI::Pointer(ValueRef)]
|
1684
|
+
# @scope class
|
1685
|
+
attach_function :is_afp_ext_inst, :LLVMIsAFPExtInst, [:pointer], :pointer
|
1686
|
+
|
1687
|
+
# (Not documented)
|
1688
|
+
#
|
1689
|
+
# @method is_afp_to_si_inst(val)
|
1690
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1691
|
+
# @return [FFI::Pointer(ValueRef)]
|
1692
|
+
# @scope class
|
1693
|
+
attach_function :is_afp_to_si_inst, :LLVMIsAFPToSIInst, [:pointer], :pointer
|
1694
|
+
|
1695
|
+
# (Not documented)
|
1696
|
+
#
|
1697
|
+
# @method is_afp_to_ui_inst(val)
|
1698
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1699
|
+
# @return [FFI::Pointer(ValueRef)]
|
1700
|
+
# @scope class
|
1701
|
+
attach_function :is_afp_to_ui_inst, :LLVMIsAFPToUIInst, [:pointer], :pointer
|
1702
|
+
|
1703
|
+
# (Not documented)
|
1704
|
+
#
|
1705
|
+
# @method is_afp_trunc_inst(val)
|
1706
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1707
|
+
# @return [FFI::Pointer(ValueRef)]
|
1708
|
+
# @scope class
|
1709
|
+
attach_function :is_afp_trunc_inst, :LLVMIsAFPTruncInst, [:pointer], :pointer
|
1710
|
+
|
1711
|
+
# (Not documented)
|
1712
|
+
#
|
1713
|
+
# @method is_a_int_to_ptr_inst(val)
|
1714
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1715
|
+
# @return [FFI::Pointer(ValueRef)]
|
1716
|
+
# @scope class
|
1717
|
+
attach_function :is_a_int_to_ptr_inst, :LLVMIsAIntToPtrInst, [:pointer], :pointer
|
1718
|
+
|
1719
|
+
# (Not documented)
|
1720
|
+
#
|
1721
|
+
# @method is_a_ptr_to_int_inst(val)
|
1722
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1723
|
+
# @return [FFI::Pointer(ValueRef)]
|
1724
|
+
# @scope class
|
1725
|
+
attach_function :is_a_ptr_to_int_inst, :LLVMIsAPtrToIntInst, [:pointer], :pointer
|
1726
|
+
|
1727
|
+
# (Not documented)
|
1728
|
+
#
|
1729
|
+
# @method is_as_ext_inst(val)
|
1730
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1731
|
+
# @return [FFI::Pointer(ValueRef)]
|
1732
|
+
# @scope class
|
1733
|
+
attach_function :is_as_ext_inst, :LLVMIsASExtInst, [:pointer], :pointer
|
1734
|
+
|
1735
|
+
# (Not documented)
|
1736
|
+
#
|
1737
|
+
# @method is_asi_to_fp_inst(val)
|
1738
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1739
|
+
# @return [FFI::Pointer(ValueRef)]
|
1740
|
+
# @scope class
|
1741
|
+
attach_function :is_asi_to_fp_inst, :LLVMIsASIToFPInst, [:pointer], :pointer
|
1742
|
+
|
1743
|
+
# (Not documented)
|
1744
|
+
#
|
1745
|
+
# @method is_a_trunc_inst(val)
|
1746
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1747
|
+
# @return [FFI::Pointer(ValueRef)]
|
1748
|
+
# @scope class
|
1749
|
+
attach_function :is_a_trunc_inst, :LLVMIsATruncInst, [:pointer], :pointer
|
1750
|
+
|
1751
|
+
# (Not documented)
|
1752
|
+
#
|
1753
|
+
# @method is_aui_to_fp_inst(val)
|
1754
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1755
|
+
# @return [FFI::Pointer(ValueRef)]
|
1756
|
+
# @scope class
|
1757
|
+
attach_function :is_aui_to_fp_inst, :LLVMIsAUIToFPInst, [:pointer], :pointer
|
1758
|
+
|
1759
|
+
# (Not documented)
|
1760
|
+
#
|
1761
|
+
# @method is_az_ext_inst(val)
|
1762
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1763
|
+
# @return [FFI::Pointer(ValueRef)]
|
1764
|
+
# @scope class
|
1765
|
+
attach_function :is_az_ext_inst, :LLVMIsAZExtInst, [:pointer], :pointer
|
1766
|
+
|
1767
|
+
# (Not documented)
|
1768
|
+
#
|
1769
|
+
# @method is_a_extract_value_inst(val)
|
1770
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1771
|
+
# @return [FFI::Pointer(ValueRef)]
|
1772
|
+
# @scope class
|
1773
|
+
attach_function :is_a_extract_value_inst, :LLVMIsAExtractValueInst, [:pointer], :pointer
|
1774
|
+
|
1775
|
+
# (Not documented)
|
1776
|
+
#
|
1777
|
+
# @method is_a_load_inst(val)
|
1778
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1779
|
+
# @return [FFI::Pointer(ValueRef)]
|
1780
|
+
# @scope class
|
1781
|
+
attach_function :is_a_load_inst, :LLVMIsALoadInst, [:pointer], :pointer
|
1782
|
+
|
1783
|
+
# (Not documented)
|
1784
|
+
#
|
1785
|
+
# @method is_ava_arg_inst(val)
|
1786
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1787
|
+
# @return [FFI::Pointer(ValueRef)]
|
1788
|
+
# @scope class
|
1789
|
+
attach_function :is_ava_arg_inst, :LLVMIsAVAArgInst, [:pointer], :pointer
|
1790
|
+
|
1791
|
+
# Operations on Uses
|
1792
|
+
#
|
1793
|
+
# @method get_first_use(val)
|
1794
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1795
|
+
# @return [FFI::Pointer(UseRef)]
|
1796
|
+
# @scope class
|
1797
|
+
attach_function :get_first_use, :LLVMGetFirstUse, [:pointer], :pointer
|
1798
|
+
|
1799
|
+
# (Not documented)
|
1800
|
+
#
|
1801
|
+
# @method get_next_use(u)
|
1802
|
+
# @param [FFI::Pointer(UseRef)] u
|
1803
|
+
# @return [FFI::Pointer(UseRef)]
|
1804
|
+
# @scope class
|
1805
|
+
attach_function :get_next_use, :LLVMGetNextUse, [:pointer], :pointer
|
1806
|
+
|
1807
|
+
# (Not documented)
|
1808
|
+
#
|
1809
|
+
# @method get_user(u)
|
1810
|
+
# @param [FFI::Pointer(UseRef)] u
|
1811
|
+
# @return [FFI::Pointer(ValueRef)]
|
1812
|
+
# @scope class
|
1813
|
+
attach_function :get_user, :LLVMGetUser, [:pointer], :pointer
|
1814
|
+
|
1815
|
+
# (Not documented)
|
1816
|
+
#
|
1817
|
+
# @method get_used_value(u)
|
1818
|
+
# @param [FFI::Pointer(UseRef)] u
|
1819
|
+
# @return [FFI::Pointer(ValueRef)]
|
1820
|
+
# @scope class
|
1821
|
+
attach_function :get_used_value, :LLVMGetUsedValue, [:pointer], :pointer
|
1822
|
+
|
1823
|
+
# Operations on Users
|
1824
|
+
#
|
1825
|
+
# @method get_operand(val, index)
|
1826
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1827
|
+
# @param [Integer] index
|
1828
|
+
# @return [FFI::Pointer(ValueRef)]
|
1829
|
+
# @scope class
|
1830
|
+
attach_function :get_operand, :LLVMGetOperand, [:pointer, :uint], :pointer
|
1831
|
+
|
1832
|
+
# (Not documented)
|
1833
|
+
#
|
1834
|
+
# @method set_operand(user, index, val)
|
1835
|
+
# @param [FFI::Pointer(ValueRef)] user
|
1836
|
+
# @param [Integer] index
|
1837
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1838
|
+
# @return [nil]
|
1839
|
+
# @scope class
|
1840
|
+
attach_function :set_operand, :LLVMSetOperand, [:pointer, :uint, :pointer], :void
|
1841
|
+
|
1842
|
+
# (Not documented)
|
1843
|
+
#
|
1844
|
+
# @method get_num_operands(val)
|
1845
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1846
|
+
# @return [Integer]
|
1847
|
+
# @scope class
|
1848
|
+
attach_function :get_num_operands, :LLVMGetNumOperands, [:pointer], :int
|
1849
|
+
|
1850
|
+
# Operations on constants of any type
|
1851
|
+
#
|
1852
|
+
# @method const_null(ty)
|
1853
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
1854
|
+
# @return [FFI::Pointer(ValueRef)]
|
1855
|
+
# @scope class
|
1856
|
+
attach_function :const_null, :LLVMConstNull, [:pointer], :pointer
|
1857
|
+
|
1858
|
+
# all zeroes
|
1859
|
+
#
|
1860
|
+
# @method const_all_ones(ty)
|
1861
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
1862
|
+
# @return [FFI::Pointer(ValueRef)]
|
1863
|
+
# @scope class
|
1864
|
+
attach_function :const_all_ones, :LLVMConstAllOnes, [:pointer], :pointer
|
1865
|
+
|
1866
|
+
# only for int/vector
|
1867
|
+
#
|
1868
|
+
# @method get_undef(ty)
|
1869
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
1870
|
+
# @return [FFI::Pointer(ValueRef)]
|
1871
|
+
# @scope class
|
1872
|
+
attach_function :get_undef, :LLVMGetUndef, [:pointer], :pointer
|
1873
|
+
|
1874
|
+
# (Not documented)
|
1875
|
+
#
|
1876
|
+
# @method is_constant(val)
|
1877
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1878
|
+
# @return [Integer]
|
1879
|
+
# @scope class
|
1880
|
+
attach_function :is_constant, :LLVMIsConstant, [:pointer], :int
|
1881
|
+
|
1882
|
+
# (Not documented)
|
1883
|
+
#
|
1884
|
+
# @method is_null(val)
|
1885
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1886
|
+
# @return [Integer]
|
1887
|
+
# @scope class
|
1888
|
+
attach_function :is_null, :LLVMIsNull, [:pointer], :int
|
1889
|
+
|
1890
|
+
# (Not documented)
|
1891
|
+
#
|
1892
|
+
# @method is_undef(val)
|
1893
|
+
# @param [FFI::Pointer(ValueRef)] val
|
1894
|
+
# @return [Integer]
|
1895
|
+
# @scope class
|
1896
|
+
attach_function :is_undef, :LLVMIsUndef, [:pointer], :int
|
1897
|
+
|
1898
|
+
# (Not documented)
|
1899
|
+
#
|
1900
|
+
# @method const_pointer_null(ty)
|
1901
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
1902
|
+
# @return [FFI::Pointer(ValueRef)]
|
1903
|
+
# @scope class
|
1904
|
+
attach_function :const_pointer_null, :LLVMConstPointerNull, [:pointer], :pointer
|
1905
|
+
|
1906
|
+
# Operations on metadata
|
1907
|
+
#
|
1908
|
+
# @method md_string_in_context(c, str, s_len)
|
1909
|
+
# @param [FFI::Pointer(ContextRef)] c
|
1910
|
+
# @param [String] str
|
1911
|
+
# @param [Integer] s_len
|
1912
|
+
# @return [FFI::Pointer(ValueRef)]
|
1913
|
+
# @scope class
|
1914
|
+
attach_function :md_string_in_context, :LLVMMDStringInContext, [:pointer, :string, :uint], :pointer
|
1915
|
+
|
1916
|
+
# (Not documented)
|
1917
|
+
#
|
1918
|
+
# @method md_string(str, s_len)
|
1919
|
+
# @param [String] str
|
1920
|
+
# @param [Integer] s_len
|
1921
|
+
# @return [FFI::Pointer(ValueRef)]
|
1922
|
+
# @scope class
|
1923
|
+
attach_function :md_string, :LLVMMDString, [:string, :uint], :pointer
|
1924
|
+
|
1925
|
+
# (Not documented)
|
1926
|
+
#
|
1927
|
+
# @method md_node_in_context(c, vals, count)
|
1928
|
+
# @param [FFI::Pointer(ContextRef)] c
|
1929
|
+
# @param [FFI::Pointer(*ValueRef)] vals
|
1930
|
+
# @param [Integer] count
|
1931
|
+
# @return [FFI::Pointer(ValueRef)]
|
1932
|
+
# @scope class
|
1933
|
+
attach_function :md_node_in_context, :LLVMMDNodeInContext, [:pointer, :pointer, :uint], :pointer
|
1934
|
+
|
1935
|
+
# (Not documented)
|
1936
|
+
#
|
1937
|
+
# @method md_node(vals, count)
|
1938
|
+
# @param [FFI::Pointer(*ValueRef)] vals
|
1939
|
+
# @param [Integer] count
|
1940
|
+
# @return [FFI::Pointer(ValueRef)]
|
1941
|
+
# @scope class
|
1942
|
+
attach_function :md_node, :LLVMMDNode, [:pointer, :uint], :pointer
|
1943
|
+
|
1944
|
+
# (Not documented)
|
1945
|
+
#
|
1946
|
+
# @method get_md_string(v, len)
|
1947
|
+
# @param [FFI::Pointer(ValueRef)] v
|
1948
|
+
# @param [FFI::Pointer(*UInt)] len
|
1949
|
+
# @return [String]
|
1950
|
+
# @scope class
|
1951
|
+
attach_function :get_md_string, :LLVMGetMDString, [:pointer, :pointer], :string
|
1952
|
+
|
1953
|
+
# (Not documented)
|
1954
|
+
#
|
1955
|
+
# @method get_named_metadata_num_operands(m, name)
|
1956
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
1957
|
+
# @param [String] name
|
1958
|
+
# @return [Integer]
|
1959
|
+
# @scope class
|
1960
|
+
attach_function :get_named_metadata_num_operands, :LLVMGetNamedMetadataNumOperands, [:pointer, :string], :uint
|
1961
|
+
|
1962
|
+
# (Not documented)
|
1963
|
+
#
|
1964
|
+
# @method get_named_metadata_operands(m, name, dest)
|
1965
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
1966
|
+
# @param [String] name
|
1967
|
+
# @param [FFI::Pointer(*ValueRef)] dest
|
1968
|
+
# @return [nil]
|
1969
|
+
# @scope class
|
1970
|
+
attach_function :get_named_metadata_operands, :LLVMGetNamedMetadataOperands, [:pointer, :string, :pointer], :void
|
1971
|
+
|
1972
|
+
# Operations on scalar constants
|
1973
|
+
#
|
1974
|
+
# @method const_int(int_ty, n, sign_extend)
|
1975
|
+
# @param [FFI::Pointer(TypeRef)] int_ty
|
1976
|
+
# @param [Integer] n
|
1977
|
+
# @param [Integer] sign_extend
|
1978
|
+
# @return [FFI::Pointer(ValueRef)]
|
1979
|
+
# @scope class
|
1980
|
+
attach_function :const_int, :LLVMConstInt, [:pointer, :ulong_long, :int], :pointer
|
1981
|
+
|
1982
|
+
# (Not documented)
|
1983
|
+
#
|
1984
|
+
# @method const_int_of_arbitrary_precision(int_ty, num_words, words)
|
1985
|
+
# @param [FFI::Pointer(TypeRef)] int_ty
|
1986
|
+
# @param [Integer] num_words
|
1987
|
+
# @param [FFI::Pointer(*uint64_t)] words
|
1988
|
+
# @return [FFI::Pointer(ValueRef)]
|
1989
|
+
# @scope class
|
1990
|
+
attach_function :const_int_of_arbitrary_precision, :LLVMConstIntOfArbitraryPrecision, [:pointer, :uint, :pointer], :pointer
|
1991
|
+
|
1992
|
+
# (Not documented)
|
1993
|
+
#
|
1994
|
+
# @method const_int_of_string(int_ty, text, radix)
|
1995
|
+
# @param [FFI::Pointer(TypeRef)] int_ty
|
1996
|
+
# @param [String] text
|
1997
|
+
# @param [Integer] radix
|
1998
|
+
# @return [FFI::Pointer(ValueRef)]
|
1999
|
+
# @scope class
|
2000
|
+
attach_function :const_int_of_string, :LLVMConstIntOfString, [:pointer, :string, :uchar], :pointer
|
2001
|
+
|
2002
|
+
# (Not documented)
|
2003
|
+
#
|
2004
|
+
# @method const_int_of_string_and_size(int_ty, text, s_len, radix)
|
2005
|
+
# @param [FFI::Pointer(TypeRef)] int_ty
|
2006
|
+
# @param [String] text
|
2007
|
+
# @param [Integer] s_len
|
2008
|
+
# @param [Integer] radix
|
2009
|
+
# @return [FFI::Pointer(ValueRef)]
|
2010
|
+
# @scope class
|
2011
|
+
attach_function :const_int_of_string_and_size, :LLVMConstIntOfStringAndSize, [:pointer, :string, :uint, :uchar], :pointer
|
2012
|
+
|
2013
|
+
# (Not documented)
|
2014
|
+
#
|
2015
|
+
# @method const_real(real_ty, n)
|
2016
|
+
# @param [FFI::Pointer(TypeRef)] real_ty
|
2017
|
+
# @param [Float] n
|
2018
|
+
# @return [FFI::Pointer(ValueRef)]
|
2019
|
+
# @scope class
|
2020
|
+
attach_function :const_real, :LLVMConstReal, [:pointer, :double], :pointer
|
2021
|
+
|
2022
|
+
# (Not documented)
|
2023
|
+
#
|
2024
|
+
# @method const_real_of_string(real_ty, text)
|
2025
|
+
# @param [FFI::Pointer(TypeRef)] real_ty
|
2026
|
+
# @param [String] text
|
2027
|
+
# @return [FFI::Pointer(ValueRef)]
|
2028
|
+
# @scope class
|
2029
|
+
attach_function :const_real_of_string, :LLVMConstRealOfString, [:pointer, :string], :pointer
|
2030
|
+
|
2031
|
+
# (Not documented)
|
2032
|
+
#
|
2033
|
+
# @method const_real_of_string_and_size(real_ty, text, s_len)
|
2034
|
+
# @param [FFI::Pointer(TypeRef)] real_ty
|
2035
|
+
# @param [String] text
|
2036
|
+
# @param [Integer] s_len
|
2037
|
+
# @return [FFI::Pointer(ValueRef)]
|
2038
|
+
# @scope class
|
2039
|
+
attach_function :const_real_of_string_and_size, :LLVMConstRealOfStringAndSize, [:pointer, :string, :uint], :pointer
|
2040
|
+
|
2041
|
+
# (Not documented)
|
2042
|
+
#
|
2043
|
+
# @method const_int_get_z_ext_value(constant_val)
|
2044
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2045
|
+
# @return [Integer]
|
2046
|
+
# @scope class
|
2047
|
+
attach_function :const_int_get_z_ext_value, :LLVMConstIntGetZExtValue, [:pointer], :ulong_long
|
2048
|
+
|
2049
|
+
# (Not documented)
|
2050
|
+
#
|
2051
|
+
# @method const_int_get_s_ext_value(constant_val)
|
2052
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2053
|
+
# @return [Integer]
|
2054
|
+
# @scope class
|
2055
|
+
attach_function :const_int_get_s_ext_value, :LLVMConstIntGetSExtValue, [:pointer], :long_long
|
2056
|
+
|
2057
|
+
# Operations on composite constants
|
2058
|
+
#
|
2059
|
+
# @method const_string_in_context(c, str, length, dont_null_terminate)
|
2060
|
+
# @param [FFI::Pointer(ContextRef)] c
|
2061
|
+
# @param [String] str
|
2062
|
+
# @param [Integer] length
|
2063
|
+
# @param [Integer] dont_null_terminate
|
2064
|
+
# @return [FFI::Pointer(ValueRef)]
|
2065
|
+
# @scope class
|
2066
|
+
attach_function :const_string_in_context, :LLVMConstStringInContext, [:pointer, :string, :uint, :int], :pointer
|
2067
|
+
|
2068
|
+
# (Not documented)
|
2069
|
+
#
|
2070
|
+
# @method const_struct_in_context(c, constant_vals, count, packed)
|
2071
|
+
# @param [FFI::Pointer(ContextRef)] c
|
2072
|
+
# @param [FFI::Pointer(*ValueRef)] constant_vals
|
2073
|
+
# @param [Integer] count
|
2074
|
+
# @param [Integer] packed
|
2075
|
+
# @return [FFI::Pointer(ValueRef)]
|
2076
|
+
# @scope class
|
2077
|
+
attach_function :const_struct_in_context, :LLVMConstStructInContext, [:pointer, :pointer, :uint, :int], :pointer
|
2078
|
+
|
2079
|
+
# (Not documented)
|
2080
|
+
#
|
2081
|
+
# @method const_string(str, length, dont_null_terminate)
|
2082
|
+
# @param [String] str
|
2083
|
+
# @param [Integer] length
|
2084
|
+
# @param [Integer] dont_null_terminate
|
2085
|
+
# @return [FFI::Pointer(ValueRef)]
|
2086
|
+
# @scope class
|
2087
|
+
attach_function :const_string, :LLVMConstString, [:string, :uint, :int], :pointer
|
2088
|
+
|
2089
|
+
# (Not documented)
|
2090
|
+
#
|
2091
|
+
# @method const_array(element_ty, constant_vals, length)
|
2092
|
+
# @param [FFI::Pointer(TypeRef)] element_ty
|
2093
|
+
# @param [FFI::Pointer(*ValueRef)] constant_vals
|
2094
|
+
# @param [Integer] length
|
2095
|
+
# @return [FFI::Pointer(ValueRef)]
|
2096
|
+
# @scope class
|
2097
|
+
attach_function :const_array, :LLVMConstArray, [:pointer, :pointer, :uint], :pointer
|
2098
|
+
|
2099
|
+
# (Not documented)
|
2100
|
+
#
|
2101
|
+
# @method const_struct(constant_vals, count, packed)
|
2102
|
+
# @param [FFI::Pointer(*ValueRef)] constant_vals
|
2103
|
+
# @param [Integer] count
|
2104
|
+
# @param [Integer] packed
|
2105
|
+
# @return [FFI::Pointer(ValueRef)]
|
2106
|
+
# @scope class
|
2107
|
+
attach_function :const_struct, :LLVMConstStruct, [:pointer, :uint, :int], :pointer
|
2108
|
+
|
2109
|
+
# (Not documented)
|
2110
|
+
#
|
2111
|
+
# @method const_named_struct(struct_ty, constant_vals, count)
|
2112
|
+
# @param [FFI::Pointer(TypeRef)] struct_ty
|
2113
|
+
# @param [FFI::Pointer(*ValueRef)] constant_vals
|
2114
|
+
# @param [Integer] count
|
2115
|
+
# @return [FFI::Pointer(ValueRef)]
|
2116
|
+
# @scope class
|
2117
|
+
attach_function :const_named_struct, :LLVMConstNamedStruct, [:pointer, :pointer, :uint], :pointer
|
2118
|
+
|
2119
|
+
# (Not documented)
|
2120
|
+
#
|
2121
|
+
# @method const_vector(scalar_constant_vals, size)
|
2122
|
+
# @param [FFI::Pointer(*ValueRef)] scalar_constant_vals
|
2123
|
+
# @param [Integer] size
|
2124
|
+
# @return [FFI::Pointer(ValueRef)]
|
2125
|
+
# @scope class
|
2126
|
+
attach_function :const_vector, :LLVMConstVector, [:pointer, :uint], :pointer
|
2127
|
+
|
2128
|
+
# Constant expressions
|
2129
|
+
#
|
2130
|
+
# @method get_const_opcode(constant_val)
|
2131
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2132
|
+
# @return [Symbol from opcode_enum]
|
2133
|
+
# @scope class
|
2134
|
+
attach_function :get_const_opcode, :LLVMGetConstOpcode, [:pointer], :opcode
|
2135
|
+
|
2136
|
+
# (Not documented)
|
2137
|
+
#
|
2138
|
+
# @method align_of(ty)
|
2139
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2140
|
+
# @return [FFI::Pointer(ValueRef)]
|
2141
|
+
# @scope class
|
2142
|
+
attach_function :align_of, :LLVMAlignOf, [:pointer], :pointer
|
2143
|
+
|
2144
|
+
# (Not documented)
|
2145
|
+
#
|
2146
|
+
# @method size_of(ty)
|
2147
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2148
|
+
# @return [FFI::Pointer(ValueRef)]
|
2149
|
+
# @scope class
|
2150
|
+
attach_function :size_of, :LLVMSizeOf, [:pointer], :pointer
|
2151
|
+
|
2152
|
+
# (Not documented)
|
2153
|
+
#
|
2154
|
+
# @method const_neg(constant_val)
|
2155
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2156
|
+
# @return [FFI::Pointer(ValueRef)]
|
2157
|
+
# @scope class
|
2158
|
+
attach_function :const_neg, :LLVMConstNeg, [:pointer], :pointer
|
2159
|
+
|
2160
|
+
# (Not documented)
|
2161
|
+
#
|
2162
|
+
# @method const_nsw_neg(constant_val)
|
2163
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2164
|
+
# @return [FFI::Pointer(ValueRef)]
|
2165
|
+
# @scope class
|
2166
|
+
attach_function :const_nsw_neg, :LLVMConstNSWNeg, [:pointer], :pointer
|
2167
|
+
|
2168
|
+
# (Not documented)
|
2169
|
+
#
|
2170
|
+
# @method const_nuw_neg(constant_val)
|
2171
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2172
|
+
# @return [FFI::Pointer(ValueRef)]
|
2173
|
+
# @scope class
|
2174
|
+
attach_function :const_nuw_neg, :LLVMConstNUWNeg, [:pointer], :pointer
|
2175
|
+
|
2176
|
+
# (Not documented)
|
2177
|
+
#
|
2178
|
+
# @method const_f_neg(constant_val)
|
2179
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2180
|
+
# @return [FFI::Pointer(ValueRef)]
|
2181
|
+
# @scope class
|
2182
|
+
attach_function :const_f_neg, :LLVMConstFNeg, [:pointer], :pointer
|
2183
|
+
|
2184
|
+
# (Not documented)
|
2185
|
+
#
|
2186
|
+
# @method const_not(constant_val)
|
2187
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2188
|
+
# @return [FFI::Pointer(ValueRef)]
|
2189
|
+
# @scope class
|
2190
|
+
attach_function :const_not, :LLVMConstNot, [:pointer], :pointer
|
2191
|
+
|
2192
|
+
# (Not documented)
|
2193
|
+
#
|
2194
|
+
# @method const_add(lhs_constant, rhs_constant)
|
2195
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2196
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2197
|
+
# @return [FFI::Pointer(ValueRef)]
|
2198
|
+
# @scope class
|
2199
|
+
attach_function :const_add, :LLVMConstAdd, [:pointer, :pointer], :pointer
|
2200
|
+
|
2201
|
+
# (Not documented)
|
2202
|
+
#
|
2203
|
+
# @method const_nsw_add(lhs_constant, rhs_constant)
|
2204
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2205
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2206
|
+
# @return [FFI::Pointer(ValueRef)]
|
2207
|
+
# @scope class
|
2208
|
+
attach_function :const_nsw_add, :LLVMConstNSWAdd, [:pointer, :pointer], :pointer
|
2209
|
+
|
2210
|
+
# (Not documented)
|
2211
|
+
#
|
2212
|
+
# @method const_nuw_add(lhs_constant, rhs_constant)
|
2213
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2214
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2215
|
+
# @return [FFI::Pointer(ValueRef)]
|
2216
|
+
# @scope class
|
2217
|
+
attach_function :const_nuw_add, :LLVMConstNUWAdd, [:pointer, :pointer], :pointer
|
2218
|
+
|
2219
|
+
# (Not documented)
|
2220
|
+
#
|
2221
|
+
# @method const_f_add(lhs_constant, rhs_constant)
|
2222
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2223
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2224
|
+
# @return [FFI::Pointer(ValueRef)]
|
2225
|
+
# @scope class
|
2226
|
+
attach_function :const_f_add, :LLVMConstFAdd, [:pointer, :pointer], :pointer
|
2227
|
+
|
2228
|
+
# (Not documented)
|
2229
|
+
#
|
2230
|
+
# @method const_sub(lhs_constant, rhs_constant)
|
2231
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2232
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2233
|
+
# @return [FFI::Pointer(ValueRef)]
|
2234
|
+
# @scope class
|
2235
|
+
attach_function :const_sub, :LLVMConstSub, [:pointer, :pointer], :pointer
|
2236
|
+
|
2237
|
+
# (Not documented)
|
2238
|
+
#
|
2239
|
+
# @method const_nsw_sub(lhs_constant, rhs_constant)
|
2240
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2241
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2242
|
+
# @return [FFI::Pointer(ValueRef)]
|
2243
|
+
# @scope class
|
2244
|
+
attach_function :const_nsw_sub, :LLVMConstNSWSub, [:pointer, :pointer], :pointer
|
2245
|
+
|
2246
|
+
# (Not documented)
|
2247
|
+
#
|
2248
|
+
# @method const_nuw_sub(lhs_constant, rhs_constant)
|
2249
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2250
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2251
|
+
# @return [FFI::Pointer(ValueRef)]
|
2252
|
+
# @scope class
|
2253
|
+
attach_function :const_nuw_sub, :LLVMConstNUWSub, [:pointer, :pointer], :pointer
|
2254
|
+
|
2255
|
+
# (Not documented)
|
2256
|
+
#
|
2257
|
+
# @method const_f_sub(lhs_constant, rhs_constant)
|
2258
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2259
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2260
|
+
# @return [FFI::Pointer(ValueRef)]
|
2261
|
+
# @scope class
|
2262
|
+
attach_function :const_f_sub, :LLVMConstFSub, [:pointer, :pointer], :pointer
|
2263
|
+
|
2264
|
+
# (Not documented)
|
2265
|
+
#
|
2266
|
+
# @method const_mul(lhs_constant, rhs_constant)
|
2267
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2268
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2269
|
+
# @return [FFI::Pointer(ValueRef)]
|
2270
|
+
# @scope class
|
2271
|
+
attach_function :const_mul, :LLVMConstMul, [:pointer, :pointer], :pointer
|
2272
|
+
|
2273
|
+
# (Not documented)
|
2274
|
+
#
|
2275
|
+
# @method const_nsw_mul(lhs_constant, rhs_constant)
|
2276
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2277
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2278
|
+
# @return [FFI::Pointer(ValueRef)]
|
2279
|
+
# @scope class
|
2280
|
+
attach_function :const_nsw_mul, :LLVMConstNSWMul, [:pointer, :pointer], :pointer
|
2281
|
+
|
2282
|
+
# (Not documented)
|
2283
|
+
#
|
2284
|
+
# @method const_nuw_mul(lhs_constant, rhs_constant)
|
2285
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2286
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2287
|
+
# @return [FFI::Pointer(ValueRef)]
|
2288
|
+
# @scope class
|
2289
|
+
attach_function :const_nuw_mul, :LLVMConstNUWMul, [:pointer, :pointer], :pointer
|
2290
|
+
|
2291
|
+
# (Not documented)
|
2292
|
+
#
|
2293
|
+
# @method const_f_mul(lhs_constant, rhs_constant)
|
2294
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2295
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2296
|
+
# @return [FFI::Pointer(ValueRef)]
|
2297
|
+
# @scope class
|
2298
|
+
attach_function :const_f_mul, :LLVMConstFMul, [:pointer, :pointer], :pointer
|
2299
|
+
|
2300
|
+
# (Not documented)
|
2301
|
+
#
|
2302
|
+
# @method const_u_div(lhs_constant, rhs_constant)
|
2303
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2304
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2305
|
+
# @return [FFI::Pointer(ValueRef)]
|
2306
|
+
# @scope class
|
2307
|
+
attach_function :const_u_div, :LLVMConstUDiv, [:pointer, :pointer], :pointer
|
2308
|
+
|
2309
|
+
# (Not documented)
|
2310
|
+
#
|
2311
|
+
# @method const_s_div(lhs_constant, rhs_constant)
|
2312
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2313
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2314
|
+
# @return [FFI::Pointer(ValueRef)]
|
2315
|
+
# @scope class
|
2316
|
+
attach_function :const_s_div, :LLVMConstSDiv, [:pointer, :pointer], :pointer
|
2317
|
+
|
2318
|
+
# (Not documented)
|
2319
|
+
#
|
2320
|
+
# @method const_exact_s_div(lhs_constant, rhs_constant)
|
2321
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2322
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2323
|
+
# @return [FFI::Pointer(ValueRef)]
|
2324
|
+
# @scope class
|
2325
|
+
attach_function :const_exact_s_div, :LLVMConstExactSDiv, [:pointer, :pointer], :pointer
|
2326
|
+
|
2327
|
+
# (Not documented)
|
2328
|
+
#
|
2329
|
+
# @method const_f_div(lhs_constant, rhs_constant)
|
2330
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2331
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2332
|
+
# @return [FFI::Pointer(ValueRef)]
|
2333
|
+
# @scope class
|
2334
|
+
attach_function :const_f_div, :LLVMConstFDiv, [:pointer, :pointer], :pointer
|
2335
|
+
|
2336
|
+
# (Not documented)
|
2337
|
+
#
|
2338
|
+
# @method const_u_rem(lhs_constant, rhs_constant)
|
2339
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2340
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2341
|
+
# @return [FFI::Pointer(ValueRef)]
|
2342
|
+
# @scope class
|
2343
|
+
attach_function :const_u_rem, :LLVMConstURem, [:pointer, :pointer], :pointer
|
2344
|
+
|
2345
|
+
# (Not documented)
|
2346
|
+
#
|
2347
|
+
# @method const_s_rem(lhs_constant, rhs_constant)
|
2348
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2349
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2350
|
+
# @return [FFI::Pointer(ValueRef)]
|
2351
|
+
# @scope class
|
2352
|
+
attach_function :const_s_rem, :LLVMConstSRem, [:pointer, :pointer], :pointer
|
2353
|
+
|
2354
|
+
# (Not documented)
|
2355
|
+
#
|
2356
|
+
# @method const_f_rem(lhs_constant, rhs_constant)
|
2357
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2358
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2359
|
+
# @return [FFI::Pointer(ValueRef)]
|
2360
|
+
# @scope class
|
2361
|
+
attach_function :const_f_rem, :LLVMConstFRem, [:pointer, :pointer], :pointer
|
2362
|
+
|
2363
|
+
# (Not documented)
|
2364
|
+
#
|
2365
|
+
# @method const_and(lhs_constant, rhs_constant)
|
2366
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2367
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2368
|
+
# @return [FFI::Pointer(ValueRef)]
|
2369
|
+
# @scope class
|
2370
|
+
attach_function :const_and, :LLVMConstAnd, [:pointer, :pointer], :pointer
|
2371
|
+
|
2372
|
+
# (Not documented)
|
2373
|
+
#
|
2374
|
+
# @method const_or(lhs_constant, rhs_constant)
|
2375
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2376
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2377
|
+
# @return [FFI::Pointer(ValueRef)]
|
2378
|
+
# @scope class
|
2379
|
+
attach_function :const_or, :LLVMConstOr, [:pointer, :pointer], :pointer
|
2380
|
+
|
2381
|
+
# (Not documented)
|
2382
|
+
#
|
2383
|
+
# @method const_xor(lhs_constant, rhs_constant)
|
2384
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2385
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2386
|
+
# @return [FFI::Pointer(ValueRef)]
|
2387
|
+
# @scope class
|
2388
|
+
attach_function :const_xor, :LLVMConstXor, [:pointer, :pointer], :pointer
|
2389
|
+
|
2390
|
+
# (Not documented)
|
2391
|
+
#
|
2392
|
+
# @method const_i_cmp(predicate, lhs_constant, rhs_constant)
|
2393
|
+
# @param [Symbol from int_predicate_enum] predicate
|
2394
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2395
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2396
|
+
# @return [FFI::Pointer(ValueRef)]
|
2397
|
+
# @scope class
|
2398
|
+
attach_function :const_i_cmp, :LLVMConstICmp, [:int_predicate, :pointer, :pointer], :pointer
|
2399
|
+
|
2400
|
+
# (Not documented)
|
2401
|
+
#
|
2402
|
+
# @method const_f_cmp(predicate, lhs_constant, rhs_constant)
|
2403
|
+
# @param [Symbol from real_predicate_enum] predicate
|
2404
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2405
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2406
|
+
# @return [FFI::Pointer(ValueRef)]
|
2407
|
+
# @scope class
|
2408
|
+
attach_function :const_f_cmp, :LLVMConstFCmp, [:real_predicate, :pointer, :pointer], :pointer
|
2409
|
+
|
2410
|
+
# (Not documented)
|
2411
|
+
#
|
2412
|
+
# @method const_shl(lhs_constant, rhs_constant)
|
2413
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2414
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2415
|
+
# @return [FFI::Pointer(ValueRef)]
|
2416
|
+
# @scope class
|
2417
|
+
attach_function :const_shl, :LLVMConstShl, [:pointer, :pointer], :pointer
|
2418
|
+
|
2419
|
+
# (Not documented)
|
2420
|
+
#
|
2421
|
+
# @method const_l_shr(lhs_constant, rhs_constant)
|
2422
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2423
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2424
|
+
# @return [FFI::Pointer(ValueRef)]
|
2425
|
+
# @scope class
|
2426
|
+
attach_function :const_l_shr, :LLVMConstLShr, [:pointer, :pointer], :pointer
|
2427
|
+
|
2428
|
+
# (Not documented)
|
2429
|
+
#
|
2430
|
+
# @method const_a_shr(lhs_constant, rhs_constant)
|
2431
|
+
# @param [FFI::Pointer(ValueRef)] lhs_constant
|
2432
|
+
# @param [FFI::Pointer(ValueRef)] rhs_constant
|
2433
|
+
# @return [FFI::Pointer(ValueRef)]
|
2434
|
+
# @scope class
|
2435
|
+
attach_function :const_a_shr, :LLVMConstAShr, [:pointer, :pointer], :pointer
|
2436
|
+
|
2437
|
+
# (Not documented)
|
2438
|
+
#
|
2439
|
+
# @method const_gep(constant_val, constant_indices, num_indices)
|
2440
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2441
|
+
# @param [FFI::Pointer(*ValueRef)] constant_indices
|
2442
|
+
# @param [Integer] num_indices
|
2443
|
+
# @return [FFI::Pointer(ValueRef)]
|
2444
|
+
# @scope class
|
2445
|
+
attach_function :const_gep, :LLVMConstGEP, [:pointer, :pointer, :uint], :pointer
|
2446
|
+
|
2447
|
+
# (Not documented)
|
2448
|
+
#
|
2449
|
+
# @method const_in_bounds_gep(constant_val, constant_indices, num_indices)
|
2450
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2451
|
+
# @param [FFI::Pointer(*ValueRef)] constant_indices
|
2452
|
+
# @param [Integer] num_indices
|
2453
|
+
# @return [FFI::Pointer(ValueRef)]
|
2454
|
+
# @scope class
|
2455
|
+
attach_function :const_in_bounds_gep, :LLVMConstInBoundsGEP, [:pointer, :pointer, :uint], :pointer
|
2456
|
+
|
2457
|
+
# (Not documented)
|
2458
|
+
#
|
2459
|
+
# @method const_trunc(constant_val, to_type)
|
2460
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2461
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2462
|
+
# @return [FFI::Pointer(ValueRef)]
|
2463
|
+
# @scope class
|
2464
|
+
attach_function :const_trunc, :LLVMConstTrunc, [:pointer, :pointer], :pointer
|
2465
|
+
|
2466
|
+
# (Not documented)
|
2467
|
+
#
|
2468
|
+
# @method const_s_ext(constant_val, to_type)
|
2469
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2470
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2471
|
+
# @return [FFI::Pointer(ValueRef)]
|
2472
|
+
# @scope class
|
2473
|
+
attach_function :const_s_ext, :LLVMConstSExt, [:pointer, :pointer], :pointer
|
2474
|
+
|
2475
|
+
# (Not documented)
|
2476
|
+
#
|
2477
|
+
# @method const_z_ext(constant_val, to_type)
|
2478
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2479
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2480
|
+
# @return [FFI::Pointer(ValueRef)]
|
2481
|
+
# @scope class
|
2482
|
+
attach_function :const_z_ext, :LLVMConstZExt, [:pointer, :pointer], :pointer
|
2483
|
+
|
2484
|
+
# (Not documented)
|
2485
|
+
#
|
2486
|
+
# @method const_fp_trunc(constant_val, to_type)
|
2487
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2488
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2489
|
+
# @return [FFI::Pointer(ValueRef)]
|
2490
|
+
# @scope class
|
2491
|
+
attach_function :const_fp_trunc, :LLVMConstFPTrunc, [:pointer, :pointer], :pointer
|
2492
|
+
|
2493
|
+
# (Not documented)
|
2494
|
+
#
|
2495
|
+
# @method const_fp_ext(constant_val, to_type)
|
2496
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2497
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2498
|
+
# @return [FFI::Pointer(ValueRef)]
|
2499
|
+
# @scope class
|
2500
|
+
attach_function :const_fp_ext, :LLVMConstFPExt, [:pointer, :pointer], :pointer
|
2501
|
+
|
2502
|
+
# (Not documented)
|
2503
|
+
#
|
2504
|
+
# @method const_ui_to_fp(constant_val, to_type)
|
2505
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2506
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2507
|
+
# @return [FFI::Pointer(ValueRef)]
|
2508
|
+
# @scope class
|
2509
|
+
attach_function :const_ui_to_fp, :LLVMConstUIToFP, [:pointer, :pointer], :pointer
|
2510
|
+
|
2511
|
+
# (Not documented)
|
2512
|
+
#
|
2513
|
+
# @method const_si_to_fp(constant_val, to_type)
|
2514
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2515
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2516
|
+
# @return [FFI::Pointer(ValueRef)]
|
2517
|
+
# @scope class
|
2518
|
+
attach_function :const_si_to_fp, :LLVMConstSIToFP, [:pointer, :pointer], :pointer
|
2519
|
+
|
2520
|
+
# (Not documented)
|
2521
|
+
#
|
2522
|
+
# @method const_fp_to_ui(constant_val, to_type)
|
2523
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2524
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2525
|
+
# @return [FFI::Pointer(ValueRef)]
|
2526
|
+
# @scope class
|
2527
|
+
attach_function :const_fp_to_ui, :LLVMConstFPToUI, [:pointer, :pointer], :pointer
|
2528
|
+
|
2529
|
+
# (Not documented)
|
2530
|
+
#
|
2531
|
+
# @method const_fp_to_si(constant_val, to_type)
|
2532
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2533
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2534
|
+
# @return [FFI::Pointer(ValueRef)]
|
2535
|
+
# @scope class
|
2536
|
+
attach_function :const_fp_to_si, :LLVMConstFPToSI, [:pointer, :pointer], :pointer
|
2537
|
+
|
2538
|
+
# (Not documented)
|
2539
|
+
#
|
2540
|
+
# @method const_ptr_to_int(constant_val, to_type)
|
2541
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2542
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2543
|
+
# @return [FFI::Pointer(ValueRef)]
|
2544
|
+
# @scope class
|
2545
|
+
attach_function :const_ptr_to_int, :LLVMConstPtrToInt, [:pointer, :pointer], :pointer
|
2546
|
+
|
2547
|
+
# (Not documented)
|
2548
|
+
#
|
2549
|
+
# @method const_int_to_ptr(constant_val, to_type)
|
2550
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2551
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2552
|
+
# @return [FFI::Pointer(ValueRef)]
|
2553
|
+
# @scope class
|
2554
|
+
attach_function :const_int_to_ptr, :LLVMConstIntToPtr, [:pointer, :pointer], :pointer
|
2555
|
+
|
2556
|
+
# (Not documented)
|
2557
|
+
#
|
2558
|
+
# @method const_bit_cast(constant_val, to_type)
|
2559
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2560
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2561
|
+
# @return [FFI::Pointer(ValueRef)]
|
2562
|
+
# @scope class
|
2563
|
+
attach_function :const_bit_cast, :LLVMConstBitCast, [:pointer, :pointer], :pointer
|
2564
|
+
|
2565
|
+
# (Not documented)
|
2566
|
+
#
|
2567
|
+
# @method const_z_ext_or_bit_cast(constant_val, to_type)
|
2568
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2569
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2570
|
+
# @return [FFI::Pointer(ValueRef)]
|
2571
|
+
# @scope class
|
2572
|
+
attach_function :const_z_ext_or_bit_cast, :LLVMConstZExtOrBitCast, [:pointer, :pointer], :pointer
|
2573
|
+
|
2574
|
+
# (Not documented)
|
2575
|
+
#
|
2576
|
+
# @method const_s_ext_or_bit_cast(constant_val, to_type)
|
2577
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2578
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2579
|
+
# @return [FFI::Pointer(ValueRef)]
|
2580
|
+
# @scope class
|
2581
|
+
attach_function :const_s_ext_or_bit_cast, :LLVMConstSExtOrBitCast, [:pointer, :pointer], :pointer
|
2582
|
+
|
2583
|
+
# (Not documented)
|
2584
|
+
#
|
2585
|
+
# @method const_trunc_or_bit_cast(constant_val, to_type)
|
2586
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2587
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2588
|
+
# @return [FFI::Pointer(ValueRef)]
|
2589
|
+
# @scope class
|
2590
|
+
attach_function :const_trunc_or_bit_cast, :LLVMConstTruncOrBitCast, [:pointer, :pointer], :pointer
|
2591
|
+
|
2592
|
+
# (Not documented)
|
2593
|
+
#
|
2594
|
+
# @method const_pointer_cast(constant_val, to_type)
|
2595
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2596
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2597
|
+
# @return [FFI::Pointer(ValueRef)]
|
2598
|
+
# @scope class
|
2599
|
+
attach_function :const_pointer_cast, :LLVMConstPointerCast, [:pointer, :pointer], :pointer
|
2600
|
+
|
2601
|
+
# (Not documented)
|
2602
|
+
#
|
2603
|
+
# @method const_int_cast(constant_val, to_type, is_signed)
|
2604
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2605
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2606
|
+
# @param [Integer] is_signed
|
2607
|
+
# @return [FFI::Pointer(ValueRef)]
|
2608
|
+
# @scope class
|
2609
|
+
attach_function :const_int_cast, :LLVMConstIntCast, [:pointer, :pointer, :int], :pointer
|
2610
|
+
|
2611
|
+
# (Not documented)
|
2612
|
+
#
|
2613
|
+
# @method const_fp_cast(constant_val, to_type)
|
2614
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2615
|
+
# @param [FFI::Pointer(TypeRef)] to_type
|
2616
|
+
# @return [FFI::Pointer(ValueRef)]
|
2617
|
+
# @scope class
|
2618
|
+
attach_function :const_fp_cast, :LLVMConstFPCast, [:pointer, :pointer], :pointer
|
2619
|
+
|
2620
|
+
# (Not documented)
|
2621
|
+
#
|
2622
|
+
# @method const_select(constant_condition, constant_if_true, constant_if_false)
|
2623
|
+
# @param [FFI::Pointer(ValueRef)] constant_condition
|
2624
|
+
# @param [FFI::Pointer(ValueRef)] constant_if_true
|
2625
|
+
# @param [FFI::Pointer(ValueRef)] constant_if_false
|
2626
|
+
# @return [FFI::Pointer(ValueRef)]
|
2627
|
+
# @scope class
|
2628
|
+
attach_function :const_select, :LLVMConstSelect, [:pointer, :pointer, :pointer], :pointer
|
2629
|
+
|
2630
|
+
# (Not documented)
|
2631
|
+
#
|
2632
|
+
# @method const_extract_element(vector_constant, index_constant)
|
2633
|
+
# @param [FFI::Pointer(ValueRef)] vector_constant
|
2634
|
+
# @param [FFI::Pointer(ValueRef)] index_constant
|
2635
|
+
# @return [FFI::Pointer(ValueRef)]
|
2636
|
+
# @scope class
|
2637
|
+
attach_function :const_extract_element, :LLVMConstExtractElement, [:pointer, :pointer], :pointer
|
2638
|
+
|
2639
|
+
# (Not documented)
|
2640
|
+
#
|
2641
|
+
# @method const_insert_element(vector_constant, element_value_constant, index_constant)
|
2642
|
+
# @param [FFI::Pointer(ValueRef)] vector_constant
|
2643
|
+
# @param [FFI::Pointer(ValueRef)] element_value_constant
|
2644
|
+
# @param [FFI::Pointer(ValueRef)] index_constant
|
2645
|
+
# @return [FFI::Pointer(ValueRef)]
|
2646
|
+
# @scope class
|
2647
|
+
attach_function :const_insert_element, :LLVMConstInsertElement, [:pointer, :pointer, :pointer], :pointer
|
2648
|
+
|
2649
|
+
# (Not documented)
|
2650
|
+
#
|
2651
|
+
# @method const_shuffle_vector(vector_a_constant, vector_b_constant, mask_constant)
|
2652
|
+
# @param [FFI::Pointer(ValueRef)] vector_a_constant
|
2653
|
+
# @param [FFI::Pointer(ValueRef)] vector_b_constant
|
2654
|
+
# @param [FFI::Pointer(ValueRef)] mask_constant
|
2655
|
+
# @return [FFI::Pointer(ValueRef)]
|
2656
|
+
# @scope class
|
2657
|
+
attach_function :const_shuffle_vector, :LLVMConstShuffleVector, [:pointer, :pointer, :pointer], :pointer
|
2658
|
+
|
2659
|
+
# (Not documented)
|
2660
|
+
#
|
2661
|
+
# @method const_extract_value(agg_constant, idx_list, num_idx)
|
2662
|
+
# @param [FFI::Pointer(ValueRef)] agg_constant
|
2663
|
+
# @param [FFI::Pointer(*UInt)] idx_list
|
2664
|
+
# @param [Integer] num_idx
|
2665
|
+
# @return [FFI::Pointer(ValueRef)]
|
2666
|
+
# @scope class
|
2667
|
+
attach_function :const_extract_value, :LLVMConstExtractValue, [:pointer, :pointer, :uint], :pointer
|
2668
|
+
|
2669
|
+
# (Not documented)
|
2670
|
+
#
|
2671
|
+
# @method const_insert_value(agg_constant, element_value_constant, idx_list, num_idx)
|
2672
|
+
# @param [FFI::Pointer(ValueRef)] agg_constant
|
2673
|
+
# @param [FFI::Pointer(ValueRef)] element_value_constant
|
2674
|
+
# @param [FFI::Pointer(*UInt)] idx_list
|
2675
|
+
# @param [Integer] num_idx
|
2676
|
+
# @return [FFI::Pointer(ValueRef)]
|
2677
|
+
# @scope class
|
2678
|
+
attach_function :const_insert_value, :LLVMConstInsertValue, [:pointer, :pointer, :pointer, :uint], :pointer
|
2679
|
+
|
2680
|
+
# (Not documented)
|
2681
|
+
#
|
2682
|
+
# @method const_inline_asm(ty, asm_string, constraints, has_side_effects, is_align_stack)
|
2683
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2684
|
+
# @param [String] asm_string
|
2685
|
+
# @param [String] constraints
|
2686
|
+
# @param [Integer] has_side_effects
|
2687
|
+
# @param [Integer] is_align_stack
|
2688
|
+
# @return [FFI::Pointer(ValueRef)]
|
2689
|
+
# @scope class
|
2690
|
+
attach_function :const_inline_asm, :LLVMConstInlineAsm, [:pointer, :string, :string, :int, :int], :pointer
|
2691
|
+
|
2692
|
+
# (Not documented)
|
2693
|
+
#
|
2694
|
+
# @method block_address(f, bb)
|
2695
|
+
# @param [FFI::Pointer(ValueRef)] f
|
2696
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
2697
|
+
# @return [FFI::Pointer(ValueRef)]
|
2698
|
+
# @scope class
|
2699
|
+
attach_function :block_address, :LLVMBlockAddress, [:pointer, :pointer], :pointer
|
2700
|
+
|
2701
|
+
# Operations on global variables, functions, and aliases (globals)
|
2702
|
+
#
|
2703
|
+
# @method get_global_parent(global)
|
2704
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2705
|
+
# @return [FFI::Pointer(ModuleRef)]
|
2706
|
+
# @scope class
|
2707
|
+
attach_function :get_global_parent, :LLVMGetGlobalParent, [:pointer], :pointer
|
2708
|
+
|
2709
|
+
# (Not documented)
|
2710
|
+
#
|
2711
|
+
# @method is_declaration(global)
|
2712
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2713
|
+
# @return [Integer]
|
2714
|
+
# @scope class
|
2715
|
+
attach_function :is_declaration, :LLVMIsDeclaration, [:pointer], :int
|
2716
|
+
|
2717
|
+
# (Not documented)
|
2718
|
+
#
|
2719
|
+
# @method get_linkage(global)
|
2720
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2721
|
+
# @return [Symbol from linkage_enum]
|
2722
|
+
# @scope class
|
2723
|
+
attach_function :get_linkage, :LLVMGetLinkage, [:pointer], :linkage
|
2724
|
+
|
2725
|
+
# (Not documented)
|
2726
|
+
#
|
2727
|
+
# @method set_linkage(global, linkage)
|
2728
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2729
|
+
# @param [Symbol from linkage_enum] linkage
|
2730
|
+
# @return [nil]
|
2731
|
+
# @scope class
|
2732
|
+
attach_function :set_linkage, :LLVMSetLinkage, [:pointer, :linkage], :void
|
2733
|
+
|
2734
|
+
# (Not documented)
|
2735
|
+
#
|
2736
|
+
# @method get_section(global)
|
2737
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2738
|
+
# @return [String]
|
2739
|
+
# @scope class
|
2740
|
+
attach_function :get_section, :LLVMGetSection, [:pointer], :string
|
2741
|
+
|
2742
|
+
# (Not documented)
|
2743
|
+
#
|
2744
|
+
# @method set_section(global, section)
|
2745
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2746
|
+
# @param [String] section
|
2747
|
+
# @return [nil]
|
2748
|
+
# @scope class
|
2749
|
+
attach_function :set_section, :LLVMSetSection, [:pointer, :string], :void
|
2750
|
+
|
2751
|
+
# (Not documented)
|
2752
|
+
#
|
2753
|
+
# @method get_visibility(global)
|
2754
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2755
|
+
# @return [Symbol from visibility_enum]
|
2756
|
+
# @scope class
|
2757
|
+
attach_function :get_visibility, :LLVMGetVisibility, [:pointer], :visibility
|
2758
|
+
|
2759
|
+
# (Not documented)
|
2760
|
+
#
|
2761
|
+
# @method set_visibility(global, viz)
|
2762
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2763
|
+
# @param [Symbol from visibility_enum] viz
|
2764
|
+
# @return [nil]
|
2765
|
+
# @scope class
|
2766
|
+
attach_function :set_visibility, :LLVMSetVisibility, [:pointer, :visibility], :void
|
2767
|
+
|
2768
|
+
# (Not documented)
|
2769
|
+
#
|
2770
|
+
# @method get_alignment(global)
|
2771
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2772
|
+
# @return [Integer]
|
2773
|
+
# @scope class
|
2774
|
+
attach_function :get_alignment, :LLVMGetAlignment, [:pointer], :uint
|
2775
|
+
|
2776
|
+
# (Not documented)
|
2777
|
+
#
|
2778
|
+
# @method set_alignment(global, bytes)
|
2779
|
+
# @param [FFI::Pointer(ValueRef)] global
|
2780
|
+
# @param [Integer] bytes
|
2781
|
+
# @return [nil]
|
2782
|
+
# @scope class
|
2783
|
+
attach_function :set_alignment, :LLVMSetAlignment, [:pointer, :uint], :void
|
2784
|
+
|
2785
|
+
# Operations on global variables
|
2786
|
+
#
|
2787
|
+
# @method add_global(m, ty, name)
|
2788
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2789
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2790
|
+
# @param [String] name
|
2791
|
+
# @return [FFI::Pointer(ValueRef)]
|
2792
|
+
# @scope class
|
2793
|
+
attach_function :add_global, :LLVMAddGlobal, [:pointer, :pointer, :string], :pointer
|
2794
|
+
|
2795
|
+
# (Not documented)
|
2796
|
+
#
|
2797
|
+
# @method add_global_in_address_space(m, ty, name, address_space)
|
2798
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2799
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2800
|
+
# @param [String] name
|
2801
|
+
# @param [Integer] address_space
|
2802
|
+
# @return [FFI::Pointer(ValueRef)]
|
2803
|
+
# @scope class
|
2804
|
+
attach_function :add_global_in_address_space, :LLVMAddGlobalInAddressSpace, [:pointer, :pointer, :string, :uint], :pointer
|
2805
|
+
|
2806
|
+
# (Not documented)
|
2807
|
+
#
|
2808
|
+
# @method get_named_global(m, name)
|
2809
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2810
|
+
# @param [String] name
|
2811
|
+
# @return [FFI::Pointer(ValueRef)]
|
2812
|
+
# @scope class
|
2813
|
+
attach_function :get_named_global, :LLVMGetNamedGlobal, [:pointer, :string], :pointer
|
2814
|
+
|
2815
|
+
# (Not documented)
|
2816
|
+
#
|
2817
|
+
# @method get_first_global(m)
|
2818
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2819
|
+
# @return [FFI::Pointer(ValueRef)]
|
2820
|
+
# @scope class
|
2821
|
+
attach_function :get_first_global, :LLVMGetFirstGlobal, [:pointer], :pointer
|
2822
|
+
|
2823
|
+
# (Not documented)
|
2824
|
+
#
|
2825
|
+
# @method get_last_global(m)
|
2826
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2827
|
+
# @return [FFI::Pointer(ValueRef)]
|
2828
|
+
# @scope class
|
2829
|
+
attach_function :get_last_global, :LLVMGetLastGlobal, [:pointer], :pointer
|
2830
|
+
|
2831
|
+
# (Not documented)
|
2832
|
+
#
|
2833
|
+
# @method get_next_global(global_var)
|
2834
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2835
|
+
# @return [FFI::Pointer(ValueRef)]
|
2836
|
+
# @scope class
|
2837
|
+
attach_function :get_next_global, :LLVMGetNextGlobal, [:pointer], :pointer
|
2838
|
+
|
2839
|
+
# (Not documented)
|
2840
|
+
#
|
2841
|
+
# @method get_previous_global(global_var)
|
2842
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2843
|
+
# @return [FFI::Pointer(ValueRef)]
|
2844
|
+
# @scope class
|
2845
|
+
attach_function :get_previous_global, :LLVMGetPreviousGlobal, [:pointer], :pointer
|
2846
|
+
|
2847
|
+
# (Not documented)
|
2848
|
+
#
|
2849
|
+
# @method delete_global(global_var)
|
2850
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2851
|
+
# @return [nil]
|
2852
|
+
# @scope class
|
2853
|
+
attach_function :delete_global, :LLVMDeleteGlobal, [:pointer], :void
|
2854
|
+
|
2855
|
+
# (Not documented)
|
2856
|
+
#
|
2857
|
+
# @method get_initializer(global_var)
|
2858
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2859
|
+
# @return [FFI::Pointer(ValueRef)]
|
2860
|
+
# @scope class
|
2861
|
+
attach_function :get_initializer, :LLVMGetInitializer, [:pointer], :pointer
|
2862
|
+
|
2863
|
+
# (Not documented)
|
2864
|
+
#
|
2865
|
+
# @method set_initializer(global_var, constant_val)
|
2866
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2867
|
+
# @param [FFI::Pointer(ValueRef)] constant_val
|
2868
|
+
# @return [nil]
|
2869
|
+
# @scope class
|
2870
|
+
attach_function :set_initializer, :LLVMSetInitializer, [:pointer, :pointer], :void
|
2871
|
+
|
2872
|
+
# (Not documented)
|
2873
|
+
#
|
2874
|
+
# @method is_thread_local(global_var)
|
2875
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2876
|
+
# @return [Integer]
|
2877
|
+
# @scope class
|
2878
|
+
attach_function :is_thread_local, :LLVMIsThreadLocal, [:pointer], :int
|
2879
|
+
|
2880
|
+
# (Not documented)
|
2881
|
+
#
|
2882
|
+
# @method set_thread_local(global_var, is_thread_local)
|
2883
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2884
|
+
# @param [Integer] is_thread_local
|
2885
|
+
# @return [nil]
|
2886
|
+
# @scope class
|
2887
|
+
attach_function :set_thread_local, :LLVMSetThreadLocal, [:pointer, :int], :void
|
2888
|
+
|
2889
|
+
# (Not documented)
|
2890
|
+
#
|
2891
|
+
# @method is_global_constant(global_var)
|
2892
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2893
|
+
# @return [Integer]
|
2894
|
+
# @scope class
|
2895
|
+
attach_function :is_global_constant, :LLVMIsGlobalConstant, [:pointer], :int
|
2896
|
+
|
2897
|
+
# (Not documented)
|
2898
|
+
#
|
2899
|
+
# @method set_global_constant(global_var, is_constant)
|
2900
|
+
# @param [FFI::Pointer(ValueRef)] global_var
|
2901
|
+
# @param [Integer] is_constant
|
2902
|
+
# @return [nil]
|
2903
|
+
# @scope class
|
2904
|
+
attach_function :set_global_constant, :LLVMSetGlobalConstant, [:pointer, :int], :void
|
2905
|
+
|
2906
|
+
# Operations on aliases
|
2907
|
+
#
|
2908
|
+
# @method add_alias(m, ty, aliasee, name)
|
2909
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2910
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
2911
|
+
# @param [FFI::Pointer(ValueRef)] aliasee
|
2912
|
+
# @param [String] name
|
2913
|
+
# @return [FFI::Pointer(ValueRef)]
|
2914
|
+
# @scope class
|
2915
|
+
attach_function :add_alias, :LLVMAddAlias, [:pointer, :pointer, :pointer, :string], :pointer
|
2916
|
+
|
2917
|
+
# Operations on functions
|
2918
|
+
#
|
2919
|
+
# @method add_function(m, name, function_ty)
|
2920
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2921
|
+
# @param [String] name
|
2922
|
+
# @param [FFI::Pointer(TypeRef)] function_ty
|
2923
|
+
# @return [FFI::Pointer(ValueRef)]
|
2924
|
+
# @scope class
|
2925
|
+
attach_function :add_function, :LLVMAddFunction, [:pointer, :string, :pointer], :pointer
|
2926
|
+
|
2927
|
+
# (Not documented)
|
2928
|
+
#
|
2929
|
+
# @method get_named_function(m, name)
|
2930
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2931
|
+
# @param [String] name
|
2932
|
+
# @return [FFI::Pointer(ValueRef)]
|
2933
|
+
# @scope class
|
2934
|
+
attach_function :get_named_function, :LLVMGetNamedFunction, [:pointer, :string], :pointer
|
2935
|
+
|
2936
|
+
# (Not documented)
|
2937
|
+
#
|
2938
|
+
# @method get_first_function(m)
|
2939
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2940
|
+
# @return [FFI::Pointer(ValueRef)]
|
2941
|
+
# @scope class
|
2942
|
+
attach_function :get_first_function, :LLVMGetFirstFunction, [:pointer], :pointer
|
2943
|
+
|
2944
|
+
# (Not documented)
|
2945
|
+
#
|
2946
|
+
# @method get_last_function(m)
|
2947
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
2948
|
+
# @return [FFI::Pointer(ValueRef)]
|
2949
|
+
# @scope class
|
2950
|
+
attach_function :get_last_function, :LLVMGetLastFunction, [:pointer], :pointer
|
2951
|
+
|
2952
|
+
# (Not documented)
|
2953
|
+
#
|
2954
|
+
# @method get_next_function(fn)
|
2955
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2956
|
+
# @return [FFI::Pointer(ValueRef)]
|
2957
|
+
# @scope class
|
2958
|
+
attach_function :get_next_function, :LLVMGetNextFunction, [:pointer], :pointer
|
2959
|
+
|
2960
|
+
# (Not documented)
|
2961
|
+
#
|
2962
|
+
# @method get_previous_function(fn)
|
2963
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2964
|
+
# @return [FFI::Pointer(ValueRef)]
|
2965
|
+
# @scope class
|
2966
|
+
attach_function :get_previous_function, :LLVMGetPreviousFunction, [:pointer], :pointer
|
2967
|
+
|
2968
|
+
# (Not documented)
|
2969
|
+
#
|
2970
|
+
# @method delete_function(fn)
|
2971
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2972
|
+
# @return [nil]
|
2973
|
+
# @scope class
|
2974
|
+
attach_function :delete_function, :LLVMDeleteFunction, [:pointer], :void
|
2975
|
+
|
2976
|
+
# (Not documented)
|
2977
|
+
#
|
2978
|
+
# @method get_intrinsic_id(fn)
|
2979
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2980
|
+
# @return [Integer]
|
2981
|
+
# @scope class
|
2982
|
+
attach_function :get_intrinsic_id, :LLVMGetIntrinsicID, [:pointer], :uint
|
2983
|
+
|
2984
|
+
# (Not documented)
|
2985
|
+
#
|
2986
|
+
# @method get_function_call_conv(fn)
|
2987
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2988
|
+
# @return [Integer]
|
2989
|
+
# @scope class
|
2990
|
+
attach_function :get_function_call_conv, :LLVMGetFunctionCallConv, [:pointer], :uint
|
2991
|
+
|
2992
|
+
# (Not documented)
|
2993
|
+
#
|
2994
|
+
# @method set_function_call_conv(fn, cc)
|
2995
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
2996
|
+
# @param [Integer] cc
|
2997
|
+
# @return [nil]
|
2998
|
+
# @scope class
|
2999
|
+
attach_function :set_function_call_conv, :LLVMSetFunctionCallConv, [:pointer, :uint], :void
|
3000
|
+
|
3001
|
+
# (Not documented)
|
3002
|
+
#
|
3003
|
+
# @method get_gc(fn)
|
3004
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3005
|
+
# @return [String]
|
3006
|
+
# @scope class
|
3007
|
+
attach_function :get_gc, :LLVMGetGC, [:pointer], :string
|
3008
|
+
|
3009
|
+
# (Not documented)
|
3010
|
+
#
|
3011
|
+
# @method set_gc(fn, name)
|
3012
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3013
|
+
# @param [String] name
|
3014
|
+
# @return [nil]
|
3015
|
+
# @scope class
|
3016
|
+
attach_function :set_gc, :LLVMSetGC, [:pointer, :string], :void
|
3017
|
+
|
3018
|
+
# (Not documented)
|
3019
|
+
#
|
3020
|
+
# @method add_function_attr(fn, pa)
|
3021
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3022
|
+
# @param [Symbol from attribute_enum] pa
|
3023
|
+
# @return [nil]
|
3024
|
+
# @scope class
|
3025
|
+
attach_function :add_function_attr, :LLVMAddFunctionAttr, [:pointer, :attribute], :void
|
3026
|
+
|
3027
|
+
# (Not documented)
|
3028
|
+
#
|
3029
|
+
# @method get_function_attr(fn)
|
3030
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3031
|
+
# @return [Symbol from attribute_enum]
|
3032
|
+
# @scope class
|
3033
|
+
attach_function :get_function_attr, :LLVMGetFunctionAttr, [:pointer], :attribute
|
3034
|
+
|
3035
|
+
# (Not documented)
|
3036
|
+
#
|
3037
|
+
# @method remove_function_attr(fn, pa)
|
3038
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3039
|
+
# @param [Symbol from attribute_enum] pa
|
3040
|
+
# @return [nil]
|
3041
|
+
# @scope class
|
3042
|
+
attach_function :remove_function_attr, :LLVMRemoveFunctionAttr, [:pointer, :attribute], :void
|
3043
|
+
|
3044
|
+
# Operations on parameters
|
3045
|
+
#
|
3046
|
+
# @method count_params(fn)
|
3047
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3048
|
+
# @return [Integer]
|
3049
|
+
# @scope class
|
3050
|
+
attach_function :count_params, :LLVMCountParams, [:pointer], :uint
|
3051
|
+
|
3052
|
+
# (Not documented)
|
3053
|
+
#
|
3054
|
+
# @method get_params(fn, params)
|
3055
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3056
|
+
# @param [FFI::Pointer(*ValueRef)] params
|
3057
|
+
# @return [nil]
|
3058
|
+
# @scope class
|
3059
|
+
attach_function :get_params, :LLVMGetParams, [:pointer, :pointer], :void
|
3060
|
+
|
3061
|
+
# (Not documented)
|
3062
|
+
#
|
3063
|
+
# @method get_param(fn, index)
|
3064
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3065
|
+
# @param [Integer] index
|
3066
|
+
# @return [FFI::Pointer(ValueRef)]
|
3067
|
+
# @scope class
|
3068
|
+
attach_function :get_param, :LLVMGetParam, [:pointer, :uint], :pointer
|
3069
|
+
|
3070
|
+
# (Not documented)
|
3071
|
+
#
|
3072
|
+
# @method get_param_parent(inst)
|
3073
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3074
|
+
# @return [FFI::Pointer(ValueRef)]
|
3075
|
+
# @scope class
|
3076
|
+
attach_function :get_param_parent, :LLVMGetParamParent, [:pointer], :pointer
|
3077
|
+
|
3078
|
+
# (Not documented)
|
3079
|
+
#
|
3080
|
+
# @method get_first_param(fn)
|
3081
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3082
|
+
# @return [FFI::Pointer(ValueRef)]
|
3083
|
+
# @scope class
|
3084
|
+
attach_function :get_first_param, :LLVMGetFirstParam, [:pointer], :pointer
|
3085
|
+
|
3086
|
+
# (Not documented)
|
3087
|
+
#
|
3088
|
+
# @method get_last_param(fn)
|
3089
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3090
|
+
# @return [FFI::Pointer(ValueRef)]
|
3091
|
+
# @scope class
|
3092
|
+
attach_function :get_last_param, :LLVMGetLastParam, [:pointer], :pointer
|
3093
|
+
|
3094
|
+
# (Not documented)
|
3095
|
+
#
|
3096
|
+
# @method get_next_param(arg)
|
3097
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3098
|
+
# @return [FFI::Pointer(ValueRef)]
|
3099
|
+
# @scope class
|
3100
|
+
attach_function :get_next_param, :LLVMGetNextParam, [:pointer], :pointer
|
3101
|
+
|
3102
|
+
# (Not documented)
|
3103
|
+
#
|
3104
|
+
# @method get_previous_param(arg)
|
3105
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3106
|
+
# @return [FFI::Pointer(ValueRef)]
|
3107
|
+
# @scope class
|
3108
|
+
attach_function :get_previous_param, :LLVMGetPreviousParam, [:pointer], :pointer
|
3109
|
+
|
3110
|
+
# (Not documented)
|
3111
|
+
#
|
3112
|
+
# @method add_attribute(arg, pa)
|
3113
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3114
|
+
# @param [Symbol from attribute_enum] pa
|
3115
|
+
# @return [nil]
|
3116
|
+
# @scope class
|
3117
|
+
attach_function :add_attribute, :LLVMAddAttribute, [:pointer, :attribute], :void
|
3118
|
+
|
3119
|
+
# (Not documented)
|
3120
|
+
#
|
3121
|
+
# @method remove_attribute(arg, pa)
|
3122
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3123
|
+
# @param [Symbol from attribute_enum] pa
|
3124
|
+
# @return [nil]
|
3125
|
+
# @scope class
|
3126
|
+
attach_function :remove_attribute, :LLVMRemoveAttribute, [:pointer, :attribute], :void
|
3127
|
+
|
3128
|
+
# (Not documented)
|
3129
|
+
#
|
3130
|
+
# @method get_attribute(arg)
|
3131
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3132
|
+
# @return [Symbol from attribute_enum]
|
3133
|
+
# @scope class
|
3134
|
+
attach_function :get_attribute, :LLVMGetAttribute, [:pointer], :attribute
|
3135
|
+
|
3136
|
+
# (Not documented)
|
3137
|
+
#
|
3138
|
+
# @method set_param_alignment(arg, align)
|
3139
|
+
# @param [FFI::Pointer(ValueRef)] arg
|
3140
|
+
# @param [Integer] align
|
3141
|
+
# @return [nil]
|
3142
|
+
# @scope class
|
3143
|
+
attach_function :set_param_alignment, :LLVMSetParamAlignment, [:pointer, :uint], :void
|
3144
|
+
|
3145
|
+
# Operations on basic blocks
|
3146
|
+
#
|
3147
|
+
# @method basic_block_as_value(bb)
|
3148
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3149
|
+
# @return [FFI::Pointer(ValueRef)]
|
3150
|
+
# @scope class
|
3151
|
+
attach_function :basic_block_as_value, :LLVMBasicBlockAsValue, [:pointer], :pointer
|
3152
|
+
|
3153
|
+
# (Not documented)
|
3154
|
+
#
|
3155
|
+
# @method value_is_basic_block(val)
|
3156
|
+
# @param [FFI::Pointer(ValueRef)] val
|
3157
|
+
# @return [Integer]
|
3158
|
+
# @scope class
|
3159
|
+
attach_function :value_is_basic_block, :LLVMValueIsBasicBlock, [:pointer], :int
|
3160
|
+
|
3161
|
+
# (Not documented)
|
3162
|
+
#
|
3163
|
+
# @method value_as_basic_block(val)
|
3164
|
+
# @param [FFI::Pointer(ValueRef)] val
|
3165
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3166
|
+
# @scope class
|
3167
|
+
attach_function :value_as_basic_block, :LLVMValueAsBasicBlock, [:pointer], :pointer
|
3168
|
+
|
3169
|
+
# (Not documented)
|
3170
|
+
#
|
3171
|
+
# @method get_basic_block_parent(bb)
|
3172
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3173
|
+
# @return [FFI::Pointer(ValueRef)]
|
3174
|
+
# @scope class
|
3175
|
+
attach_function :get_basic_block_parent, :LLVMGetBasicBlockParent, [:pointer], :pointer
|
3176
|
+
|
3177
|
+
# (Not documented)
|
3178
|
+
#
|
3179
|
+
# @method get_basic_block_terminator(bb)
|
3180
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3181
|
+
# @return [FFI::Pointer(ValueRef)]
|
3182
|
+
# @scope class
|
3183
|
+
attach_function :get_basic_block_terminator, :LLVMGetBasicBlockTerminator, [:pointer], :pointer
|
3184
|
+
|
3185
|
+
# (Not documented)
|
3186
|
+
#
|
3187
|
+
# @method count_basic_blocks(fn)
|
3188
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3189
|
+
# @return [Integer]
|
3190
|
+
# @scope class
|
3191
|
+
attach_function :count_basic_blocks, :LLVMCountBasicBlocks, [:pointer], :uint
|
3192
|
+
|
3193
|
+
# (Not documented)
|
3194
|
+
#
|
3195
|
+
# @method get_basic_blocks(fn, basic_blocks)
|
3196
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3197
|
+
# @param [FFI::Pointer(*BasicBlockRef)] basic_blocks
|
3198
|
+
# @return [nil]
|
3199
|
+
# @scope class
|
3200
|
+
attach_function :get_basic_blocks, :LLVMGetBasicBlocks, [:pointer, :pointer], :void
|
3201
|
+
|
3202
|
+
# (Not documented)
|
3203
|
+
#
|
3204
|
+
# @method get_first_basic_block(fn)
|
3205
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3206
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3207
|
+
# @scope class
|
3208
|
+
attach_function :get_first_basic_block, :LLVMGetFirstBasicBlock, [:pointer], :pointer
|
3209
|
+
|
3210
|
+
# (Not documented)
|
3211
|
+
#
|
3212
|
+
# @method get_last_basic_block(fn)
|
3213
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3214
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3215
|
+
# @scope class
|
3216
|
+
attach_function :get_last_basic_block, :LLVMGetLastBasicBlock, [:pointer], :pointer
|
3217
|
+
|
3218
|
+
# (Not documented)
|
3219
|
+
#
|
3220
|
+
# @method get_next_basic_block(bb)
|
3221
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3222
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3223
|
+
# @scope class
|
3224
|
+
attach_function :get_next_basic_block, :LLVMGetNextBasicBlock, [:pointer], :pointer
|
3225
|
+
|
3226
|
+
# (Not documented)
|
3227
|
+
#
|
3228
|
+
# @method get_previous_basic_block(bb)
|
3229
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3230
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3231
|
+
# @scope class
|
3232
|
+
attach_function :get_previous_basic_block, :LLVMGetPreviousBasicBlock, [:pointer], :pointer
|
3233
|
+
|
3234
|
+
# (Not documented)
|
3235
|
+
#
|
3236
|
+
# @method get_entry_basic_block(fn)
|
3237
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3238
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3239
|
+
# @scope class
|
3240
|
+
attach_function :get_entry_basic_block, :LLVMGetEntryBasicBlock, [:pointer], :pointer
|
3241
|
+
|
3242
|
+
# (Not documented)
|
3243
|
+
#
|
3244
|
+
# @method append_basic_block_in_context(c, fn, name)
|
3245
|
+
# @param [FFI::Pointer(ContextRef)] c
|
3246
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3247
|
+
# @param [String] name
|
3248
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3249
|
+
# @scope class
|
3250
|
+
attach_function :append_basic_block_in_context, :LLVMAppendBasicBlockInContext, [:pointer, :pointer, :string], :pointer
|
3251
|
+
|
3252
|
+
# (Not documented)
|
3253
|
+
#
|
3254
|
+
# @method insert_basic_block_in_context(c, bb, name)
|
3255
|
+
# @param [FFI::Pointer(ContextRef)] c
|
3256
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3257
|
+
# @param [String] name
|
3258
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3259
|
+
# @scope class
|
3260
|
+
attach_function :insert_basic_block_in_context, :LLVMInsertBasicBlockInContext, [:pointer, :pointer, :string], :pointer
|
3261
|
+
|
3262
|
+
# (Not documented)
|
3263
|
+
#
|
3264
|
+
# @method append_basic_block(fn, name)
|
3265
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3266
|
+
# @param [String] name
|
3267
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3268
|
+
# @scope class
|
3269
|
+
attach_function :append_basic_block, :LLVMAppendBasicBlock, [:pointer, :string], :pointer
|
3270
|
+
|
3271
|
+
# (Not documented)
|
3272
|
+
#
|
3273
|
+
# @method insert_basic_block(insert_before_bb, name)
|
3274
|
+
# @param [FFI::Pointer(BasicBlockRef)] insert_before_bb
|
3275
|
+
# @param [String] name
|
3276
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3277
|
+
# @scope class
|
3278
|
+
attach_function :insert_basic_block, :LLVMInsertBasicBlock, [:pointer, :string], :pointer
|
3279
|
+
|
3280
|
+
# (Not documented)
|
3281
|
+
#
|
3282
|
+
# @method delete_basic_block(bb)
|
3283
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3284
|
+
# @return [nil]
|
3285
|
+
# @scope class
|
3286
|
+
attach_function :delete_basic_block, :LLVMDeleteBasicBlock, [:pointer], :void
|
3287
|
+
|
3288
|
+
# (Not documented)
|
3289
|
+
#
|
3290
|
+
# @method remove_basic_block_from_parent(bb)
|
3291
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3292
|
+
# @return [nil]
|
3293
|
+
# @scope class
|
3294
|
+
attach_function :remove_basic_block_from_parent, :LLVMRemoveBasicBlockFromParent, [:pointer], :void
|
3295
|
+
|
3296
|
+
# (Not documented)
|
3297
|
+
#
|
3298
|
+
# @method move_basic_block_before(bb, move_pos)
|
3299
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3300
|
+
# @param [FFI::Pointer(BasicBlockRef)] move_pos
|
3301
|
+
# @return [nil]
|
3302
|
+
# @scope class
|
3303
|
+
attach_function :move_basic_block_before, :LLVMMoveBasicBlockBefore, [:pointer, :pointer], :void
|
3304
|
+
|
3305
|
+
# (Not documented)
|
3306
|
+
#
|
3307
|
+
# @method move_basic_block_after(bb, move_pos)
|
3308
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3309
|
+
# @param [FFI::Pointer(BasicBlockRef)] move_pos
|
3310
|
+
# @return [nil]
|
3311
|
+
# @scope class
|
3312
|
+
attach_function :move_basic_block_after, :LLVMMoveBasicBlockAfter, [:pointer, :pointer], :void
|
3313
|
+
|
3314
|
+
# (Not documented)
|
3315
|
+
#
|
3316
|
+
# @method get_first_instruction(bb)
|
3317
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3318
|
+
# @return [FFI::Pointer(ValueRef)]
|
3319
|
+
# @scope class
|
3320
|
+
attach_function :get_first_instruction, :LLVMGetFirstInstruction, [:pointer], :pointer
|
3321
|
+
|
3322
|
+
# (Not documented)
|
3323
|
+
#
|
3324
|
+
# @method get_last_instruction(bb)
|
3325
|
+
# @param [FFI::Pointer(BasicBlockRef)] bb
|
3326
|
+
# @return [FFI::Pointer(ValueRef)]
|
3327
|
+
# @scope class
|
3328
|
+
attach_function :get_last_instruction, :LLVMGetLastInstruction, [:pointer], :pointer
|
3329
|
+
|
3330
|
+
# Operations on instructions
|
3331
|
+
#
|
3332
|
+
# @method get_instruction_parent(inst)
|
3333
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3334
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3335
|
+
# @scope class
|
3336
|
+
attach_function :get_instruction_parent, :LLVMGetInstructionParent, [:pointer], :pointer
|
3337
|
+
|
3338
|
+
# (Not documented)
|
3339
|
+
#
|
3340
|
+
# @method get_next_instruction(inst)
|
3341
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3342
|
+
# @return [FFI::Pointer(ValueRef)]
|
3343
|
+
# @scope class
|
3344
|
+
attach_function :get_next_instruction, :LLVMGetNextInstruction, [:pointer], :pointer
|
3345
|
+
|
3346
|
+
# (Not documented)
|
3347
|
+
#
|
3348
|
+
# @method get_previous_instruction(inst)
|
3349
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3350
|
+
# @return [FFI::Pointer(ValueRef)]
|
3351
|
+
# @scope class
|
3352
|
+
attach_function :get_previous_instruction, :LLVMGetPreviousInstruction, [:pointer], :pointer
|
3353
|
+
|
3354
|
+
# (Not documented)
|
3355
|
+
#
|
3356
|
+
# @method instruction_erase_from_parent(inst)
|
3357
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3358
|
+
# @return [nil]
|
3359
|
+
# @scope class
|
3360
|
+
attach_function :instruction_erase_from_parent, :LLVMInstructionEraseFromParent, [:pointer], :void
|
3361
|
+
|
3362
|
+
# (Not documented)
|
3363
|
+
#
|
3364
|
+
# @method get_instruction_opcode(inst)
|
3365
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3366
|
+
# @return [Symbol from opcode_enum]
|
3367
|
+
# @scope class
|
3368
|
+
attach_function :get_instruction_opcode, :LLVMGetInstructionOpcode, [:pointer], :opcode
|
3369
|
+
|
3370
|
+
# (Not documented)
|
3371
|
+
#
|
3372
|
+
# @method get_i_cmp_predicate(inst)
|
3373
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3374
|
+
# @return [Symbol from int_predicate_enum]
|
3375
|
+
# @scope class
|
3376
|
+
attach_function :get_i_cmp_predicate, :LLVMGetICmpPredicate, [:pointer], :int_predicate
|
3377
|
+
|
3378
|
+
# Operations on call sites
|
3379
|
+
#
|
3380
|
+
# @method set_instruction_call_conv(instr, cc)
|
3381
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3382
|
+
# @param [Integer] cc
|
3383
|
+
# @return [nil]
|
3384
|
+
# @scope class
|
3385
|
+
attach_function :set_instruction_call_conv, :LLVMSetInstructionCallConv, [:pointer, :uint], :void
|
3386
|
+
|
3387
|
+
# (Not documented)
|
3388
|
+
#
|
3389
|
+
# @method get_instruction_call_conv(instr)
|
3390
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3391
|
+
# @return [Integer]
|
3392
|
+
# @scope class
|
3393
|
+
attach_function :get_instruction_call_conv, :LLVMGetInstructionCallConv, [:pointer], :uint
|
3394
|
+
|
3395
|
+
# (Not documented)
|
3396
|
+
#
|
3397
|
+
# @method add_instr_attribute(instr, index, attribute)
|
3398
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3399
|
+
# @param [Integer] index
|
3400
|
+
# @param [Symbol from attribute_enum] attribute
|
3401
|
+
# @return [nil]
|
3402
|
+
# @scope class
|
3403
|
+
attach_function :add_instr_attribute, :LLVMAddInstrAttribute, [:pointer, :uint, :attribute], :void
|
3404
|
+
|
3405
|
+
# (Not documented)
|
3406
|
+
#
|
3407
|
+
# @method remove_instr_attribute(instr, index, attribute)
|
3408
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3409
|
+
# @param [Integer] index
|
3410
|
+
# @param [Symbol from attribute_enum] attribute
|
3411
|
+
# @return [nil]
|
3412
|
+
# @scope class
|
3413
|
+
attach_function :remove_instr_attribute, :LLVMRemoveInstrAttribute, [:pointer, :uint, :attribute], :void
|
3414
|
+
|
3415
|
+
# (Not documented)
|
3416
|
+
#
|
3417
|
+
# @method set_instr_param_alignment(instr, index, align)
|
3418
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3419
|
+
# @param [Integer] index
|
3420
|
+
# @param [Integer] align
|
3421
|
+
# @return [nil]
|
3422
|
+
# @scope class
|
3423
|
+
attach_function :set_instr_param_alignment, :LLVMSetInstrParamAlignment, [:pointer, :uint, :uint], :void
|
3424
|
+
|
3425
|
+
# Operations on call instructions (only)
|
3426
|
+
#
|
3427
|
+
# @method is_tail_call(call_inst)
|
3428
|
+
# @param [FFI::Pointer(ValueRef)] call_inst
|
3429
|
+
# @return [Integer]
|
3430
|
+
# @scope class
|
3431
|
+
attach_function :is_tail_call, :LLVMIsTailCall, [:pointer], :int
|
3432
|
+
|
3433
|
+
# (Not documented)
|
3434
|
+
#
|
3435
|
+
# @method set_tail_call(call_inst, is_tail_call)
|
3436
|
+
# @param [FFI::Pointer(ValueRef)] call_inst
|
3437
|
+
# @param [Integer] is_tail_call
|
3438
|
+
# @return [nil]
|
3439
|
+
# @scope class
|
3440
|
+
attach_function :set_tail_call, :LLVMSetTailCall, [:pointer, :int], :void
|
3441
|
+
|
3442
|
+
# Operations on switch instructions (only)
|
3443
|
+
#
|
3444
|
+
# @method get_switch_default_dest(switch_instr)
|
3445
|
+
# @param [FFI::Pointer(ValueRef)] switch_instr
|
3446
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3447
|
+
# @scope class
|
3448
|
+
attach_function :get_switch_default_dest, :LLVMGetSwitchDefaultDest, [:pointer], :pointer
|
3449
|
+
|
3450
|
+
# Operations on phi nodes
|
3451
|
+
#
|
3452
|
+
# @method add_incoming(phi_node, incoming_values, incoming_blocks, count)
|
3453
|
+
# @param [FFI::Pointer(ValueRef)] phi_node
|
3454
|
+
# @param [FFI::Pointer(*ValueRef)] incoming_values
|
3455
|
+
# @param [FFI::Pointer(*BasicBlockRef)] incoming_blocks
|
3456
|
+
# @param [Integer] count
|
3457
|
+
# @return [nil]
|
3458
|
+
# @scope class
|
3459
|
+
attach_function :add_incoming, :LLVMAddIncoming, [:pointer, :pointer, :pointer, :uint], :void
|
3460
|
+
|
3461
|
+
# (Not documented)
|
3462
|
+
#
|
3463
|
+
# @method count_incoming(phi_node)
|
3464
|
+
# @param [FFI::Pointer(ValueRef)] phi_node
|
3465
|
+
# @return [Integer]
|
3466
|
+
# @scope class
|
3467
|
+
attach_function :count_incoming, :LLVMCountIncoming, [:pointer], :uint
|
3468
|
+
|
3469
|
+
# (Not documented)
|
3470
|
+
#
|
3471
|
+
# @method get_incoming_value(phi_node, index)
|
3472
|
+
# @param [FFI::Pointer(ValueRef)] phi_node
|
3473
|
+
# @param [Integer] index
|
3474
|
+
# @return [FFI::Pointer(ValueRef)]
|
3475
|
+
# @scope class
|
3476
|
+
attach_function :get_incoming_value, :LLVMGetIncomingValue, [:pointer, :uint], :pointer
|
3477
|
+
|
3478
|
+
# (Not documented)
|
3479
|
+
#
|
3480
|
+
# @method get_incoming_block(phi_node, index)
|
3481
|
+
# @param [FFI::Pointer(ValueRef)] phi_node
|
3482
|
+
# @param [Integer] index
|
3483
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3484
|
+
# @scope class
|
3485
|
+
attach_function :get_incoming_block, :LLVMGetIncomingBlock, [:pointer, :uint], :pointer
|
3486
|
+
|
3487
|
+
# An instruction builder represents a point within a basic block, and is the
|
3488
|
+
# exclusive means of building instructions using the C interface.
|
3489
|
+
#
|
3490
|
+
# @method create_builder_in_context(c)
|
3491
|
+
# @param [FFI::Pointer(ContextRef)] c
|
3492
|
+
# @return [FFI::Pointer(BuilderRef)]
|
3493
|
+
# @scope class
|
3494
|
+
attach_function :create_builder_in_context, :LLVMCreateBuilderInContext, [:pointer], :pointer
|
3495
|
+
|
3496
|
+
# (Not documented)
|
3497
|
+
#
|
3498
|
+
# @method create_builder()
|
3499
|
+
# @return [FFI::Pointer(BuilderRef)]
|
3500
|
+
# @scope class
|
3501
|
+
attach_function :create_builder, :LLVMCreateBuilder, [], :pointer
|
3502
|
+
|
3503
|
+
# (Not documented)
|
3504
|
+
#
|
3505
|
+
# @method position_builder(builder, block, instr)
|
3506
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3507
|
+
# @param [FFI::Pointer(BasicBlockRef)] block
|
3508
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3509
|
+
# @return [nil]
|
3510
|
+
# @scope class
|
3511
|
+
attach_function :position_builder, :LLVMPositionBuilder, [:pointer, :pointer, :pointer], :void
|
3512
|
+
|
3513
|
+
# (Not documented)
|
3514
|
+
#
|
3515
|
+
# @method position_builder_before(builder, instr)
|
3516
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3517
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3518
|
+
# @return [nil]
|
3519
|
+
# @scope class
|
3520
|
+
attach_function :position_builder_before, :LLVMPositionBuilderBefore, [:pointer, :pointer], :void
|
3521
|
+
|
3522
|
+
# (Not documented)
|
3523
|
+
#
|
3524
|
+
# @method position_builder_at_end(builder, block)
|
3525
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3526
|
+
# @param [FFI::Pointer(BasicBlockRef)] block
|
3527
|
+
# @return [nil]
|
3528
|
+
# @scope class
|
3529
|
+
attach_function :position_builder_at_end, :LLVMPositionBuilderAtEnd, [:pointer, :pointer], :void
|
3530
|
+
|
3531
|
+
# (Not documented)
|
3532
|
+
#
|
3533
|
+
# @method get_insert_block(builder)
|
3534
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3535
|
+
# @return [FFI::Pointer(BasicBlockRef)]
|
3536
|
+
# @scope class
|
3537
|
+
attach_function :get_insert_block, :LLVMGetInsertBlock, [:pointer], :pointer
|
3538
|
+
|
3539
|
+
# (Not documented)
|
3540
|
+
#
|
3541
|
+
# @method clear_insertion_position(builder)
|
3542
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3543
|
+
# @return [nil]
|
3544
|
+
# @scope class
|
3545
|
+
attach_function :clear_insertion_position, :LLVMClearInsertionPosition, [:pointer], :void
|
3546
|
+
|
3547
|
+
# (Not documented)
|
3548
|
+
#
|
3549
|
+
# @method insert_into_builder(builder, instr)
|
3550
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3551
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3552
|
+
# @return [nil]
|
3553
|
+
# @scope class
|
3554
|
+
attach_function :insert_into_builder, :LLVMInsertIntoBuilder, [:pointer, :pointer], :void
|
3555
|
+
|
3556
|
+
# (Not documented)
|
3557
|
+
#
|
3558
|
+
# @method insert_into_builder_with_name(builder, instr, name)
|
3559
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3560
|
+
# @param [FFI::Pointer(ValueRef)] instr
|
3561
|
+
# @param [String] name
|
3562
|
+
# @return [nil]
|
3563
|
+
# @scope class
|
3564
|
+
attach_function :insert_into_builder_with_name, :LLVMInsertIntoBuilderWithName, [:pointer, :pointer, :string], :void
|
3565
|
+
|
3566
|
+
# (Not documented)
|
3567
|
+
#
|
3568
|
+
# @method dispose_builder(builder)
|
3569
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3570
|
+
# @return [nil]
|
3571
|
+
# @scope class
|
3572
|
+
attach_function :dispose_builder, :LLVMDisposeBuilder, [:pointer], :void
|
3573
|
+
|
3574
|
+
# Metadata
|
3575
|
+
#
|
3576
|
+
# @method set_current_debug_location(builder, l)
|
3577
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3578
|
+
# @param [FFI::Pointer(ValueRef)] l
|
3579
|
+
# @return [nil]
|
3580
|
+
# @scope class
|
3581
|
+
attach_function :set_current_debug_location, :LLVMSetCurrentDebugLocation, [:pointer, :pointer], :void
|
3582
|
+
|
3583
|
+
# (Not documented)
|
3584
|
+
#
|
3585
|
+
# @method get_current_debug_location(builder)
|
3586
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3587
|
+
# @return [FFI::Pointer(ValueRef)]
|
3588
|
+
# @scope class
|
3589
|
+
attach_function :get_current_debug_location, :LLVMGetCurrentDebugLocation, [:pointer], :pointer
|
3590
|
+
|
3591
|
+
# (Not documented)
|
3592
|
+
#
|
3593
|
+
# @method set_inst_debug_location(builder, inst)
|
3594
|
+
# @param [FFI::Pointer(BuilderRef)] builder
|
3595
|
+
# @param [FFI::Pointer(ValueRef)] inst
|
3596
|
+
# @return [nil]
|
3597
|
+
# @scope class
|
3598
|
+
attach_function :set_inst_debug_location, :LLVMSetInstDebugLocation, [:pointer, :pointer], :void
|
3599
|
+
|
3600
|
+
# Terminators
|
3601
|
+
#
|
3602
|
+
# @method build_ret_void(builder_ref)
|
3603
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3604
|
+
# @return [FFI::Pointer(ValueRef)]
|
3605
|
+
# @scope class
|
3606
|
+
attach_function :build_ret_void, :LLVMBuildRetVoid, [:pointer], :pointer
|
3607
|
+
|
3608
|
+
# (Not documented)
|
3609
|
+
#
|
3610
|
+
# @method build_ret(builder_ref, v)
|
3611
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3612
|
+
# @param [FFI::Pointer(ValueRef)] v
|
3613
|
+
# @return [FFI::Pointer(ValueRef)]
|
3614
|
+
# @scope class
|
3615
|
+
attach_function :build_ret, :LLVMBuildRet, [:pointer, :pointer], :pointer
|
3616
|
+
|
3617
|
+
# (Not documented)
|
3618
|
+
#
|
3619
|
+
# @method build_aggregate_ret(builder_ref, ret_vals, n)
|
3620
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3621
|
+
# @param [FFI::Pointer(*ValueRef)] ret_vals
|
3622
|
+
# @param [Integer] n
|
3623
|
+
# @return [FFI::Pointer(ValueRef)]
|
3624
|
+
# @scope class
|
3625
|
+
attach_function :build_aggregate_ret, :LLVMBuildAggregateRet, [:pointer, :pointer, :uint], :pointer
|
3626
|
+
|
3627
|
+
# (Not documented)
|
3628
|
+
#
|
3629
|
+
# @method build_br(builder_ref, dest)
|
3630
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3631
|
+
# @param [FFI::Pointer(BasicBlockRef)] dest
|
3632
|
+
# @return [FFI::Pointer(ValueRef)]
|
3633
|
+
# @scope class
|
3634
|
+
attach_function :build_br, :LLVMBuildBr, [:pointer, :pointer], :pointer
|
3635
|
+
|
3636
|
+
# (Not documented)
|
3637
|
+
#
|
3638
|
+
# @method build_cond_br(builder_ref, if, then, else)
|
3639
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3640
|
+
# @param [FFI::Pointer(ValueRef)] if
|
3641
|
+
# @param [FFI::Pointer(BasicBlockRef)] then
|
3642
|
+
# @param [FFI::Pointer(BasicBlockRef)] else
|
3643
|
+
# @return [FFI::Pointer(ValueRef)]
|
3644
|
+
# @scope class
|
3645
|
+
attach_function :build_cond_br, :LLVMBuildCondBr, [:pointer, :pointer, :pointer, :pointer], :pointer
|
3646
|
+
|
3647
|
+
# (Not documented)
|
3648
|
+
#
|
3649
|
+
# @method build_switch(builder_ref, v, else, num_cases)
|
3650
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3651
|
+
# @param [FFI::Pointer(ValueRef)] v
|
3652
|
+
# @param [FFI::Pointer(BasicBlockRef)] else
|
3653
|
+
# @param [Integer] num_cases
|
3654
|
+
# @return [FFI::Pointer(ValueRef)]
|
3655
|
+
# @scope class
|
3656
|
+
attach_function :build_switch, :LLVMBuildSwitch, [:pointer, :pointer, :pointer, :uint], :pointer
|
3657
|
+
|
3658
|
+
# (Not documented)
|
3659
|
+
#
|
3660
|
+
# @method build_indirect_br(b, addr, num_dests)
|
3661
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
3662
|
+
# @param [FFI::Pointer(ValueRef)] addr
|
3663
|
+
# @param [Integer] num_dests
|
3664
|
+
# @return [FFI::Pointer(ValueRef)]
|
3665
|
+
# @scope class
|
3666
|
+
attach_function :build_indirect_br, :LLVMBuildIndirectBr, [:pointer, :pointer, :uint], :pointer
|
3667
|
+
|
3668
|
+
# (Not documented)
|
3669
|
+
#
|
3670
|
+
# @method build_invoke(builder_ref, fn, args, num_args, then, catch, name)
|
3671
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3672
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
3673
|
+
# @param [FFI::Pointer(*ValueRef)] args
|
3674
|
+
# @param [Integer] num_args
|
3675
|
+
# @param [FFI::Pointer(BasicBlockRef)] then
|
3676
|
+
# @param [FFI::Pointer(BasicBlockRef)] catch
|
3677
|
+
# @param [String] name
|
3678
|
+
# @return [FFI::Pointer(ValueRef)]
|
3679
|
+
# @scope class
|
3680
|
+
attach_function :build_invoke, :LLVMBuildInvoke, [:pointer, :pointer, :pointer, :uint, :pointer, :pointer, :string], :pointer
|
3681
|
+
|
3682
|
+
# (Not documented)
|
3683
|
+
#
|
3684
|
+
# @method build_landing_pad(b, ty, pers_fn, num_clauses, name)
|
3685
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
3686
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
3687
|
+
# @param [FFI::Pointer(ValueRef)] pers_fn
|
3688
|
+
# @param [Integer] num_clauses
|
3689
|
+
# @param [String] name
|
3690
|
+
# @return [FFI::Pointer(ValueRef)]
|
3691
|
+
# @scope class
|
3692
|
+
attach_function :build_landing_pad, :LLVMBuildLandingPad, [:pointer, :pointer, :pointer, :uint, :string], :pointer
|
3693
|
+
|
3694
|
+
# (Not documented)
|
3695
|
+
#
|
3696
|
+
# @method build_resume(b, exn)
|
3697
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
3698
|
+
# @param [FFI::Pointer(ValueRef)] exn
|
3699
|
+
# @return [FFI::Pointer(ValueRef)]
|
3700
|
+
# @scope class
|
3701
|
+
attach_function :build_resume, :LLVMBuildResume, [:pointer, :pointer], :pointer
|
3702
|
+
|
3703
|
+
# (Not documented)
|
3704
|
+
#
|
3705
|
+
# @method build_unreachable(builder_ref)
|
3706
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3707
|
+
# @return [FFI::Pointer(ValueRef)]
|
3708
|
+
# @scope class
|
3709
|
+
attach_function :build_unreachable, :LLVMBuildUnreachable, [:pointer], :pointer
|
3710
|
+
|
3711
|
+
# Add a case to the switch instruction
|
3712
|
+
#
|
3713
|
+
# @method add_case(switch, on_val, dest)
|
3714
|
+
# @param [FFI::Pointer(ValueRef)] switch
|
3715
|
+
# @param [FFI::Pointer(ValueRef)] on_val
|
3716
|
+
# @param [FFI::Pointer(BasicBlockRef)] dest
|
3717
|
+
# @return [nil]
|
3718
|
+
# @scope class
|
3719
|
+
attach_function :add_case, :LLVMAddCase, [:pointer, :pointer, :pointer], :void
|
3720
|
+
|
3721
|
+
# Add a destination to the indirectbr instruction
|
3722
|
+
#
|
3723
|
+
# @method add_destination(indirect_br, dest)
|
3724
|
+
# @param [FFI::Pointer(ValueRef)] indirect_br
|
3725
|
+
# @param [FFI::Pointer(BasicBlockRef)] dest
|
3726
|
+
# @return [nil]
|
3727
|
+
# @scope class
|
3728
|
+
attach_function :add_destination, :LLVMAddDestination, [:pointer, :pointer], :void
|
3729
|
+
|
3730
|
+
# Add a catch or filter clause to the landingpad instruction
|
3731
|
+
#
|
3732
|
+
# @method add_clause(landing_pad, clause_val)
|
3733
|
+
# @param [FFI::Pointer(ValueRef)] landing_pad
|
3734
|
+
# @param [FFI::Pointer(ValueRef)] clause_val
|
3735
|
+
# @return [nil]
|
3736
|
+
# @scope class
|
3737
|
+
attach_function :add_clause, :LLVMAddClause, [:pointer, :pointer], :void
|
3738
|
+
|
3739
|
+
# Set the 'cleanup' flag in the landingpad instruction
|
3740
|
+
#
|
3741
|
+
# @method set_cleanup(landing_pad, val)
|
3742
|
+
# @param [FFI::Pointer(ValueRef)] landing_pad
|
3743
|
+
# @param [Integer] val
|
3744
|
+
# @return [nil]
|
3745
|
+
# @scope class
|
3746
|
+
attach_function :set_cleanup, :LLVMSetCleanup, [:pointer, :int], :void
|
3747
|
+
|
3748
|
+
# Arithmetic
|
3749
|
+
#
|
3750
|
+
# @method build_add(builder_ref, lhs, rhs, name)
|
3751
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3752
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3753
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3754
|
+
# @param [String] name
|
3755
|
+
# @return [FFI::Pointer(ValueRef)]
|
3756
|
+
# @scope class
|
3757
|
+
attach_function :build_add, :LLVMBuildAdd, [:pointer, :pointer, :pointer, :string], :pointer
|
3758
|
+
|
3759
|
+
# (Not documented)
|
3760
|
+
#
|
3761
|
+
# @method build_nsw_add(builder_ref, lhs, rhs, name)
|
3762
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3763
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3764
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3765
|
+
# @param [String] name
|
3766
|
+
# @return [FFI::Pointer(ValueRef)]
|
3767
|
+
# @scope class
|
3768
|
+
attach_function :build_nsw_add, :LLVMBuildNSWAdd, [:pointer, :pointer, :pointer, :string], :pointer
|
3769
|
+
|
3770
|
+
# (Not documented)
|
3771
|
+
#
|
3772
|
+
# @method build_nuw_add(builder_ref, lhs, rhs, name)
|
3773
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3774
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3775
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3776
|
+
# @param [String] name
|
3777
|
+
# @return [FFI::Pointer(ValueRef)]
|
3778
|
+
# @scope class
|
3779
|
+
attach_function :build_nuw_add, :LLVMBuildNUWAdd, [:pointer, :pointer, :pointer, :string], :pointer
|
3780
|
+
|
3781
|
+
# (Not documented)
|
3782
|
+
#
|
3783
|
+
# @method build_f_add(builder_ref, lhs, rhs, name)
|
3784
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3785
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3786
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3787
|
+
# @param [String] name
|
3788
|
+
# @return [FFI::Pointer(ValueRef)]
|
3789
|
+
# @scope class
|
3790
|
+
attach_function :build_f_add, :LLVMBuildFAdd, [:pointer, :pointer, :pointer, :string], :pointer
|
3791
|
+
|
3792
|
+
# (Not documented)
|
3793
|
+
#
|
3794
|
+
# @method build_sub(builder_ref, lhs, rhs, name)
|
3795
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3796
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3797
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3798
|
+
# @param [String] name
|
3799
|
+
# @return [FFI::Pointer(ValueRef)]
|
3800
|
+
# @scope class
|
3801
|
+
attach_function :build_sub, :LLVMBuildSub, [:pointer, :pointer, :pointer, :string], :pointer
|
3802
|
+
|
3803
|
+
# (Not documented)
|
3804
|
+
#
|
3805
|
+
# @method build_nsw_sub(builder_ref, lhs, rhs, name)
|
3806
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3807
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3808
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3809
|
+
# @param [String] name
|
3810
|
+
# @return [FFI::Pointer(ValueRef)]
|
3811
|
+
# @scope class
|
3812
|
+
attach_function :build_nsw_sub, :LLVMBuildNSWSub, [:pointer, :pointer, :pointer, :string], :pointer
|
3813
|
+
|
3814
|
+
# (Not documented)
|
3815
|
+
#
|
3816
|
+
# @method build_nuw_sub(builder_ref, lhs, rhs, name)
|
3817
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3818
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3819
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3820
|
+
# @param [String] name
|
3821
|
+
# @return [FFI::Pointer(ValueRef)]
|
3822
|
+
# @scope class
|
3823
|
+
attach_function :build_nuw_sub, :LLVMBuildNUWSub, [:pointer, :pointer, :pointer, :string], :pointer
|
3824
|
+
|
3825
|
+
# (Not documented)
|
3826
|
+
#
|
3827
|
+
# @method build_f_sub(builder_ref, lhs, rhs, name)
|
3828
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3829
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3830
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3831
|
+
# @param [String] name
|
3832
|
+
# @return [FFI::Pointer(ValueRef)]
|
3833
|
+
# @scope class
|
3834
|
+
attach_function :build_f_sub, :LLVMBuildFSub, [:pointer, :pointer, :pointer, :string], :pointer
|
3835
|
+
|
3836
|
+
# (Not documented)
|
3837
|
+
#
|
3838
|
+
# @method build_mul(builder_ref, lhs, rhs, name)
|
3839
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3840
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3841
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3842
|
+
# @param [String] name
|
3843
|
+
# @return [FFI::Pointer(ValueRef)]
|
3844
|
+
# @scope class
|
3845
|
+
attach_function :build_mul, :LLVMBuildMul, [:pointer, :pointer, :pointer, :string], :pointer
|
3846
|
+
|
3847
|
+
# (Not documented)
|
3848
|
+
#
|
3849
|
+
# @method build_nsw_mul(builder_ref, lhs, rhs, name)
|
3850
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3851
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3852
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3853
|
+
# @param [String] name
|
3854
|
+
# @return [FFI::Pointer(ValueRef)]
|
3855
|
+
# @scope class
|
3856
|
+
attach_function :build_nsw_mul, :LLVMBuildNSWMul, [:pointer, :pointer, :pointer, :string], :pointer
|
3857
|
+
|
3858
|
+
# (Not documented)
|
3859
|
+
#
|
3860
|
+
# @method build_nuw_mul(builder_ref, lhs, rhs, name)
|
3861
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3862
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3863
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3864
|
+
# @param [String] name
|
3865
|
+
# @return [FFI::Pointer(ValueRef)]
|
3866
|
+
# @scope class
|
3867
|
+
attach_function :build_nuw_mul, :LLVMBuildNUWMul, [:pointer, :pointer, :pointer, :string], :pointer
|
3868
|
+
|
3869
|
+
# (Not documented)
|
3870
|
+
#
|
3871
|
+
# @method build_f_mul(builder_ref, lhs, rhs, name)
|
3872
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3873
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3874
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3875
|
+
# @param [String] name
|
3876
|
+
# @return [FFI::Pointer(ValueRef)]
|
3877
|
+
# @scope class
|
3878
|
+
attach_function :build_f_mul, :LLVMBuildFMul, [:pointer, :pointer, :pointer, :string], :pointer
|
3879
|
+
|
3880
|
+
# (Not documented)
|
3881
|
+
#
|
3882
|
+
# @method build_u_div(builder_ref, lhs, rhs, name)
|
3883
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3884
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3885
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3886
|
+
# @param [String] name
|
3887
|
+
# @return [FFI::Pointer(ValueRef)]
|
3888
|
+
# @scope class
|
3889
|
+
attach_function :build_u_div, :LLVMBuildUDiv, [:pointer, :pointer, :pointer, :string], :pointer
|
3890
|
+
|
3891
|
+
# (Not documented)
|
3892
|
+
#
|
3893
|
+
# @method build_s_div(builder_ref, lhs, rhs, name)
|
3894
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3895
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3896
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3897
|
+
# @param [String] name
|
3898
|
+
# @return [FFI::Pointer(ValueRef)]
|
3899
|
+
# @scope class
|
3900
|
+
attach_function :build_s_div, :LLVMBuildSDiv, [:pointer, :pointer, :pointer, :string], :pointer
|
3901
|
+
|
3902
|
+
# (Not documented)
|
3903
|
+
#
|
3904
|
+
# @method build_exact_s_div(builder_ref, lhs, rhs, name)
|
3905
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3906
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3907
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3908
|
+
# @param [String] name
|
3909
|
+
# @return [FFI::Pointer(ValueRef)]
|
3910
|
+
# @scope class
|
3911
|
+
attach_function :build_exact_s_div, :LLVMBuildExactSDiv, [:pointer, :pointer, :pointer, :string], :pointer
|
3912
|
+
|
3913
|
+
# (Not documented)
|
3914
|
+
#
|
3915
|
+
# @method build_f_div(builder_ref, lhs, rhs, name)
|
3916
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3917
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3918
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3919
|
+
# @param [String] name
|
3920
|
+
# @return [FFI::Pointer(ValueRef)]
|
3921
|
+
# @scope class
|
3922
|
+
attach_function :build_f_div, :LLVMBuildFDiv, [:pointer, :pointer, :pointer, :string], :pointer
|
3923
|
+
|
3924
|
+
# (Not documented)
|
3925
|
+
#
|
3926
|
+
# @method build_u_rem(builder_ref, lhs, rhs, name)
|
3927
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3928
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3929
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3930
|
+
# @param [String] name
|
3931
|
+
# @return [FFI::Pointer(ValueRef)]
|
3932
|
+
# @scope class
|
3933
|
+
attach_function :build_u_rem, :LLVMBuildURem, [:pointer, :pointer, :pointer, :string], :pointer
|
3934
|
+
|
3935
|
+
# (Not documented)
|
3936
|
+
#
|
3937
|
+
# @method build_s_rem(builder_ref, lhs, rhs, name)
|
3938
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3939
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3940
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3941
|
+
# @param [String] name
|
3942
|
+
# @return [FFI::Pointer(ValueRef)]
|
3943
|
+
# @scope class
|
3944
|
+
attach_function :build_s_rem, :LLVMBuildSRem, [:pointer, :pointer, :pointer, :string], :pointer
|
3945
|
+
|
3946
|
+
# (Not documented)
|
3947
|
+
#
|
3948
|
+
# @method build_f_rem(builder_ref, lhs, rhs, name)
|
3949
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3950
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3951
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3952
|
+
# @param [String] name
|
3953
|
+
# @return [FFI::Pointer(ValueRef)]
|
3954
|
+
# @scope class
|
3955
|
+
attach_function :build_f_rem, :LLVMBuildFRem, [:pointer, :pointer, :pointer, :string], :pointer
|
3956
|
+
|
3957
|
+
# (Not documented)
|
3958
|
+
#
|
3959
|
+
# @method build_shl(builder_ref, lhs, rhs, name)
|
3960
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3961
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3962
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3963
|
+
# @param [String] name
|
3964
|
+
# @return [FFI::Pointer(ValueRef)]
|
3965
|
+
# @scope class
|
3966
|
+
attach_function :build_shl, :LLVMBuildShl, [:pointer, :pointer, :pointer, :string], :pointer
|
3967
|
+
|
3968
|
+
# (Not documented)
|
3969
|
+
#
|
3970
|
+
# @method build_l_shr(builder_ref, lhs, rhs, name)
|
3971
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3972
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3973
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3974
|
+
# @param [String] name
|
3975
|
+
# @return [FFI::Pointer(ValueRef)]
|
3976
|
+
# @scope class
|
3977
|
+
attach_function :build_l_shr, :LLVMBuildLShr, [:pointer, :pointer, :pointer, :string], :pointer
|
3978
|
+
|
3979
|
+
# (Not documented)
|
3980
|
+
#
|
3981
|
+
# @method build_a_shr(builder_ref, lhs, rhs, name)
|
3982
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3983
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3984
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3985
|
+
# @param [String] name
|
3986
|
+
# @return [FFI::Pointer(ValueRef)]
|
3987
|
+
# @scope class
|
3988
|
+
attach_function :build_a_shr, :LLVMBuildAShr, [:pointer, :pointer, :pointer, :string], :pointer
|
3989
|
+
|
3990
|
+
# (Not documented)
|
3991
|
+
#
|
3992
|
+
# @method build_and(builder_ref, lhs, rhs, name)
|
3993
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
3994
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
3995
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
3996
|
+
# @param [String] name
|
3997
|
+
# @return [FFI::Pointer(ValueRef)]
|
3998
|
+
# @scope class
|
3999
|
+
attach_function :build_and, :LLVMBuildAnd, [:pointer, :pointer, :pointer, :string], :pointer
|
4000
|
+
|
4001
|
+
# (Not documented)
|
4002
|
+
#
|
4003
|
+
# @method build_or(builder_ref, lhs, rhs, name)
|
4004
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4005
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4006
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4007
|
+
# @param [String] name
|
4008
|
+
# @return [FFI::Pointer(ValueRef)]
|
4009
|
+
# @scope class
|
4010
|
+
attach_function :build_or, :LLVMBuildOr, [:pointer, :pointer, :pointer, :string], :pointer
|
4011
|
+
|
4012
|
+
# (Not documented)
|
4013
|
+
#
|
4014
|
+
# @method build_xor(builder_ref, lhs, rhs, name)
|
4015
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4016
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4017
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4018
|
+
# @param [String] name
|
4019
|
+
# @return [FFI::Pointer(ValueRef)]
|
4020
|
+
# @scope class
|
4021
|
+
attach_function :build_xor, :LLVMBuildXor, [:pointer, :pointer, :pointer, :string], :pointer
|
4022
|
+
|
4023
|
+
# (Not documented)
|
4024
|
+
#
|
4025
|
+
# @method build_bin_op(b, op, lhs, rhs, name)
|
4026
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4027
|
+
# @param [Symbol from opcode_enum] op
|
4028
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4029
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4030
|
+
# @param [String] name
|
4031
|
+
# @return [FFI::Pointer(ValueRef)]
|
4032
|
+
# @scope class
|
4033
|
+
attach_function :build_bin_op, :LLVMBuildBinOp, [:pointer, :opcode, :pointer, :pointer, :string], :pointer
|
4034
|
+
|
4035
|
+
# (Not documented)
|
4036
|
+
#
|
4037
|
+
# @method build_neg(builder_ref, v, name)
|
4038
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4039
|
+
# @param [FFI::Pointer(ValueRef)] v
|
4040
|
+
# @param [String] name
|
4041
|
+
# @return [FFI::Pointer(ValueRef)]
|
4042
|
+
# @scope class
|
4043
|
+
attach_function :build_neg, :LLVMBuildNeg, [:pointer, :pointer, :string], :pointer
|
4044
|
+
|
4045
|
+
# (Not documented)
|
4046
|
+
#
|
4047
|
+
# @method build_nsw_neg(b, v, name)
|
4048
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4049
|
+
# @param [FFI::Pointer(ValueRef)] v
|
4050
|
+
# @param [String] name
|
4051
|
+
# @return [FFI::Pointer(ValueRef)]
|
4052
|
+
# @scope class
|
4053
|
+
attach_function :build_nsw_neg, :LLVMBuildNSWNeg, [:pointer, :pointer, :string], :pointer
|
4054
|
+
|
4055
|
+
# (Not documented)
|
4056
|
+
#
|
4057
|
+
# @method build_nuw_neg(b, v, name)
|
4058
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4059
|
+
# @param [FFI::Pointer(ValueRef)] v
|
4060
|
+
# @param [String] name
|
4061
|
+
# @return [FFI::Pointer(ValueRef)]
|
4062
|
+
# @scope class
|
4063
|
+
attach_function :build_nuw_neg, :LLVMBuildNUWNeg, [:pointer, :pointer, :string], :pointer
|
4064
|
+
|
4065
|
+
# (Not documented)
|
4066
|
+
#
|
4067
|
+
# @method build_f_neg(builder_ref, v, name)
|
4068
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4069
|
+
# @param [FFI::Pointer(ValueRef)] v
|
4070
|
+
# @param [String] name
|
4071
|
+
# @return [FFI::Pointer(ValueRef)]
|
4072
|
+
# @scope class
|
4073
|
+
attach_function :build_f_neg, :LLVMBuildFNeg, [:pointer, :pointer, :string], :pointer
|
4074
|
+
|
4075
|
+
# (Not documented)
|
4076
|
+
#
|
4077
|
+
# @method build_not(builder_ref, v, name)
|
4078
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4079
|
+
# @param [FFI::Pointer(ValueRef)] v
|
4080
|
+
# @param [String] name
|
4081
|
+
# @return [FFI::Pointer(ValueRef)]
|
4082
|
+
# @scope class
|
4083
|
+
attach_function :build_not, :LLVMBuildNot, [:pointer, :pointer, :string], :pointer
|
4084
|
+
|
4085
|
+
# Memory
|
4086
|
+
#
|
4087
|
+
# @method build_malloc(builder_ref, ty, name)
|
4088
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4089
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4090
|
+
# @param [String] name
|
4091
|
+
# @return [FFI::Pointer(ValueRef)]
|
4092
|
+
# @scope class
|
4093
|
+
attach_function :build_malloc, :LLVMBuildMalloc, [:pointer, :pointer, :string], :pointer
|
4094
|
+
|
4095
|
+
# (Not documented)
|
4096
|
+
#
|
4097
|
+
# @method build_array_malloc(builder_ref, ty, val, name)
|
4098
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4099
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4100
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4101
|
+
# @param [String] name
|
4102
|
+
# @return [FFI::Pointer(ValueRef)]
|
4103
|
+
# @scope class
|
4104
|
+
attach_function :build_array_malloc, :LLVMBuildArrayMalloc, [:pointer, :pointer, :pointer, :string], :pointer
|
4105
|
+
|
4106
|
+
# (Not documented)
|
4107
|
+
#
|
4108
|
+
# @method build_alloca(builder_ref, ty, name)
|
4109
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4110
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4111
|
+
# @param [String] name
|
4112
|
+
# @return [FFI::Pointer(ValueRef)]
|
4113
|
+
# @scope class
|
4114
|
+
attach_function :build_alloca, :LLVMBuildAlloca, [:pointer, :pointer, :string], :pointer
|
4115
|
+
|
4116
|
+
# (Not documented)
|
4117
|
+
#
|
4118
|
+
# @method build_array_alloca(builder_ref, ty, val, name)
|
4119
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4120
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4121
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4122
|
+
# @param [String] name
|
4123
|
+
# @return [FFI::Pointer(ValueRef)]
|
4124
|
+
# @scope class
|
4125
|
+
attach_function :build_array_alloca, :LLVMBuildArrayAlloca, [:pointer, :pointer, :pointer, :string], :pointer
|
4126
|
+
|
4127
|
+
# (Not documented)
|
4128
|
+
#
|
4129
|
+
# @method build_free(builder_ref, pointer_val)
|
4130
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4131
|
+
# @param [FFI::Pointer(ValueRef)] pointer_val
|
4132
|
+
# @return [FFI::Pointer(ValueRef)]
|
4133
|
+
# @scope class
|
4134
|
+
attach_function :build_free, :LLVMBuildFree, [:pointer, :pointer], :pointer
|
4135
|
+
|
4136
|
+
# (Not documented)
|
4137
|
+
#
|
4138
|
+
# @method build_load(builder_ref, pointer_val, name)
|
4139
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4140
|
+
# @param [FFI::Pointer(ValueRef)] pointer_val
|
4141
|
+
# @param [String] name
|
4142
|
+
# @return [FFI::Pointer(ValueRef)]
|
4143
|
+
# @scope class
|
4144
|
+
attach_function :build_load, :LLVMBuildLoad, [:pointer, :pointer, :string], :pointer
|
4145
|
+
|
4146
|
+
# (Not documented)
|
4147
|
+
#
|
4148
|
+
# @method build_store(builder_ref, val, ptr)
|
4149
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4150
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4151
|
+
# @param [FFI::Pointer(ValueRef)] ptr
|
4152
|
+
# @return [FFI::Pointer(ValueRef)]
|
4153
|
+
# @scope class
|
4154
|
+
attach_function :build_store, :LLVMBuildStore, [:pointer, :pointer, :pointer], :pointer
|
4155
|
+
|
4156
|
+
# (Not documented)
|
4157
|
+
#
|
4158
|
+
# @method build_gep(b, pointer, indices, num_indices, name)
|
4159
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4160
|
+
# @param [FFI::Pointer(ValueRef)] pointer
|
4161
|
+
# @param [FFI::Pointer(*ValueRef)] indices
|
4162
|
+
# @param [Integer] num_indices
|
4163
|
+
# @param [String] name
|
4164
|
+
# @return [FFI::Pointer(ValueRef)]
|
4165
|
+
# @scope class
|
4166
|
+
attach_function :build_gep, :LLVMBuildGEP, [:pointer, :pointer, :pointer, :uint, :string], :pointer
|
4167
|
+
|
4168
|
+
# (Not documented)
|
4169
|
+
#
|
4170
|
+
# @method build_in_bounds_gep(b, pointer, indices, num_indices, name)
|
4171
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4172
|
+
# @param [FFI::Pointer(ValueRef)] pointer
|
4173
|
+
# @param [FFI::Pointer(*ValueRef)] indices
|
4174
|
+
# @param [Integer] num_indices
|
4175
|
+
# @param [String] name
|
4176
|
+
# @return [FFI::Pointer(ValueRef)]
|
4177
|
+
# @scope class
|
4178
|
+
attach_function :build_in_bounds_gep, :LLVMBuildInBoundsGEP, [:pointer, :pointer, :pointer, :uint, :string], :pointer
|
4179
|
+
|
4180
|
+
# (Not documented)
|
4181
|
+
#
|
4182
|
+
# @method build_struct_gep(b, pointer, idx, name)
|
4183
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4184
|
+
# @param [FFI::Pointer(ValueRef)] pointer
|
4185
|
+
# @param [Integer] idx
|
4186
|
+
# @param [String] name
|
4187
|
+
# @return [FFI::Pointer(ValueRef)]
|
4188
|
+
# @scope class
|
4189
|
+
attach_function :build_struct_gep, :LLVMBuildStructGEP, [:pointer, :pointer, :uint, :string], :pointer
|
4190
|
+
|
4191
|
+
# (Not documented)
|
4192
|
+
#
|
4193
|
+
# @method build_global_string(b, str, name)
|
4194
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4195
|
+
# @param [String] str
|
4196
|
+
# @param [String] name
|
4197
|
+
# @return [FFI::Pointer(ValueRef)]
|
4198
|
+
# @scope class
|
4199
|
+
attach_function :build_global_string, :LLVMBuildGlobalString, [:pointer, :string, :string], :pointer
|
4200
|
+
|
4201
|
+
# (Not documented)
|
4202
|
+
#
|
4203
|
+
# @method build_global_string_ptr(b, str, name)
|
4204
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4205
|
+
# @param [String] str
|
4206
|
+
# @param [String] name
|
4207
|
+
# @return [FFI::Pointer(ValueRef)]
|
4208
|
+
# @scope class
|
4209
|
+
attach_function :build_global_string_ptr, :LLVMBuildGlobalStringPtr, [:pointer, :string, :string], :pointer
|
4210
|
+
|
4211
|
+
# Casts
|
4212
|
+
#
|
4213
|
+
# @method build_trunc(builder_ref, val, dest_ty, name)
|
4214
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4215
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4216
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4217
|
+
# @param [String] name
|
4218
|
+
# @return [FFI::Pointer(ValueRef)]
|
4219
|
+
# @scope class
|
4220
|
+
attach_function :build_trunc, :LLVMBuildTrunc, [:pointer, :pointer, :pointer, :string], :pointer
|
4221
|
+
|
4222
|
+
# (Not documented)
|
4223
|
+
#
|
4224
|
+
# @method build_z_ext(builder_ref, val, dest_ty, name)
|
4225
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4226
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4227
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4228
|
+
# @param [String] name
|
4229
|
+
# @return [FFI::Pointer(ValueRef)]
|
4230
|
+
# @scope class
|
4231
|
+
attach_function :build_z_ext, :LLVMBuildZExt, [:pointer, :pointer, :pointer, :string], :pointer
|
4232
|
+
|
4233
|
+
# (Not documented)
|
4234
|
+
#
|
4235
|
+
# @method build_s_ext(builder_ref, val, dest_ty, name)
|
4236
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4237
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4238
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4239
|
+
# @param [String] name
|
4240
|
+
# @return [FFI::Pointer(ValueRef)]
|
4241
|
+
# @scope class
|
4242
|
+
attach_function :build_s_ext, :LLVMBuildSExt, [:pointer, :pointer, :pointer, :string], :pointer
|
4243
|
+
|
4244
|
+
# (Not documented)
|
4245
|
+
#
|
4246
|
+
# @method build_fp_to_ui(builder_ref, val, dest_ty, name)
|
4247
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4248
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4249
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4250
|
+
# @param [String] name
|
4251
|
+
# @return [FFI::Pointer(ValueRef)]
|
4252
|
+
# @scope class
|
4253
|
+
attach_function :build_fp_to_ui, :LLVMBuildFPToUI, [:pointer, :pointer, :pointer, :string], :pointer
|
4254
|
+
|
4255
|
+
# (Not documented)
|
4256
|
+
#
|
4257
|
+
# @method build_fp_to_si(builder_ref, val, dest_ty, name)
|
4258
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4259
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4260
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4261
|
+
# @param [String] name
|
4262
|
+
# @return [FFI::Pointer(ValueRef)]
|
4263
|
+
# @scope class
|
4264
|
+
attach_function :build_fp_to_si, :LLVMBuildFPToSI, [:pointer, :pointer, :pointer, :string], :pointer
|
4265
|
+
|
4266
|
+
# (Not documented)
|
4267
|
+
#
|
4268
|
+
# @method build_ui_to_fp(builder_ref, val, dest_ty, name)
|
4269
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4270
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4271
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4272
|
+
# @param [String] name
|
4273
|
+
# @return [FFI::Pointer(ValueRef)]
|
4274
|
+
# @scope class
|
4275
|
+
attach_function :build_ui_to_fp, :LLVMBuildUIToFP, [:pointer, :pointer, :pointer, :string], :pointer
|
4276
|
+
|
4277
|
+
# (Not documented)
|
4278
|
+
#
|
4279
|
+
# @method build_si_to_fp(builder_ref, val, dest_ty, name)
|
4280
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4281
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4282
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4283
|
+
# @param [String] name
|
4284
|
+
# @return [FFI::Pointer(ValueRef)]
|
4285
|
+
# @scope class
|
4286
|
+
attach_function :build_si_to_fp, :LLVMBuildSIToFP, [:pointer, :pointer, :pointer, :string], :pointer
|
4287
|
+
|
4288
|
+
# (Not documented)
|
4289
|
+
#
|
4290
|
+
# @method build_fp_trunc(builder_ref, val, dest_ty, name)
|
4291
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4292
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4293
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4294
|
+
# @param [String] name
|
4295
|
+
# @return [FFI::Pointer(ValueRef)]
|
4296
|
+
# @scope class
|
4297
|
+
attach_function :build_fp_trunc, :LLVMBuildFPTrunc, [:pointer, :pointer, :pointer, :string], :pointer
|
4298
|
+
|
4299
|
+
# (Not documented)
|
4300
|
+
#
|
4301
|
+
# @method build_fp_ext(builder_ref, val, dest_ty, name)
|
4302
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4303
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4304
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4305
|
+
# @param [String] name
|
4306
|
+
# @return [FFI::Pointer(ValueRef)]
|
4307
|
+
# @scope class
|
4308
|
+
attach_function :build_fp_ext, :LLVMBuildFPExt, [:pointer, :pointer, :pointer, :string], :pointer
|
4309
|
+
|
4310
|
+
# (Not documented)
|
4311
|
+
#
|
4312
|
+
# @method build_ptr_to_int(builder_ref, val, dest_ty, name)
|
4313
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4314
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4315
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4316
|
+
# @param [String] name
|
4317
|
+
# @return [FFI::Pointer(ValueRef)]
|
4318
|
+
# @scope class
|
4319
|
+
attach_function :build_ptr_to_int, :LLVMBuildPtrToInt, [:pointer, :pointer, :pointer, :string], :pointer
|
4320
|
+
|
4321
|
+
# (Not documented)
|
4322
|
+
#
|
4323
|
+
# @method build_int_to_ptr(builder_ref, val, dest_ty, name)
|
4324
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4325
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4326
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4327
|
+
# @param [String] name
|
4328
|
+
# @return [FFI::Pointer(ValueRef)]
|
4329
|
+
# @scope class
|
4330
|
+
attach_function :build_int_to_ptr, :LLVMBuildIntToPtr, [:pointer, :pointer, :pointer, :string], :pointer
|
4331
|
+
|
4332
|
+
# (Not documented)
|
4333
|
+
#
|
4334
|
+
# @method build_bit_cast(builder_ref, val, dest_ty, name)
|
4335
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4336
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4337
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4338
|
+
# @param [String] name
|
4339
|
+
# @return [FFI::Pointer(ValueRef)]
|
4340
|
+
# @scope class
|
4341
|
+
attach_function :build_bit_cast, :LLVMBuildBitCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4342
|
+
|
4343
|
+
# (Not documented)
|
4344
|
+
#
|
4345
|
+
# @method build_z_ext_or_bit_cast(builder_ref, val, dest_ty, name)
|
4346
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4347
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4348
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4349
|
+
# @param [String] name
|
4350
|
+
# @return [FFI::Pointer(ValueRef)]
|
4351
|
+
# @scope class
|
4352
|
+
attach_function :build_z_ext_or_bit_cast, :LLVMBuildZExtOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4353
|
+
|
4354
|
+
# (Not documented)
|
4355
|
+
#
|
4356
|
+
# @method build_s_ext_or_bit_cast(builder_ref, val, dest_ty, name)
|
4357
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4358
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4359
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4360
|
+
# @param [String] name
|
4361
|
+
# @return [FFI::Pointer(ValueRef)]
|
4362
|
+
# @scope class
|
4363
|
+
attach_function :build_s_ext_or_bit_cast, :LLVMBuildSExtOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4364
|
+
|
4365
|
+
# (Not documented)
|
4366
|
+
#
|
4367
|
+
# @method build_trunc_or_bit_cast(builder_ref, val, dest_ty, name)
|
4368
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4369
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4370
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4371
|
+
# @param [String] name
|
4372
|
+
# @return [FFI::Pointer(ValueRef)]
|
4373
|
+
# @scope class
|
4374
|
+
attach_function :build_trunc_or_bit_cast, :LLVMBuildTruncOrBitCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4375
|
+
|
4376
|
+
# (Not documented)
|
4377
|
+
#
|
4378
|
+
# @method build_cast(b, op, val, dest_ty, name)
|
4379
|
+
# @param [FFI::Pointer(BuilderRef)] b
|
4380
|
+
# @param [Symbol from opcode_enum] op
|
4381
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4382
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4383
|
+
# @param [String] name
|
4384
|
+
# @return [FFI::Pointer(ValueRef)]
|
4385
|
+
# @scope class
|
4386
|
+
attach_function :build_cast, :LLVMBuildCast, [:pointer, :opcode, :pointer, :pointer, :string], :pointer
|
4387
|
+
|
4388
|
+
# (Not documented)
|
4389
|
+
#
|
4390
|
+
# @method build_pointer_cast(builder_ref, val, dest_ty, name)
|
4391
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4392
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4393
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4394
|
+
# @param [String] name
|
4395
|
+
# @return [FFI::Pointer(ValueRef)]
|
4396
|
+
# @scope class
|
4397
|
+
attach_function :build_pointer_cast, :LLVMBuildPointerCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4398
|
+
|
4399
|
+
# (Not documented)
|
4400
|
+
#
|
4401
|
+
# @method build_int_cast(builder_ref, val, dest_ty, name)
|
4402
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4403
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4404
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4405
|
+
# @param [String] name
|
4406
|
+
# @return [FFI::Pointer(ValueRef)]
|
4407
|
+
# @scope class
|
4408
|
+
attach_function :build_int_cast, :LLVMBuildIntCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4409
|
+
|
4410
|
+
# (Not documented)
|
4411
|
+
#
|
4412
|
+
# @method build_fp_cast(builder_ref, val, dest_ty, name)
|
4413
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4414
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4415
|
+
# @param [FFI::Pointer(TypeRef)] dest_ty
|
4416
|
+
# @param [String] name
|
4417
|
+
# @return [FFI::Pointer(ValueRef)]
|
4418
|
+
# @scope class
|
4419
|
+
attach_function :build_fp_cast, :LLVMBuildFPCast, [:pointer, :pointer, :pointer, :string], :pointer
|
4420
|
+
|
4421
|
+
# Comparisons
|
4422
|
+
#
|
4423
|
+
# @method build_i_cmp(builder_ref, op, lhs, rhs, name)
|
4424
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4425
|
+
# @param [Symbol from int_predicate_enum] op
|
4426
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4427
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4428
|
+
# @param [String] name
|
4429
|
+
# @return [FFI::Pointer(ValueRef)]
|
4430
|
+
# @scope class
|
4431
|
+
attach_function :build_i_cmp, :LLVMBuildICmp, [:pointer, :int_predicate, :pointer, :pointer, :string], :pointer
|
4432
|
+
|
4433
|
+
# (Not documented)
|
4434
|
+
#
|
4435
|
+
# @method build_f_cmp(builder_ref, op, lhs, rhs, name)
|
4436
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4437
|
+
# @param [Symbol from real_predicate_enum] op
|
4438
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4439
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4440
|
+
# @param [String] name
|
4441
|
+
# @return [FFI::Pointer(ValueRef)]
|
4442
|
+
# @scope class
|
4443
|
+
attach_function :build_f_cmp, :LLVMBuildFCmp, [:pointer, :real_predicate, :pointer, :pointer, :string], :pointer
|
4444
|
+
|
4445
|
+
# Miscellaneous instructions
|
4446
|
+
#
|
4447
|
+
# @method build_phi(builder_ref, ty, name)
|
4448
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4449
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4450
|
+
# @param [String] name
|
4451
|
+
# @return [FFI::Pointer(ValueRef)]
|
4452
|
+
# @scope class
|
4453
|
+
attach_function :build_phi, :LLVMBuildPhi, [:pointer, :pointer, :string], :pointer
|
4454
|
+
|
4455
|
+
# (Not documented)
|
4456
|
+
#
|
4457
|
+
# @method build_call(builder_ref, fn, args, num_args, name)
|
4458
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4459
|
+
# @param [FFI::Pointer(ValueRef)] fn
|
4460
|
+
# @param [FFI::Pointer(*ValueRef)] args
|
4461
|
+
# @param [Integer] num_args
|
4462
|
+
# @param [String] name
|
4463
|
+
# @return [FFI::Pointer(ValueRef)]
|
4464
|
+
# @scope class
|
4465
|
+
attach_function :build_call, :LLVMBuildCall, [:pointer, :pointer, :pointer, :uint, :string], :pointer
|
4466
|
+
|
4467
|
+
# (Not documented)
|
4468
|
+
#
|
4469
|
+
# @method build_select(builder_ref, if, then, else, name)
|
4470
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4471
|
+
# @param [FFI::Pointer(ValueRef)] if
|
4472
|
+
# @param [FFI::Pointer(ValueRef)] then
|
4473
|
+
# @param [FFI::Pointer(ValueRef)] else
|
4474
|
+
# @param [String] name
|
4475
|
+
# @return [FFI::Pointer(ValueRef)]
|
4476
|
+
# @scope class
|
4477
|
+
attach_function :build_select, :LLVMBuildSelect, [:pointer, :pointer, :pointer, :pointer, :string], :pointer
|
4478
|
+
|
4479
|
+
# (Not documented)
|
4480
|
+
#
|
4481
|
+
# @method build_va_arg(builder_ref, list, ty, name)
|
4482
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4483
|
+
# @param [FFI::Pointer(ValueRef)] list
|
4484
|
+
# @param [FFI::Pointer(TypeRef)] ty
|
4485
|
+
# @param [String] name
|
4486
|
+
# @return [FFI::Pointer(ValueRef)]
|
4487
|
+
# @scope class
|
4488
|
+
attach_function :build_va_arg, :LLVMBuildVAArg, [:pointer, :pointer, :pointer, :string], :pointer
|
4489
|
+
|
4490
|
+
# (Not documented)
|
4491
|
+
#
|
4492
|
+
# @method build_extract_element(builder_ref, vec_val, index, name)
|
4493
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4494
|
+
# @param [FFI::Pointer(ValueRef)] vec_val
|
4495
|
+
# @param [FFI::Pointer(ValueRef)] index
|
4496
|
+
# @param [String] name
|
4497
|
+
# @return [FFI::Pointer(ValueRef)]
|
4498
|
+
# @scope class
|
4499
|
+
attach_function :build_extract_element, :LLVMBuildExtractElement, [:pointer, :pointer, :pointer, :string], :pointer
|
4500
|
+
|
4501
|
+
# (Not documented)
|
4502
|
+
#
|
4503
|
+
# @method build_insert_element(builder_ref, vec_val, elt_val, index, name)
|
4504
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4505
|
+
# @param [FFI::Pointer(ValueRef)] vec_val
|
4506
|
+
# @param [FFI::Pointer(ValueRef)] elt_val
|
4507
|
+
# @param [FFI::Pointer(ValueRef)] index
|
4508
|
+
# @param [String] name
|
4509
|
+
# @return [FFI::Pointer(ValueRef)]
|
4510
|
+
# @scope class
|
4511
|
+
attach_function :build_insert_element, :LLVMBuildInsertElement, [:pointer, :pointer, :pointer, :pointer, :string], :pointer
|
4512
|
+
|
4513
|
+
# (Not documented)
|
4514
|
+
#
|
4515
|
+
# @method build_shuffle_vector(builder_ref, v1, v2, mask, name)
|
4516
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4517
|
+
# @param [FFI::Pointer(ValueRef)] v1
|
4518
|
+
# @param [FFI::Pointer(ValueRef)] v2
|
4519
|
+
# @param [FFI::Pointer(ValueRef)] mask
|
4520
|
+
# @param [String] name
|
4521
|
+
# @return [FFI::Pointer(ValueRef)]
|
4522
|
+
# @scope class
|
4523
|
+
attach_function :build_shuffle_vector, :LLVMBuildShuffleVector, [:pointer, :pointer, :pointer, :pointer, :string], :pointer
|
4524
|
+
|
4525
|
+
# (Not documented)
|
4526
|
+
#
|
4527
|
+
# @method build_extract_value(builder_ref, agg_val, index, name)
|
4528
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4529
|
+
# @param [FFI::Pointer(ValueRef)] agg_val
|
4530
|
+
# @param [Integer] index
|
4531
|
+
# @param [String] name
|
4532
|
+
# @return [FFI::Pointer(ValueRef)]
|
4533
|
+
# @scope class
|
4534
|
+
attach_function :build_extract_value, :LLVMBuildExtractValue, [:pointer, :pointer, :uint, :string], :pointer
|
4535
|
+
|
4536
|
+
# (Not documented)
|
4537
|
+
#
|
4538
|
+
# @method build_insert_value(builder_ref, agg_val, elt_val, index, name)
|
4539
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4540
|
+
# @param [FFI::Pointer(ValueRef)] agg_val
|
4541
|
+
# @param [FFI::Pointer(ValueRef)] elt_val
|
4542
|
+
# @param [Integer] index
|
4543
|
+
# @param [String] name
|
4544
|
+
# @return [FFI::Pointer(ValueRef)]
|
4545
|
+
# @scope class
|
4546
|
+
attach_function :build_insert_value, :LLVMBuildInsertValue, [:pointer, :pointer, :pointer, :uint, :string], :pointer
|
4547
|
+
|
4548
|
+
# (Not documented)
|
4549
|
+
#
|
4550
|
+
# @method build_is_null(builder_ref, val, name)
|
4551
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4552
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4553
|
+
# @param [String] name
|
4554
|
+
# @return [FFI::Pointer(ValueRef)]
|
4555
|
+
# @scope class
|
4556
|
+
attach_function :build_is_null, :LLVMBuildIsNull, [:pointer, :pointer, :string], :pointer
|
4557
|
+
|
4558
|
+
# (Not documented)
|
4559
|
+
#
|
4560
|
+
# @method build_is_not_null(builder_ref, val, name)
|
4561
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4562
|
+
# @param [FFI::Pointer(ValueRef)] val
|
4563
|
+
# @param [String] name
|
4564
|
+
# @return [FFI::Pointer(ValueRef)]
|
4565
|
+
# @scope class
|
4566
|
+
attach_function :build_is_not_null, :LLVMBuildIsNotNull, [:pointer, :pointer, :string], :pointer
|
4567
|
+
|
4568
|
+
# (Not documented)
|
4569
|
+
#
|
4570
|
+
# @method build_ptr_diff(builder_ref, lhs, rhs, name)
|
4571
|
+
# @param [FFI::Pointer(BuilderRef)] builder_ref
|
4572
|
+
# @param [FFI::Pointer(ValueRef)] lhs
|
4573
|
+
# @param [FFI::Pointer(ValueRef)] rhs
|
4574
|
+
# @param [String] name
|
4575
|
+
# @return [FFI::Pointer(ValueRef)]
|
4576
|
+
# @scope class
|
4577
|
+
attach_function :build_ptr_diff, :LLVMBuildPtrDiff, [:pointer, :pointer, :pointer, :string], :pointer
|
4578
|
+
|
4579
|
+
# Changes the type of M so it can be passed to FunctionPassManagers and the
|
4580
|
+
# JIT. They take ModuleProviders for historical reasons.
|
4581
|
+
#
|
4582
|
+
# @method create_module_provider_for_existing_module(m)
|
4583
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
4584
|
+
# @return [FFI::Pointer(ModuleProviderRef)]
|
4585
|
+
# @scope class
|
4586
|
+
attach_function :create_module_provider_for_existing_module, :LLVMCreateModuleProviderForExistingModule, [:pointer], :pointer
|
4587
|
+
|
4588
|
+
# Destroys the module M.
|
4589
|
+
#
|
4590
|
+
# @method dispose_module_provider(m)
|
4591
|
+
# @param [FFI::Pointer(ModuleProviderRef)] m
|
4592
|
+
# @return [nil]
|
4593
|
+
# @scope class
|
4594
|
+
attach_function :dispose_module_provider, :LLVMDisposeModuleProvider, [:pointer], :void
|
4595
|
+
|
4596
|
+
# ===-- Memory buffers ----------------------------------------------------===
|
4597
|
+
#
|
4598
|
+
# @method create_memory_buffer_with_contents_of_file(path, out_mem_buf, out_message)
|
4599
|
+
# @param [String] path
|
4600
|
+
# @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
|
4601
|
+
# @param [FFI::Pointer(**Char_S)] out_message
|
4602
|
+
# @return [Integer]
|
4603
|
+
# @scope class
|
4604
|
+
attach_function :create_memory_buffer_with_contents_of_file, :LLVMCreateMemoryBufferWithContentsOfFile, [:string, :pointer, :pointer], :int
|
4605
|
+
|
4606
|
+
# (Not documented)
|
4607
|
+
#
|
4608
|
+
# @method create_memory_buffer_with_stdin(out_mem_buf, out_message)
|
4609
|
+
# @param [FFI::Pointer(*MemoryBufferRef)] out_mem_buf
|
4610
|
+
# @param [FFI::Pointer(**Char_S)] out_message
|
4611
|
+
# @return [Integer]
|
4612
|
+
# @scope class
|
4613
|
+
attach_function :create_memory_buffer_with_stdin, :LLVMCreateMemoryBufferWithSTDIN, [:pointer, :pointer], :int
|
4614
|
+
|
4615
|
+
# (Not documented)
|
4616
|
+
#
|
4617
|
+
# @method dispose_memory_buffer(mem_buf)
|
4618
|
+
# @param [FFI::Pointer(MemoryBufferRef)] mem_buf
|
4619
|
+
# @return [nil]
|
4620
|
+
# @scope class
|
4621
|
+
attach_function :dispose_memory_buffer, :LLVMDisposeMemoryBuffer, [:pointer], :void
|
4622
|
+
|
4623
|
+
# Return the global pass registry, for use with initialization functions.
|
4624
|
+
# See llvm::PassRegistry::getPassRegistry.
|
4625
|
+
#
|
4626
|
+
# @method get_global_pass_registry()
|
4627
|
+
# @return [FFI::Pointer(PassRegistryRef)]
|
4628
|
+
# @scope class
|
4629
|
+
attach_function :get_global_pass_registry, :LLVMGetGlobalPassRegistry, [], :pointer
|
4630
|
+
|
4631
|
+
# Constructs a new whole-module pass pipeline. This type of pipeline is
|
4632
|
+
# suitable for link-time optimization and whole-module transformations.
|
4633
|
+
# See llvm::PassManager::PassManager.
|
4634
|
+
#
|
4635
|
+
# @method create_pass_manager()
|
4636
|
+
# @return [FFI::Pointer(PassManagerRef)]
|
4637
|
+
# @scope class
|
4638
|
+
attach_function :create_pass_manager, :LLVMCreatePassManager, [], :pointer
|
4639
|
+
|
4640
|
+
# Constructs a new function-by-function pass pipeline over the module
|
4641
|
+
# provider. It does not take ownership of the module provider. This type of
|
4642
|
+
# pipeline is suitable for code generation and JIT compilation tasks.
|
4643
|
+
# See llvm::FunctionPassManager::FunctionPassManager.
|
4644
|
+
#
|
4645
|
+
# @method create_function_pass_manager_for_module(m)
|
4646
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
4647
|
+
# @return [FFI::Pointer(PassManagerRef)]
|
4648
|
+
# @scope class
|
4649
|
+
attach_function :create_function_pass_manager_for_module, :LLVMCreateFunctionPassManagerForModule, [:pointer], :pointer
|
4650
|
+
|
4651
|
+
# Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
|
4652
|
+
#
|
4653
|
+
# @method create_function_pass_manager(mp)
|
4654
|
+
# @param [FFI::Pointer(ModuleProviderRef)] mp
|
4655
|
+
# @return [FFI::Pointer(PassManagerRef)]
|
4656
|
+
# @scope class
|
4657
|
+
attach_function :create_function_pass_manager, :LLVMCreateFunctionPassManager, [:pointer], :pointer
|
4658
|
+
|
4659
|
+
# Initializes, executes on the provided module, and finalizes all of the
|
4660
|
+
# passes scheduled in the pass manager. Returns 1 if any of the passes
|
4661
|
+
# modified the module, 0 otherwise. See llvm::PassManager::run(Module&).
|
4662
|
+
#
|
4663
|
+
# @method run_pass_manager(pm, m)
|
4664
|
+
# @param [FFI::Pointer(PassManagerRef)] pm
|
4665
|
+
# @param [FFI::Pointer(ModuleRef)] m
|
4666
|
+
# @return [Integer]
|
4667
|
+
# @scope class
|
4668
|
+
attach_function :run_pass_manager, :LLVMRunPassManager, [:pointer, :pointer], :int
|
4669
|
+
|
4670
|
+
# Initializes all of the function passes scheduled in the function pass
|
4671
|
+
# manager. Returns 1 if any of the passes modified the module, 0 otherwise.
|
4672
|
+
# See llvm::FunctionPassManager::doInitialization.
|
4673
|
+
#
|
4674
|
+
# @method initialize_function_pass_manager(fpm)
|
4675
|
+
# @param [FFI::Pointer(PassManagerRef)] fpm
|
4676
|
+
# @return [Integer]
|
4677
|
+
# @scope class
|
4678
|
+
attach_function :initialize_function_pass_manager, :LLVMInitializeFunctionPassManager, [:pointer], :int
|
4679
|
+
|
4680
|
+
# Executes all of the function passes scheduled in the function pass manager
|
4681
|
+
# on the provided function. Returns 1 if any of the passes modified the
|
4682
|
+
# function, false otherwise.
|
4683
|
+
# See llvm::FunctionPassManager::run(Function&).
|
4684
|
+
#
|
4685
|
+
# @method run_function_pass_manager(fpm, f)
|
4686
|
+
# @param [FFI::Pointer(PassManagerRef)] fpm
|
4687
|
+
# @param [FFI::Pointer(ValueRef)] f
|
4688
|
+
# @return [Integer]
|
4689
|
+
# @scope class
|
4690
|
+
attach_function :run_function_pass_manager, :LLVMRunFunctionPassManager, [:pointer, :pointer], :int
|
4691
|
+
|
4692
|
+
# Finalizes all of the function passes scheduled in in the function pass
|
4693
|
+
# manager. Returns 1 if any of the passes modified the module, 0 otherwise.
|
4694
|
+
# See llvm::FunctionPassManager::doFinalization.
|
4695
|
+
#
|
4696
|
+
# @method finalize_function_pass_manager(fpm)
|
4697
|
+
# @param [FFI::Pointer(PassManagerRef)] fpm
|
4698
|
+
# @return [Integer]
|
4699
|
+
# @scope class
|
4700
|
+
attach_function :finalize_function_pass_manager, :LLVMFinalizeFunctionPassManager, [:pointer], :int
|
4701
|
+
|
4702
|
+
# Frees the memory of a pass pipeline. For function pipelines, does not free
|
4703
|
+
# the module provider.
|
4704
|
+
# See llvm::PassManagerBase::~PassManagerBase.
|
4705
|
+
#
|
4706
|
+
# @method dispose_pass_manager(pm)
|
4707
|
+
# @param [FFI::Pointer(PassManagerRef)] pm
|
4708
|
+
# @return [nil]
|
4709
|
+
# @scope class
|
4710
|
+
attach_function :dispose_pass_manager, :LLVMDisposePassManager, [:pointer], :void
|
4711
|
+
|
4712
|
+
end
|