-
Notifications
You must be signed in to change notification settings - Fork 8
/
LLVM.Imports.Core.pas
2493 lines (2099 loc) · 119 KB
/
LLVM.Imports.Core.pas
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
unit LLVM.Imports.Core;
interface
//based on Core.h
uses
LLVM.Imports,
LLVM.Imports.Types;
{$MinEnumSize 4}
const
// versione
LTO_API_VERSION = 24;
type
TLLVMAttrKind = (
// IR-Level Attributes
LLVMNone, ///< No attributes have been set
LLVMAlignment, //'align',
LLVMAllocSize, //'allocsize',
LLVMAlwaysInline, //'alwaysinline',
LLVMArgMemOnly, //'argmemonly',
LLVMBuiltin, //'builtin',
LLVMByVal, //'byval',
LLVMCold, //'cold',
LLVMConvergent, //'convergent',
LLVMDereferenceable, //'dereferenceable',
LLVMDereferenceableOrNull, //'dereferenceable_or_null',
LLVMImmArg, //'immarg',
LLVMInAlloca, //'inalloca',
LLVMInReg, //'inreg',
LLVMInaccessibleMemOnly, //'inaccessiblememonly',
LLVMInaccessibleMemOrArgMemOnly, //'inaccessiblemem_or_argmemonly',
LLVMInlineHint, //'inlinehint',
LLVMJumpTable, //'jumptable',
LLVMMinSize, //'minsize',
LLVMNaked, //'naked',
LLVMNest, //'nest',
LLVMNoAlias, //'noalias',
LLVMNoBuiltin, //'nobuiltin',
LLVMNoCapture, //'nocapture',
LLVMNoCfCheck, //'nocf_check',
LLVMNoDuplicate, //'noduplicate',
LLVMNoFree, //'nofree',
LLVMNoImplicitFloat, //'noimplicitfloat',
LLVMNoInline, //'noinline',
LLVMNoRecurse, //'norecurse',
LLVMNoRedZone, //'noredzone',
LLVMNoReturn, //'noreturn',
LLVMNoSync, //'nosync',
LLVMNoUnwind, //'nounwind',
LLVMNonLazyBind, //'nonlazybind',
LLVMNonNull, //'nonnull',
LLVMOptForFuzzing, //'optforfuzzing',
LLVMOptimizeForSize, //'optsize',
LLVMOptimizeNone, //'optnone',
LLVMReadNone, //'readnone',
LLVMReadOnly, //'readonly',
LLVMReturned, //'returned',
LLVMReturnsTwice, //'returns_twice',
LLVMSignedExt, //'signext',
LLVMSafeStack, //'safestack',
LLVMSanitizeAddress, //'sanitize_address',
LLVMSanitizeHWAddress, //'sanitize_hwaddress',
LLVMSanitizeMemTag, //'sanitize_memtag',
LLVMSanitizeMemory, //'sanitize_memory',
LLVMSanitizeThread, //'sanitize_thread',
LLVMShadowCallStack, //'shadowcallstack',
LLVMSpeculatable, //'speculatable',
LLVMSpeculativeLoadHardening, //'speculative_load_hardening',
LLVMStackAlignment, //'alignstack',
LLVMStackProtect, //'ssp',
LLVMStackProtectReq, //'sspreq',
LLVMStackProtectStrong, //'sspstrong',
LLVMStrictFP, //'strictfp',
LLVMStructRet, //'sret',
LLVMSwiftError, //'swifterror',
LLVMSwiftSelf, //'swiftself',
LLVMUWTable, //'uwtable',
LLVMWillReturn, //'willreturn',
LLVMWriteOnly, //'writeonly',
LLVMZeroExt, //'zeroext',
LLVMEndAttrKinds); ///< Sentinal value useful for loops
TLLVMOpcode = (
//* Terminator Instructions */
LLVMRet = 1,
LLVMBr = 2,
LLVMSwitch = 3,
LLVMIndirectBr = 4,
LLVMInvoke = 5,
//* removed 6 due to API changes */
LLVMUnreachable = 7,
//* Standard Binary Operators */
LLVMAdd = 8,
LLVMFAdd = 9,
LLVMSub = 10,
LLVMFSub = 11,
LLVMMul = 12,
LLVMFMul = 13,
LLVMUDiv = 14,
LLVMSDiv = 15,
LLVMFDiv = 16,
LLVMURem = 17,
LLVMSRem = 18,
LLVMFRem = 19,
//* Logical Operators */
LLVMShl = 20,
LLVMLShr = 21,
LLVMAShr = 22,
LLVMAnd = 23,
LLVMOr = 24,
LLVMXor = 25,
//* Memory Operators */
LLVMAlloca = 26,
LLVMLoad = 27,
LLVMStore = 28,
LLVMGetElementPtr = 29,
//* Cast Operators */
LLVMTrunc = 30,
LLVMZExt = 31,
LLVMSExt = 32,
LLVMFPToUI = 33,
LLVMFPToSI = 34,
LLVMUIToFP = 35,
LLVMSIToFP = 36,
LLVMFPTrunc = 37,
LLVMFPExt = 38,
LLVMPtrToInt = 39,
LLVMIntToPtr = 40,
LLVMBitCast = 41,
LLVMAddrSpaceCast = 60,
//* Other Operators */
LLVMICmp = 42,
LLVMFCmp = 43,
LLVMPHI = 44,
LLVMCall = 45,
LLVMSelect = 46,
LLVMUserOp1 = 47,
LLVMUserOp2 = 48,
LLVMVAArg = 49,
LLVMExtractElement = 50,
LLVMInsertElement = 51,
LLVMShuffleVector = 52,
LLVMExtractValue = 53,
LLVMInsertValue = 54,
LLVMFreeze = 68,
//* Atomic operators */
LLVMFence = 55,
LLVMAtomicCmpXchg = 56,
LLVMAtomicRMW = 57,
//* Exception Handling Operators */
LLVMResume = 58,
LLVMLandingPad = 59,
LLVMCleanupRet = 61,
LLVMCatchRet = 62,
LLVMCatchPad = 63,
LLVMCleanupPad = 64,
LLVMCatchSwitch = 65,
{/* Standard Unary Operators */}
LLVMFNeg = 66,
LLVMCallBr = 67
);
TLLVMTypeKind = (
LLVMVoidTypeKind, //**< type with no size */
LLVMHalfTypeKind, //**< 16 bit floating point type */
LLVMFloatTypeKind, //**< 32 bit floating point type */
LLVMDoubleTypeKind, //**< 64 bit floating point type */
LLVMX86_FP80TypeKind, //**< 80 bit floating point type (X87) */
LLVMFP128TypeKind, //**< 128 bit floating point type (112-bit mantissa)*/
LLVMPPC_FP128TypeKind, //**< 128 bit floating point type (two 64-bits) */
LLVMLabelTypeKind, //**< Labels */
LLVMIntegerTypeKind, //**< Arbitrary bit width integers */
LLVMFunctionTypeKind, //**< Functions */
LLVMStructTypeKind, //**< Structures */
LLVMArrayTypeKind, //**< Arrays */
LLVMPointerTypeKind, //**< Pointers */
LLVMVectorTypeKind, //**< SIMD 'packed' format, or other vector type */
LLVMMetadataTypeKind, //**< Metadata */
LLVMX86_MMXTypeKind, //**< X86 MMX */
LLVMTokenTypeKind //**< Tokens */
);
TLLVMLinkage = (
LLVMExternalLinkage, //**< Externally visible function */
LLVMAvailableExternallyLinkage,
LLVMLinkOnceAnyLinkage, //**< Keep one copy of function when linking (inline)*/
LLVMLinkOnceODRLinkage, //**< Same, but only replaced by something equivalent. */
LLVMLinkOnceODRAutoHideLinkage, //**< Obsolete */
LLVMWeakAnyLinkage, //**< Keep one copy of function when linking (weak) */
LLVMWeakODRLinkage, //**< Same, but only replaced by something equivalent. */
LLVMAppendingLinkage, //**< Special purpose, only applies to global arrays */
LLVMInternalLinkage, //**< Rename collisions when linking (static functions) */
LLVMPrivateLinkage, //**< Like Internal, but omit from symbol table */
LLVMDLLImportLinkage, //**< Obsolete */
LLVMDLLExportLinkage, //**< Obsolete */
LLVMExternalWeakLinkage,//**< ExternalWeak linkage description */
LLVMGhostLinkage, //**< Obsolete */
LLVMCommonLinkage, //**< Tentative definitions */
LLVMLinkerPrivateLinkage, //**< Like Private, but linker removes. */
LLVMLinkerPrivateWeakLinkage //**< Like LinkerPrivate, but is weak. */
);
TLLVMVisibility = (
LLVMDefaultVisibility, //**< The GV is visible */
LLVMHiddenVisibility, //**< The GV is hidden */
LLVMProtectedVisibility //**< The GV is protected */
);
TLLVMUnnamedAddr = (
LLVMNoUnnamedAddr, {/**< Address of the GV is significant. */}
LLVMLocalUnnamedAddr, {/**< Address of the GV is locally insignificant. */}
LLVMGlobalUnnamedAddr {/**< Address of the GV is globally insignificant. */}
);
TLLVMDLLStorageClass = (
LLVMDefaultStorageClass = 0,
LLVMDLLImportStorageClass = 1, //**< Function to be imported from DLL. */
LLVMDLLExportStorageClass = 2 //**< Function to be accessible from DLL. */
);
TLLVMCallConv = (
LLVMCCallConv = 0,
LLVMFastCallConv = 8,
LLVMColdCallConv = 9,
LLVMGHCCallConv = 10,
LLVMHiPECallConv = 11,
LLVMWebKitJSCallConv = 12,
LLVMAnyRegCallConv = 13,
LLVMPreserveMostCallConv = 14,
LLVMPreserveAllCallConv = 15,
LLVMSwiftCallConv = 16,
LLVMCXXFASTTLSCallConv = 17,
LLVMX86StdcallCallConv = 64,
LLVMX86FastcallCallConv = 65,
LLVMARMAPCSCallConv = 66,
LLVMARMAAPCSCallConv = 67,
LLVMARMAAPCSVFPCallConv = 68,
LLVMMSP430INTRCallConv = 69,
LLVMX86ThisCallCallConv = 70,
LLVMPTXKernelCallConv = 71,
LLVMPTXDeviceCallConv = 72,
LLVMSPIRFUNCCallConv = 75,
LLVMSPIRKERNELCallConv = 76,
LLVMIntelOCLBICallConv = 77,
LLVMX8664SysVCallConv = 78,
LLVMWin64CallConv = 79,
LLVMX86VectorCallCallConv = 80,
LLVMHHVMCallConv = 81,
LLVMHHVMCCallConv = 82,
LLVMX86INTRCallConv = 83,
LLVMAVRINTRCallConv = 84,
LLVMAVRSIGNALCallConv = 85,
LLVMAVRBUILTINCallConv = 86,
LLVMAMDGPUVSCallConv = 87,
LLVMAMDGPUGSCallConv = 88,
LLVMAMDGPUPSCallConv = 89,
LLVMAMDGPUCSCallConv = 90,
LLVMAMDGPUKERNELCallConv = 91,
LLVMX86RegCallCallConv = 92,
LLVMAMDGPUHSCallConv = 93,
LLVMMSP430BUILTINCallConv = 94,
LLVMAMDGPULSCallConv = 95,
LLVMAMDGPUESCallConv = 96
);
TLLVMValueKind = (
LLVMArgumentValueKind,
LLVMBasicBlockValueKind,
LLVMMemoryUseValueKind,
LLVMMemoryDefValueKind,
LLVMMemoryPhiValueKind,
LLVMFunctionValueKind,
LLVMGlobalAliasValueKind,
LLVMGlobalIFuncValueKind,
LLVMGlobalVariableValueKind,
LLVMBlockAddressValueKind,
LLVMConstantExprValueKind,
LLVMConstantArrayValueKind,
LLVMConstantStructValueKind,
LLVMConstantVectorValueKind,
LLVMUndefValueValueKind,
LLVMConstantAggregateZeroValueKind,
LLVMConstantDataArrayValueKind,
LLVMConstantDataVectorValueKind,
LLVMConstantIntValueKind,
LLVMConstantFPValueKind,
LLVMConstantPointerNullValueKind,
LLVMConstantTokenNoneValueKind,
LLVMMetadataAsValueValueKind,
LLVMInlineAsmValueKind,
LLVMInstructionValueKind
);
TLLVMIntPredicate = (
LLVMIntEQ = 32, //**< equal */
LLVMIntNE, //**< not equal */
LLVMIntUGT, //**< unsigned greater than */
LLVMIntUGE, //**< unsigned greater or equal */
LLVMIntULT, //**< unsigned less than */
LLVMIntULE, //**< unsigned less or equal */
LLVMIntSGT, //**< signed greater than */
LLVMIntSGE, //**< signed greater or equal */
LLVMIntSLT, //**< signed less than */
LLVMIntSLE //**< signed less or equal */
);
TLLVMRealPredicate = (
LLVMRealPredicateFalse, //**< Always false (always folded) */
LLVMRealOEQ, //**< True if ordered and equal */
LLVMRealOGT, //**< True if ordered and greater than */
LLVMRealOGE, //**< True if ordered and greater than or equal */
LLVMRealOLT, //**< True if ordered and less than */
LLVMRealOLE, //**< True if ordered and less than or equal */
LLVMRealONE, //**< True if ordered and operands are unequal */
LLVMRealORD, //**< True if ordered (no nans) */
LLVMRealUNO, //**< True if unordered: isnan(X) | isnan(Y) */
LLVMRealUEQ, //**< True if unordered or equal */
LLVMRealUGT, //**< True if unordered or greater than */
LLVMRealUGE, //**< True if unordered, greater than, or equal */
LLVMRealULT, //**< True if unordered or less than */
LLVMRealULE, //**< True if unordered, less than, or equal */
LLVMRealUNE, //**< True if unordered or not equal */
LLVMRealPredicateTrue //**< Always true (always folded) */
);
TLLVMLandingPadClauseTy = (
LLVMLandingPadCatch, //**< A catch clause */
LLVMLandingPadFilter //**< A filter clause */
);
TLLVMThreadLocalMode = (
LLVMNotThreadLocal = 0,
LLVMGeneralDynamicTLSModel,
LLVMLocalDynamicTLSModel,
LLVMInitialExecTLSModel,
LLVMLocalExecTLSModel
);
TLLVMAtomicOrdering = (
LLVMAtomicOrderingNotAtomic = 0, //**< A load or store which is not atomic */
LLVMAtomicOrderingUnordered = 1, //**< Lowest level of atomicity, guarantees somewhat sane results, lock free. */
LLVMAtomicOrderingMonotonic = 2, //**< guarantees that if you take all the operations affecting a specific address, a consistent ordering exists */
LLVMAtomicOrderingAcquire = 4, //**< Acquire provides a barrier of the sort necessary to acquire a lock to access other memory with normal loads and stores. */
LLVMAtomicOrderingRelease = 5, //**< Release is similar to Acquire, but with a barrier of the sort necessary to release a lock. */
LLVMAtomicOrderingAcquireRelease = 6, //**< provides both an Acquire and a Release barrier (for fences and operations which both read and write memory). */
LLVMAtomicOrderingSequentiallyConsistent = 7 //**< provides Acquire semantics for loads and Release semantics for stores. Additionally, it guarantees that a total ordering exists between all SequentiallyConsistent operations. */
);
TLLVMAtomicRMWBinOp = (
LLVMAtomicRMWBinOpXchg, //**< Set the new value and return the one old */
LLVMAtomicRMWBinOpAdd, //**< Add a value and return the old one */
LLVMAtomicRMWBinOpSub, //**< Subtract a value and return the old one */
LLVMAtomicRMWBinOpAnd, //**< And a value and return the old one */
LLVMAtomicRMWBinOpNand, //**< Not-And a value and return the old one */
LLVMAtomicRMWBinOpOr, //**< OR a value and return the old one */
LLVMAtomicRMWBinOpXor, //**< Xor a value and return the old one */
LLVMAtomicRMWBinOpMax, //**< Sets the value if it's greater than the original using a signed comparison and return the old one */
LLVMAtomicRMWBinOpMin, //**< Sets the value if it's Smaller than the original using a signed comparison and return the old one */
LLVMAtomicRMWBinOpUMax, //**< Sets the value if it's greater than the original using an unsigned comparison and return the old one */
LLVMAtomicRMWBinOpUMin, //**< Sets the value if it's greater than the original using an unsigned comparison and return the old one */
LLVMAtomicRMWBinOpFAdd, //**< Add a floating point value and return the old one */
LLVMAtomicRMWBinOpFSub //**< Subtract a floating point value and return the old one */
);
TLLVMDiagnosticSeverity = (
LLVMDSError,
LLVMDSWarning,
LLVMDSRemark,
LLVMDSNote
);
TLLVMInlineAsmDialect = (
LLVMInlineAsmDialectATT,
LLVMInlineAsmDialectIntel
);
TLLVMModuleFlagBehavior = (
(**
* Emits an error if two values disagree, otherwise the resulting value is
* that of the operands.
*
* @see Module::ModFlagBehavior::Error
*)
LLVMModuleFlagBehaviorError,
(**
* Emits a warning if two values disagree. The result value will be the
* operand for the flag from the first module being linked.
*
* @see Module::ModFlagBehavior::Warning
*)
LLVMModuleFlagBehaviorWarning,
(**
* Adds a requirement that another module flag be present and have a
* specified value after linking is performed. The value must be a metadata
* pair, where the first element of the pair is the ID of the module flag
* to be restricted, and the second element of the pair is the value the
* module flag should be restricted to. This behavior can be used to
* restrict the allowable results (via triggering of an error) of linking
* IDs with the **Override** behavior.
*
* @see Module::ModFlagBehavior::Require
*)
LLVMModuleFlagBehaviorRequire,
(**
* Uses the specified value, regardless of the behavior or value of the
* other module. If both modules specify **Override**, but the values
* differ, an error will be emitted.
*
* @see Module::ModFlagBehavior::Override
*)
LLVMModuleFlagBehaviorOverride,
(**
* Appends the two values, which are required to be metadata nodes.
*
* @see Module::ModFlagBehavior::Append
*)
LLVMModuleFlagBehaviorAppend,
(**
* Appends the two values, which are required to be metadata
* nodes. However, duplicate entries in the second list are dropped
* during the append operation.
*
* @see Module::ModFlagBehavior::AppendUnique
*)
LLVMModuleFlagBehaviorAppendUnique
);
{//**
* Attribute index are either LLVMAttributeReturnIndex,
* LLVMAttributeFunctionIndex or a parameter number from 1 to N.
*/}
TLLVMAttributeIndex = (
LLVMAttributeReturnIndex = 0,
// ISO C restricts enumerator values to range of 'int'
// (4294967295 is too large)
// LLVMAttributeFunctionIndex = ~0U,
LLVMAttributeFunctionIndex = -1
);
procedure LLVMInitializeCore(R: TLLVMPassRegistryRef); cdecl; external CLLVMLibrary;
procedure LLVMShutdown; cdecl; external CLLVMLibrary;
function LLVMCreateMessage(const Message: PLLVMChar): PLLVMChar; cdecl; external CLLVMLibrary;
procedure LLVMDisposeMessage(Message: PLLVMChar); cdecl; external CLLVMLibrary;
type
TLLVMDiagnosticHandler = procedure(DiagnosticInfo: TLLVMDiagnosticInfoRef; UserContext: Pointer); cdecl;
TLLVMYieldCallback = procedure(Context: TLLVMContextRef; UserContext: Pointer); cdecl;
function LLVMContextCreate: TLLVMContextRef cdecl; external CLLVMLibrary;
function LLVMGetGlobalContext: TLLVMContextRef; cdecl; external CLLVMLibrary;
procedure LLVMContextSetDiagnosticHandler(C: TLLVMContextRef; Handler: TLLVMDiagnosticHandler; DiagnosticContext: Pointer); cdecl; external CLLVMLibrary;
function LLVMContextGetDiagnosticHandler(C: TLLVMContextRef): TLLVMDiagnosticHandler; cdecl; external CLLVMLibrary;
function LLVMContextGetDiagnosticContext(C: TLLVMContextRef): Pointer; cdecl; external CLLVMLibrary;
procedure LLVMContextSetYieldCallback(C: TLLVMContextRef; Callback: TLLVMYieldCallback; OpaqueHandle: Pointer); cdecl; external CLLVMLibrary;
(**
* Retrieve whether the given context is set to discard all value names.
*
* @see LLVMContext::shouldDiscardValueNames()
*)
function LLVMContextShouldDiscardValueNames(C: TLLVMContextRef): TLLVMBool; cdecl; external CLLVMLibrary;
(**
* Set whether the given context discards all value names.
*
* If true, only the names of GlobalValue objects will be available in the IR.
* This can be used to save memory and runtime, especially in release mode.
*
* @see LLVMContext::setDiscardValueNames()
*)
procedure LLVMContextSetDiscardValueNames(C: TLLVMContextRef; Discard: TLLVMBool); cdecl; external CLLVMLibrary;
procedure LLVMContextDispose(C: TLLVMContextRef); cdecl; external CLLVMLibrary;
function LLVMGetDiagInfoDescription(DI: TLLVMDiagnosticInfoRef): PLLVMChar; cdecl; external CLLVMLibrary;
function LLVMGetDiagInfoSeverity(DI: TLLVMDiagnosticInfoRef): TLLVMDiagnosticSeverity; cdecl; external CLLVMLibrary;
function LLVMGetMDKindIDInContext(C: TLLVMContextRef; const Name: PLLVMChar; SLen: Cardinal): Cardinal; cdecl; external CLLVMLibrary;
function LLVMGetMDKindID(const Name: PLLVMChar; SLen: Cardinal): Cardinal; cdecl; external CLLVMLibrary;
function LLVMGetEnumAttributeKindForName(const Name: PLLVMChar; SLen: TLLVMSizeT): Cardinal; cdecl; external CLLVMLibrary;
function LLVMGetLastEnumAttributeKind: Cardinal; cdecl; external CLLVMLibrary;
function LLVMCreateEnumAttribute(C: TLLVMContextRef; KindID: Cardinal; Val: UInt64): TLLVMAttributeRef; cdecl; external CLLVMLibrary;
function LLVMGetEnumAttributeKind(A: TLLVMAttributeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMGetEnumAttributeValue(A: TLLVMAttributeRef): UInt64; cdecl; external CLLVMLibrary;
function LLVMCreateStringAttribute(C: TLLVMContextRef; const K: PLLVMChar; KLength: Cardinal; const V: PLLVMChar; VLength: Cardinal): TLLVMAttributeRef; cdecl; external CLLVMLibrary;
function LLVMGetStringAttributeKind(A: TLLVMAttributeRef; out Length: Cardinal): PLLVMChar; cdecl; external CLLVMLibrary;
function LLVMGetStringAttributeValue(A: TLLVMAttributeRef; out Length: Cardinal): PLLVMChar; cdecl; external CLLVMLibrary;
function LLVMIsEnumAttribute(A: TLLVMAttributeRef): LongBool; cdecl; external CLLVMLibrary;
function LLVMIsStringAttribute(A: TLLVMAttributeRef): LongBool; cdecl; external CLLVMLibrary;
function LLVMModuleCreateWithName(const ModuleID: PLLVMChar): TLLVMModuleRef; cdecl; external CLLVMLibrary;
function LLVMModuleCreateWithNameInContext(const ModuleID: PLLVMChar; C: TLLVMContextRef): TLLVMModuleRef; cdecl; external CLLVMLibrary;
function LLVMCloneModule(M: TLLVMModuleRef): TLLVMModuleRef; cdecl; external CLLVMLibrary;
procedure LLVMDisposeModule(M: TLLVMModuleRef); cdecl; external CLLVMLibrary;
function LLVMGetModuleIdentifier(M: TLLVMModuleRef; out Len: TLLVMSizeT): PLLVMChar; cdecl; external CLLVMLibrary;
procedure LLVMSetModuleIdentifier(M: TLLVMModuleRef; const Ident: PLLVMChar; Len: TLLVMSizeT); cdecl; external CLLVMLibrary;
(**
* Obtain the module's original source file name.
*
* @param M Module to obtain the name of
* @param Len Out parameter which holds the length of the returned string
* @return The original source file name of M
* @see Module::getSourceFileName()
*)
function LLVMGetSourceFileName(M: TLLVMModuleRef; var Len: TLLVMSizeT):PLLVMChar;cdecl; external CLLVMLibrary;
(**
* Set the original source file name of a module to a string Name with length
* Len.
*
* @param M The module to set the source file name of
* @param Name The string to set M's source file name to
* @param Len Length of Name
* @see Module::setSourceFileName()
*)
procedure LLVMSetSourceFileName(M: TLLVMModuleRef; Name: PLLVMChar; Len: TLLVMSizeT); cdecl; external CLLVMLibrary;
function LLVMGetDataLayoutStr(M: TLLVMModuleRef): PLLVMChar; cdecl; external CLLVMLibrary;
procedure LLVMSetDataLayout(M: TLLVMModuleRef; const DataLayoutStr: PLLVMChar); cdecl; external CLLVMLibrary;
function LLVMGetTarget(M: TLLVMModuleRef): PLLVMChar; cdecl; external CLLVMLibrary;
procedure LLVMSetTarget(M: TLLVMModuleRef; const Triple: PLLVMChar); cdecl; external CLLVMLibrary;
(**
* Returns the module flags as an array of flag-key-value triples. The caller
* is responsible for freeing this array by calling
* \c LLVMDisposeModuleFlagsMetadata.
*
* @see Module::getModuleFlagsMetadata()
*)
function LLVMCopyModuleFlagsMetadata(M: TLLVMModuleRef; var Len: TLLVMSizeT): PLLVMModuleFlagEntry;cdecl; external CLLVMLibrary;
(**
* Destroys module flags metadata entries.
*)
procedure LLVMDisposeModuleFlagsMetadata(Entries: PLLVMModuleFlagEntry); cdecl; external CLLVMLibrary;
(**
* Returns the flag behavior for a module flag entry at a specific index.
*
* @see Module::ModuleFlagEntry::Behavior
*)
function LLVMModuleFlagEntriesGetFlagBehavior(Entries : PLLVMModuleFlagEntry;Index: Cardinal): TLLVMModuleFlagBehavior; cdecl; external CLLVMLibrary;
(**
* Returns the key for a module flag entry at a specific index.
*
* @see Module::ModuleFlagEntry::Key
*)
function LLVMModuleFlagEntriesGetKey(Entries: PLLVMModuleFlagEntry;Index: Cardinal; var Len:TLLVMSizeT):PLLVMChar;cdecl; external CLLVMLibrary;
(**
* Returns the metadata for a module flag entry at a specific index.
*
* @see Module::ModuleFlagEntry::Val
*)
function LLVMModuleFlagEntriesGetMetadata(Entries: PLLVMModuleFlagEntry; Index: Cardinal):TLLVMMetadataRef;cdecl; external CLLVMLibrary;
(**
* Add a module-level flag to the module-level flags metadata if it doesn't
* already exist.
*
* @see Module::getModuleFlag()
*)
function LLVMGetModuleFlag(M: TLLVMModuleRef; Key: PLLVMChar; KeyLen: TLLVMSizeT): TLLVMMetadataRef; cdecl; external CLLVMLibrary;
(**
* Add a module-level flag to the module-level flags metadata if it doesn't
* already exist.
*
* @see Module::addModuleFlag()
*)
procedure LLVMAddModuleFlag(M: TLLVMModuleRef; Behavior : TLLVMModuleFlagBehavior; Key: PLLVMChar;KeyLen:TLLVMSizeT; Val : TLLVMMetadataRef ); cdecl; external CLLVMLibrary;
procedure LLVMDumpModule(M: TLLVMModuleRef); cdecl; external CLLVMLibrary;
function LLVMPrintModuleToFile(M: TLLVMModuleRef; const Filename: PLLVMChar; out ErrorMessage: PLLVMChar): TLLVMBool; cdecl; external CLLVMLibrary;
function LLVMPrintModuleToString(M: TLLVMModuleRef): PLLVMChar; cdecl; external CLLVMLibrary;
(**
* Get inline assembly for a module.
*
* @see Module::getModuleInlineAsm()
*)
function LLVMGetModuleInlineAsm(M: TLLVMModuleRef; var Len: TLLVMSizeT): PLLVMChar;cdecl; external CLLVMLibrary;
(**
* Set inline assembly for a module.
*
* @see Module::setModuleInlineAsm()
*)
procedure LLVMSetModuleInlineAsm2(M: TLLVMModuleRef; const InlineAsm: PLLVMChar; Len: TLLVMSizeT); cdecl; external CLLVMLibrary;
(**
* Append inline assembly to a module.
*
* @see Module::appendModuleInlineAsm()
*)
procedure LLVMAppendModuleInlineAsm(M: TLLVMModuleRef; const InlineAsm: PLLVMChar; Len: TLLVMSizeT); cdecl; external CLLVMLibrary;
(**
* Create the specified uniqued inline asm string.
*
* @see InlineAsm::get()
*)
function LLVMGetInlineAsm(Ty : TLLVMTypeRef;
AsmString : PLLVMChar;
AsmStringSize : TLLVMSizeT;
Constraints : PLLVMChar;
ConstraintsSize : TLLVMSizeT;
HasSideEffects : TLLVMBool;
IsAlignStack : TLLVMBool;
Dialect : TLLVMInlineAsmDialect): TLLVMValueRef; cdecl; external CLLVMLibrary;
function LLVMGetModuleContext(M: TLLVMModuleRef): TLLVMContextRef; cdecl; external CLLVMLibrary;
function LLVMGetTypeByName(M: TLLVMModuleRef; const Name: PLLVMChar): TLLVMTypeRef; cdecl; external CLLVMLibrary;
(*
* Obtain an iterator to the first NamedMDNode in a Module.
*
* @see llvm::Module::named_metadata_begin()
*)
function LLVMGetFirstNamedMetadata(M: TLLVMModuleRef):TLLVMNamedMDNodeRef; cdecl; external CLLVMLibrary;
(**
* Obtain an iterator to the last NamedMDNode in a Module.
*
* @see llvm::Module::named_metadata_end()
*)
function LLVMGetLastNamedMetadata(M: TLLVMModuleRef):TLLVMNamedMDNodeRef ; cdecl; external CLLVMLibrary;
(**
* Advance a NamedMDNode iterator to the next NamedMDNode.
*
* Returns NULL if the iterator was already at the end and there are no more
* named metadata nodes.
*)
function LLVMGetNextNamedMetadata(NamedMDNode: TLLVMNamedMDNodeRef): TLLVMNamedMDNodeRef;cdecl; external CLLVMLibrary;
(**
* Decrement a NamedMDNode iterator to the previous NamedMDNode.
*
* Returns NULL if the iterator was already at the beginning and there are
* no previous named metadata nodes.
*)
function LLVMGetPreviousNamedMetadata(NamedMDNode: TLLVMNamedMDNodeRef): TLLVMNamedMDNodeRef;cdecl; external CLLVMLibrary;
(**
* Retrieve a NamedMDNode with the given name, returning NULL if no such
* node exists.
*
* @see llvm::Module::getNamedMetadata()
*)
function LLVMGetNamedMetadata(M: TLLVMModuleRef; const Name: PLLVMChar; NameLen: TLLVMSizeT ): TLLVMNamedMDNodeRef; cdecl; external CLLVMLibrary;
(**
* Retrieve a NamedMDNode with the given name, creating a new node if no such
* node exists.
*
* @see llvm::Module::getOrInsertNamedMetadata()
*)
function LLVMGetOrInsertNamedMetadata(M: TLLVMModuleRef;const Name: PLLVMChar; NameLen: TLLVMSizeT):TLLVMNamedMDNodeRef; cdecl; external CLLVMLibrary;
(**
* Retrieve the name of a NamedMDNode.
*
* @see llvm::NamedMDNode::getName()
*)
function LLVMGetNamedMetadataName(NamedMD: TLLVMNamedMDNodeRef; var NameLen:TLLVMSizeT): TLLVMNamedMDNodeRef; cdecl; external CLLVMLibrary;
function LLVMGetNamedMetadataNumOperands(M: TLLVMModuleRef; const Name: PLLVMChar): Cardinal; cdecl; external CLLVMLibrary;
procedure LLVMGetNamedMetadataOperands(M: TLLVMModuleRef; const Name: PLLVMChar; out Dest: PLLVMValueRef); cdecl; external CLLVMLibrary;
(*
* Add an operand to named metadata.
*
* @see llvm::Module::getNamedMetadata()
* @see llvm::MDNode::addOperand()
*)
procedure LLVMAddNamedMetadataOperand(M: TLLVMModuleRef; const Name: PLLVMChar; Val: TLLVMValueRef);cdecl; external CLLVMLibrary;
(**
* Return the directory of the debug location for this value, which must be
* an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
*
* @see llvm::Instruction::getDebugLoc()
* @see llvm::GlobalVariable::getDebugInfo()
* @see llvm::Function::getSubprogram()
*)
function LLVMGetDebugLocDirectory(Val: TLLVMValueRef; var Len: Cardinal):PLLVMChar; cdecl; external CLLVMLibrary;
(**
* Return the filename of the debug location for this value, which must be
* an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
*
* @see llvm::Instruction::getDebugLoc()
* @see llvm::GlobalVariable::getDebugInfo()
* @see llvm::Function::getSubprogram()
*)
function LLVMGetDebugLocFilename(Val: TLLVMValueRef; var Len: Cardinal):PLLVMChar; cdecl; external CLLVMLibrary;
(**
* Return the line number of the debug location for this value, which must be
* an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
*
* @see llvm::Instruction::getDebugLoc()
* @see llvm::GlobalVariable::getDebugInfo()
* @see llvm::Function::getSubprogram()
*)
function LLVMGetDebugLocLine(Val: TLLVMValueRef): Cardinal; cdecl; external CLLVMLibrary;
(**
* Return the column number of the debug location for this value, which must be
* an llvm::Instruction.
*
* @see llvm::Instruction::getDebugLoc()
*)
function LLVMGetDebugLocColumn(Val: TLLVMValueRef):Cardinal; cdecl; external CLLVMLibrary;
function LLVMAddFunction(M: TLLVMModuleRef; const Name: PLLVMChar; FunctionTy: TLLVMTypeRef): TLLVMValueRef; cdecl; external CLLVMLibrary;
(**
* Obtain a Function value from a Module by its name.
*
* The returned value corresponds to a llvm::Function value.
*
* @see llvm::Module::getFunction()
*)
function LLVMGetNamedFunction(M: TLLVMModuleRef; const Name: PLLVMChar): TLLVMValueRef; cdecl; external CLLVMLibrary;
function LLVMGetFirstFunction(M: TLLVMModuleRef): TLLVMValueRef; cdecl; external CLLVMLibrary;
function LLVMGetLastFunction(M: TLLVMModuleRef): TLLVMValueRef; cdecl; external CLLVMLibrary;
function LLVMGetNextFunction(Fn: TLLVMValueRef): TLLVMValueRef; cdecl; external CLLVMLibrary;
function LLVMGetPreviousFunction(Fn: TLLVMValueRef): TLLVMValueRef; cdecl; external CLLVMLibrary;
{* Deprecated: Use LLVMSetModuleInlineAsm2 instead. *}
procedure LLVMSetModuleInlineAsm(M: TLLVMModuleRef; const InlineAsm: PLLVMChar); cdecl; external CLLVMLibrary;
function LLVMGetTypeKind(Ty: TLLVMTypeRef): TLLVMTypeKind; cdecl; external CLLVMLibrary;
function LLVMTypeIsSized(Ty: TLLVMTypeRef): LongBool; cdecl; external CLLVMLibrary;
function LLVMGetTypeContext(Ty: TLLVMTypeRef): TLLVMContextRef; cdecl; external CLLVMLibrary;
procedure LLVMDumpType(Val: TLLVMTypeRef); cdecl; external CLLVMLibrary;
function LLVMPrintTypeToString(Val: TLLVMTypeRef): PLLVMChar; cdecl; external CLLVMLibrary;
(**
* @defgroup LLVMCCoreTypeInt Integer Types
*
* Functions in this section operate on integer types.
*
* @{
*)
(**
* Obtain an integer type from a context with specified bit width.
*)
function LLVMInt1TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt8TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt16TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt32TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt64TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt128TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMIntTypeInContext(C: TLLVMContextRef; NumBits: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
(**
* Obtain an integer type from the global context with a specified bit
* width.
*)
function LLVMInt1Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt8Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt16Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt32Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt64Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMInt128Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMIntType(NumBits: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMGetIntTypeWidth(IntegerTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMHalfTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMFloatTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMDoubleTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMX86FP80TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMFP128TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMPPCFP128TypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMHalfType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMFloatType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMDoubleType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMX86FP80Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMFP128Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMPPCFP128Type: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMFunctionType(ReturnType: TLLVMTypeRef; ParamTypes: PLLVMTypeRef; ParamCount: Cardinal; IsVarArg: LongBool): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMIsFunctionVarArg(FunctionTy: TLLVMTypeRef): LongBool; cdecl; external CLLVMLibrary;
function LLVMGetReturnType(FunctionTy: TLLVMTypeRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMCountParamTypes(FunctionTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
procedure LLVMGetParamTypes(FunctionTy: TLLVMTypeRef; out Dest: PLLVMTypeRef); cdecl; external CLLVMLibrary;
function LLVMStructTypeInContext(C: TLLVMContextRef; ElementTypes: PLLVMTypeRef; ElementCount: Cardinal; IsPacked: LongBool): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMStructType(ElementTypes: PLLVMTypeRef; ElementCount: Cardinal; IsPacked: LongBool): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMStructCreateNamed(C: TLLVMContextRef; const Name: PLLVMChar): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMGetStructName(Ty: TLLVMTypeRef): PLLVMChar; cdecl; external CLLVMLibrary;
procedure LLVMStructSetBody(StructTy: TLLVMTypeRef; ElementTypes: PLLVMTypeRef; ElementCount: Cardinal; IsPacked: LongBool); cdecl; external CLLVMLibrary;
function LLVMCountStructElementTypes(StructTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
procedure LLVMGetStructElementTypes(StructTy: TLLVMTypeRef; Dest: PLLVMTypeRef); cdecl; external CLLVMLibrary;
function LLVMStructGetTypeAtIndex(StructTy: TLLVMTypeRef; i: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMIsPackedStruct(StructTy: TLLVMTypeRef): LongBool; cdecl; external CLLVMLibrary;
function LLVMIsOpaqueStruct(StructTy: TLLVMTypeRef): LongBool; cdecl; external CLLVMLibrary;
(**
* Determine whether a structure is literal.
*
* @see llvm::StructType::isLiteral()
*)
function LLVMIsLiteralStruct(StructTy: TLLVMTypeRef): TLLVMBool; cdecl; external CLLVMLibrary;
function LLVMGetElementType(Ty: TLLVMTypeRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
procedure LLVMGetSubtypes(Tp: TLLVMTypeRef; out Arr: PLLVMTypeRef); cdecl; external CLLVMLibrary;
function LLVMGetNumContainedTypes(Tp: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMArrayType(ElementType: TLLVMTypeRef; ElementCount: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMGetArrayLength(ArrayTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMPointerType(ElementType: TLLVMTypeRef; AddressSpace: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMGetPointerAddressSpace(PointerTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMVectorType(ElementType: TLLVMTypeRef; ElementCount: Cardinal): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMGetVectorSize(VectorTy: TLLVMTypeRef): Cardinal; cdecl; external CLLVMLibrary;
function LLVMVoidTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMLabelTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMX86MMXTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
(**
* Create a token type in a context.
*)
function LLVMTokenTypeInContext(C: TLLVMContextRef): TLLVMTypeRef; cdecl; external CLLVMLibrary;
(**
* Create a metadata type in a context.
*)
function LLVMMetadataTypeInContext(C: TLLVMContextRef): TLLVMTypeRef;cdecl; external CLLVMLibrary;
function LLVMVoidType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMLabelType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
function LLVMX86MMXType: TLLVMTypeRef; cdecl; external CLLVMLibrary;
(**
* @}
*/
/**
* @}
*/
/**
* @defgroup LLVMCCoreValues Values
*
* The bulk of LLVM's object model consists of values, which comprise a very
* rich type hierarchy.
*
* LLVMValueRef essentially represents llvm::Value. There is a rich
* hierarchy of classes within this type. Depending on the instance
* obtained, not all APIs are available.
*
* Callers can determine the type of an LLVMValueRef by calling the
* LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These
* functions are defined by a macro, so it isn't obvious which are
* available by looking at the Doxygen source code. Instead, look at the
* source definition of LLVM_FOR_EACH_VALUE_SUBCLASS and note the list
* of value names given. These value names also correspond to classes in
* the llvm::Value hierarchy.
*
* @{
*)
{/*--.. Conversion functions ................................................--*/}
function LLVMIsAArgument (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsABasicBlock (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAInlineAsm (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAUser (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstant (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsABlockAddress (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantAggregateZero (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantArray (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantDataSequential(Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantDataArray (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantDataVector (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantExpr (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantFP (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantInt (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantPointerNull (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantStruct (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantTokenNone (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAConstantVector (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAGlobalValue (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAGlobalAlias (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAGlobalIFunc (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAGlobalObject (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAfunction (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAGlobalVariable (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAUndefValue (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAInstruction (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAUnaryOperator (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsABinaryOperator (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsACallInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAIntrinsicInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsADbgInfoIntrinsic (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsADbgVariableIntrinsic (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsADbgDeclareInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsADbgLabelInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAMemIntrinsic (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAMemCpyInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAMemMoveInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAMemSetInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsACmpInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAFCmpInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;
function LLVMIsAICmpInst (Val: TLLVMValueRef ): TLLVMValueRef ; cdecl; external CLLVMLibrary;