LLVM 24.0.0git
Core.h
Go to the documentation of this file.
1/*===-- llvm-c/Core.h - Core Library C Interface ------------------*- C -*-===*\
2|* *|
3|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4|* Exceptions. *|
5|* See https://llvm.org/LICENSE.txt for license information. *|
6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header declares the C interface to libLLVMCore.a, which implements *|
11|* the LLVM intermediate representation. *|
12|* *|
13\*===----------------------------------------------------------------------===*/
14
15#ifndef LLVM_C_CORE_H
16#define LLVM_C_CORE_H
17
18#include "llvm-c/Deprecated.h"
20#include "llvm-c/ExternC.h"
21#include "llvm-c/Visibility.h"
22
23#include "llvm-c/Types.h"
24
26
27/**
28 * @defgroup LLVMC LLVM-C: C interface to LLVM
29 *
30 * This module exposes parts of the LLVM library as a C API.
31 *
32 * @{
33 */
34
35/**
36 * @defgroup LLVMCTransforms Transforms
37 */
38
39/**
40 * @defgroup LLVMCCore Core
41 *
42 * This modules provide an interface to libLLVMCore, which implements
43 * the LLVM intermediate representation as well as other related types
44 * and utilities.
45 *
46 * Many exotic languages can interoperate with C code but have a harder time
47 * with C++ due to name mangling. So in addition to C, this interface enables
48 * tools written in such languages.
49 *
50 * @{
51 */
52
53/**
54 * @defgroup LLVMCCoreTypes Types and Enumerations
55 *
56 * @{
57 */
58
59/// External users depend on the following values being stable. It is not safe
60/// to reorder them.
61// clang-format off
62typedef enum {
63 /* Terminator Instructions */
65 /* removed 2 due to API changes */
71 /* removed 6 due to API changes */
74
75 /* Standard Unary Operators */
77
78 /* Standard Binary Operators */
81 LLVMSub = 10,
83 LLVMMul = 12,
91
92 /* Logical Operators */
93 LLVMShl = 20,
96 LLVMAnd = 23,
97 LLVMOr = 24,
98 LLVMXor = 25,
99
100 /* Memory Operators */
105
106 /* Cast Operators */
121
122 /* Other Operators */
139
140 /* Atomic operators */
144
145 /* Exception Handling Operators */
153} LLVMOpcode;
154// clang-format on
155
156typedef enum {
157 LLVMVoidTypeKind = 0, /**< type with no size */
158 LLVMHalfTypeKind = 1, /**< 16 bit floating point type */
159 LLVMFloatTypeKind = 2, /**< 32 bit floating point type */
160 LLVMDoubleTypeKind = 3, /**< 64 bit floating point type */
161 LLVMX86_FP80TypeKind = 4, /**< 80 bit floating point type (X87) */
162 LLVMFP128TypeKind = 5, /**< 128 bit floating point type (112-bit mantissa)*/
163 LLVMPPC_FP128TypeKind = 6, /**< 128 bit floating point type (two 64-bits) */
164 LLVMLabelTypeKind = 7, /**< Labels */
165 LLVMIntegerTypeKind = 8, /**< Arbitrary bit width integers */
166 LLVMFunctionTypeKind = 9, /**< Functions */
167 LLVMStructTypeKind = 10, /**< Structures */
168 LLVMArrayTypeKind = 11, /**< Arrays */
169 LLVMPointerTypeKind = 12, /**< Pointers */
170 LLVMVectorTypeKind = 13, /**< Fixed width SIMD vector type */
171 LLVMMetadataTypeKind = 14, /**< Metadata */
172 /* 15 previously used by LLVMX86_MMXTypeKind */
173 LLVMTokenTypeKind = 16, /**< Tokens */
174 LLVMScalableVectorTypeKind = 17, /**< Scalable SIMD vector type */
175 LLVMBFloatTypeKind = 18, /**< 16 bit brain floating point type */
176 LLVMX86_AMXTypeKind = 19, /**< X86 AMX */
177 LLVMTargetExtTypeKind = 20, /**< Target extension type */
178 LLVMByteTypeKind = 21, /**< Arbitrary bit width bytes */
180
181typedef enum {
182 LLVMExternalLinkage, /**< Externally visible function */
184 LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/
185 LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something
186 equivalent. */
188 LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */
189 LLVMWeakODRLinkage, /**< Same, but only replaced by something
190 equivalent. */
191 LLVMAppendingLinkage, /**< Special purpose, only applies to global arrays */
192 LLVMInternalLinkage, /**< Rename collisions when linking (static
193 functions) */
194 LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */
195 LLVMDLLImportLinkage, /**< Obsolete */
196 LLVMDLLExportLinkage, /**< Obsolete */
197 LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */
198 LLVMGhostLinkage, /**< Obsolete */
199 LLVMCommonLinkage, /**< Tentative definitions */
200 LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */
201 LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */
203
204typedef enum {
205 LLVMDefaultVisibility, /**< The GV is visible */
206 LLVMHiddenVisibility, /**< The GV is hidden */
207 LLVMProtectedVisibility /**< The GV is protected */
209
210typedef enum {
211 LLVMNoUnnamedAddr, /**< Address of the GV is significant. */
212 LLVMLocalUnnamedAddr, /**< Address of the GV is locally insignificant. */
213 LLVMGlobalUnnamedAddr /**< Address of the GV is globally insignificant. */
215
216typedef enum {
218 LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */
219 LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */
221
265
301
302typedef enum {
303 LLVMIntEQ = 32, /**< equal */
304 LLVMIntNE, /**< not equal */
305 LLVMIntUGT, /**< unsigned greater than */
306 LLVMIntUGE, /**< unsigned greater or equal */
307 LLVMIntULT, /**< unsigned less than */
308 LLVMIntULE, /**< unsigned less or equal */
309 LLVMIntSGT, /**< signed greater than */
310 LLVMIntSGE, /**< signed greater or equal */
311 LLVMIntSLT, /**< signed less than */
312 LLVMIntSLE /**< signed less or equal */
314
315typedef enum {
316 LLVMRealPredicateFalse, /**< Always false (always folded) */
317 LLVMRealOEQ, /**< True if ordered and equal */
318 LLVMRealOGT, /**< True if ordered and greater than */
319 LLVMRealOGE, /**< True if ordered and greater than or equal */
320 LLVMRealOLT, /**< True if ordered and less than */
321 LLVMRealOLE, /**< True if ordered and less than or equal */
322 LLVMRealONE, /**< True if ordered and operands are unequal */
323 LLVMRealORD, /**< True if ordered (no nans) */
324 LLVMRealUNO, /**< True if unordered: isnan(X) | isnan(Y) */
325 LLVMRealUEQ, /**< True if unordered or equal */
326 LLVMRealUGT, /**< True if unordered or greater than */
327 LLVMRealUGE, /**< True if unordered, greater than, or equal */
328 LLVMRealULT, /**< True if unordered or less than */
329 LLVMRealULE, /**< True if unordered, less than, or equal */
330 LLVMRealUNE, /**< True if unordered or not equal */
331 LLVMRealPredicateTrue /**< Always true (always folded) */
333
341
342typedef enum {
343 LLVMAtomicOrderingNotAtomic = 0, /**< A load or store which is not atomic */
344 LLVMAtomicOrderingUnordered = 1, /**< Lowest level of atomicity, guarantees
345 somewhat sane results, lock free. */
346 LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the
347 operations affecting a specific address,
348 a consistent ordering exists */
349 LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort
350 necessary to acquire a lock to access other
351 memory with normal loads and stores. */
352 LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with
353 a barrier of the sort necessary to release
354 a lock. */
355 LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a
356 Release barrier (for fences and
357 operations which both read and write
358 memory). */
359 LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics
360 for loads and Release
361 semantics for stores.
362 Additionally, it guarantees
363 that a total ordering exists
364 between all
365 SequentiallyConsistent
366 operations. */
368
369typedef enum {
370 LLVMAtomicRMWBinOpXchg, /**< Set the new value and return the one old */
371 LLVMAtomicRMWBinOpAdd, /**< Add a value and return the old one */
372 LLVMAtomicRMWBinOpSub, /**< Subtract a value and return the old one */
373 LLVMAtomicRMWBinOpAnd, /**< And a value and return the old one */
374 LLVMAtomicRMWBinOpNand, /**< Not-And a value and return the old one */
375 LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */
376 LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */
377 LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the
378 original using a signed comparison and return
379 the old one */
380 LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the
381 original using a signed comparison and return
382 the old one */
383 LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the
384 original using an unsigned comparison and return
385 the old one */
386 LLVMAtomicRMWBinOpUMin, /**< Sets the value if it's greater than the
387 original using an unsigned comparison and return
388 the old one */
389 LLVMAtomicRMWBinOpFAdd, /**< Add a floating point value and return the
390 old one */
391 LLVMAtomicRMWBinOpFSub, /**< Subtract a floating point value and return the
392 old one */
393 LLVMAtomicRMWBinOpFMax, /**< Sets the value if it's greater than the
394 original using an floating point comparison and
395 return the old one */
396 LLVMAtomicRMWBinOpFMin, /**< Sets the value if it's smaller than the
397 original using an floating point comparison and
398 return the old one */
399 LLVMAtomicRMWBinOpUIncWrap, /**< Increments the value, wrapping back to zero
400 when incremented above input value */
401 LLVMAtomicRMWBinOpUDecWrap, /**< Decrements the value, wrapping back to
402 the input value when decremented below zero */
403 LLVMAtomicRMWBinOpUSubCond, /**<Subtracts the value only if no unsigned
404 overflow */
405 LLVMAtomicRMWBinOpUSubSat, /**<Subtracts the value, clamping to zero */
406 LLVMAtomicRMWBinOpFMaximum, /**< Sets the value if it's greater than the
407 original using an floating point comparison and
408 return the old one */
409 LLVMAtomicRMWBinOpFMinimum, /**< Sets the value if it's smaller than the
410 original using an floating point comparison and
411 return the old one */
412 LLVMAtomicRMWBinOpFMaximumNum, /**< Sets the value if it's greater than the
413 original using an floating point comparison and
414 return the old one */
415 LLVMAtomicRMWBinOpFMinimumNum, /**< Sets the value if it's smaller than the
416 original using an floating point comparison and
417 return the old one */
419
426
431
432typedef enum {
433 /**
434 * Emits an error if two values disagree, otherwise the resulting value is
435 * that of the operands.
436 *
437 * @see Module::ModFlagBehavior::Error
438 */
440 /**
441 * Emits a warning if two values disagree. The result value will be the
442 * operand for the flag from the first module being linked.
443 *
444 * @see Module::ModFlagBehavior::Warning
445 */
447 /**
448 * Adds a requirement that another module flag be present and have a
449 * specified value after linking is performed. The value must be a metadata
450 * pair, where the first element of the pair is the ID of the module flag
451 * to be restricted, and the second element of the pair is the value the
452 * module flag should be restricted to. This behavior can be used to
453 * restrict the allowable results (via triggering of an error) of linking
454 * IDs with the **Override** behavior.
455 *
456 * @see Module::ModFlagBehavior::Require
457 */
459 /**
460 * Uses the specified value, regardless of the behavior or value of the
461 * other module. If both modules specify **Override**, but the values
462 * differ, an error will be emitted.
463 *
464 * @see Module::ModFlagBehavior::Override
465 */
467 /**
468 * Appends the two values, which are required to be metadata nodes.
469 *
470 * @see Module::ModFlagBehavior::Append
471 */
473 /**
474 * Appends the two values, which are required to be metadata
475 * nodes. However, duplicate entries in the second list are dropped
476 * during the append operation.
477 *
478 * @see Module::ModFlagBehavior::AppendUnique
479 */
482
483/**
484 * Attribute index are either LLVMAttributeReturnIndex,
485 * LLVMAttributeFunctionIndex or a parameter number from 1 to N.
486 */
487enum {
489 // ISO C restricts enumerator values to range of 'int'
490 // (4294967295 is too large)
491 // LLVMAttributeFunctionIndex = ~0U,
493};
494
495typedef unsigned LLVMAttributeIndex;
496
497/**
498 * Tail call kind for LLVMSetTailCallKind and LLVMGetTailCallKind.
499 *
500 * Note that 'musttail' implies 'tail'.
501 *
502 * @see CallInst::TailCallKind
503 */
510
511enum {
524};
525
526/**
527 * Flags to indicate what fast-math-style optimizations are allowed
528 * on operations.
529 *
530 * See https://llvm.org/docs/LangRef.html#fast-math-flags
531 */
532typedef unsigned LLVMFastMathFlags;
533
534enum {
536 LLVMGEPFlagNUSW = (1 << 1),
537 LLVMGEPFlagNUW = (1 << 2),
538};
539
540/**
541 * Flags that constrain the allowed wrap semantics of a getelementptr
542 * instruction.
543 *
544 * See https://llvm.org/docs/LangRef.html#getelementptr-instruction
545 */
546typedef unsigned LLVMGEPNoWrapFlags;
547
554
555/**
556 * @}
557 */
558
559/** Deallocate and destroy all ManagedStatic variables.
560 @see llvm::llvm_shutdown
561 @see ManagedStatic */
562LLVM_C_ABI void LLVMShutdown(void);
563
564/*===-- Version query -----------------------------------------------------===*/
565
566/**
567 * Return the major, minor, and patch version of LLVM
568 *
569 * The version components are returned via the function's three output
570 * parameters or skipped if a NULL pointer was supplied.
571 */
572LLVM_C_ABI void LLVMGetVersion(unsigned *Major, unsigned *Minor,
573 unsigned *Patch);
574
575/*===-- Error handling ----------------------------------------------------===*/
576
577LLVM_C_ABI char *LLVMCreateMessage(const char *Message);
578LLVM_C_ABI void LLVMDisposeMessage(char *Message);
579
580/**
581 * @defgroup LLVMCCoreContext Contexts
582 *
583 * Contexts are execution states for the core LLVM IR system.
584 *
585 * Most types are tied to a context instance. Multiple contexts can
586 * exist simultaneously. A single context is not thread safe. However,
587 * different contexts can execute on different threads simultaneously.
588 *
589 * @{
590 */
591
593typedef void (*LLVMYieldCallback)(LLVMContextRef, void *);
594
595/**
596 * Create a new context.
597 *
598 * Every call to this function should be paired with a call to
599 * LLVMContextDispose() or the context will leak memory.
600 */
602
603/**
604 * Obtain the global context instance.
605 */
608 "Use of the global context is deprecated, create "
609 "one using LLVMContextCreate instead");
610
611/**
612 * Set the diagnostic handler for this context.
613 */
615 LLVMDiagnosticHandler Handler,
616 void *DiagnosticContext);
617
618/**
619 * Get the diagnostic handler of this context.
620 */
623
624/**
625 * Get the diagnostic context of this context.
626 */
628
629/**
630 * Set the yield callback function for this context.
631 *
632 * @see LLVMContext::setYieldCallback()
633 */
635 LLVMYieldCallback Callback,
636 void *OpaqueHandle);
637
638/**
639 * Retrieve whether the given context is set to discard all value names.
640 *
641 * @see LLVMContext::shouldDiscardValueNames()
642 */
644
645/**
646 * Set whether the given context discards all value names.
647 *
648 * If true, only the names of GlobalValue objects will be available in the IR.
649 * This can be used to save memory and runtime, especially in release mode.
650 *
651 * @see LLVMContext::setDiscardValueNames()
652 */
654 LLVMBool Discard);
655
656/**
657 * Destroy a context instance.
658 *
659 * This should be called for every call to LLVMContextCreate() or memory
660 * will be leaked.
661 */
663
664/**
665 * Return a string representation of the DiagnosticInfo. Use
666 * LLVMDisposeMessage to free the string.
667 *
668 * @see DiagnosticInfo::print()
669 */
671
672/**
673 * Return an enum LLVMDiagnosticSeverity.
674 *
675 * @see DiagnosticInfo::getSeverity()
676 */
679
680LLVM_C_ABI unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name,
681 unsigned SLen);
683 unsigned LLVMGetMDKindID(const char *Name, unsigned SLen),
684 "Use of the global context is deprecated, use LLVMGetMDKindIDInContext "
685 "instead");
686
687/**
688 * Maps a synchronization scope name to a ID unique within this context.
689 */
690LLVM_C_ABI unsigned LLVMGetSyncScopeID(LLVMContextRef C, const char *Name,
691 size_t SLen);
692
693/**
694 * Return an unique id given the name of a enum attribute,
695 * or 0 if no attribute by that name exists.
696 *
697 * See http://llvm.org/docs/LangRef.html#parameter-attributes
698 * and http://llvm.org/docs/LangRef.html#function-attributes
699 * for the list of available attributes.
700 *
701 * NB: Attribute names and/or id are subject to change without
702 * going through the C API deprecation cycle.
703 */
704LLVM_C_ABI unsigned LLVMGetEnumAttributeKindForName(const char *Name,
705 size_t SLen);
707
708/**
709 * Create an enum attribute.
710 */
712 unsigned KindID,
713 uint64_t Val);
714
715/**
716 * Get the unique id corresponding to the enum attribute
717 * passed as argument.
718 */
720
721/**
722 * Get the enum attribute's value. 0 is returned if none exists.
723 */
725
726/**
727 * Create a type attribute
728 */
730 unsigned KindID,
731 LLVMTypeRef type_ref);
732
733/**
734 * Get the type attribute's value.
735 */
737
738/**
739 * Create a ConstantRange attribute.
740 *
741 * LowerWords and UpperWords need to be NumBits divided by 64 rounded up
742 * elements long.
743 */
745 LLVMContextRef C, unsigned KindID, unsigned NumBits,
746 const uint64_t LowerWords[], const uint64_t UpperWords[]);
747
748/**
749 * Represent different denormal handling kinds for use with
750 * LLVMCreateDenormalFPEnvAttribute.
751 */
758
759/**
760 * Create a DenormalFPEnv attribute.
761 *
762 * \p DefaultModeOutput is the assumed denormal handling for the outputs of most
763 * floating-point types.
764 *
765 * \p DefaultModeInput is the assumed denormal handling for the inputs of most
766 * floating-point types.
767 *
768 * \p FloatModeOutput is the assumed denormal handling for the outputs of
769 * float. This should always be the same as as DefaultModeOutput for most
770 * targets.
771 *
772 * \p FloatModeInput is the assumed denormal handling for the inputs of
773 * float. This should always be the same as as DefaultModeInput for most
774 * targets.
775 *
776 */
778 LLVMContextRef C, LLVMDenormalModeKind DefaultModeOutput,
779 LLVMDenormalModeKind DefaultModeInput, LLVMDenormalModeKind FloatModeOutput,
780 LLVMDenormalModeKind FloatModeInput);
781
782/**
783 * Create a string attribute.
784 */
786 const char *K,
787 unsigned KLength,
788 const char *V,
789 unsigned VLength);
790
791/**
792 * Get the string attribute's kind.
793 */
795 unsigned *Length);
796
797/**
798 * Get the string attribute's value.
799 */
801 unsigned *Length);
802
803/**
804 * Check for the different types of attributes.
805 */
809
810/**
811 * Obtain a Type from a context by its registered name.
812 */
814
815/**
816 * @}
817 */
818
819/**
820 * @defgroup LLVMCCoreModule Modules
821 *
822 * Modules represent the top-level structure in an LLVM program. An LLVM
823 * module is effectively a translation unit or a collection of
824 * translation units merged together.
825 *
826 * @{
827 */
828
829/**
830 * Create a new, empty module in the global context.
831 *
832 * This is equivalent to calling LLVMModuleCreateWithNameInContext with
833 * LLVMGetGlobalContext() as the context parameter.
834 *
835 * Every invocation should be paired with LLVMDisposeModule() or memory
836 * will be leaked.
837 */
839 LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID),
840 "Use of the global context is deprecated, use "
841 "LLVMModuleCreateWithNameInContext instead");
842
843/**
844 * Create a new, empty module in a specific context.
845 *
846 * Every invocation should be paired with LLVMDisposeModule() or memory
847 * will be leaked.
848 */
851/**
852 * Return an exact copy of the specified module.
853 */
855
856/**
857 * Destroy a module instance.
858 *
859 * This must be called for every created module or memory will be
860 * leaked.
861 */
863
864/**
865 * Soon to be deprecated.
866 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
867 *
868 * Returns true if the module is in the new debug info mode which uses
869 * non-instruction debug records instead of debug intrinsics for variable
870 * location tracking.
871 */
873
874/**
875 * Soon to be deprecated.
876 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
877 *
878 * Convert module into desired debug info format.
879 */
881 LLVMBool UseNewFormat);
882
883/**
884 * Obtain the identifier of a module.
885 *
886 * @param M Module to obtain identifier of
887 * @param Len Out parameter which holds the length of the returned string.
888 * @return The identifier of M.
889 * @see Module::getModuleIdentifier()
890 */
891LLVM_C_ABI const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len);
892
893/**
894 * Set the identifier of a module to a string Ident with length Len.
895 *
896 * @param M The module to set identifier
897 * @param Ident The string to set M's identifier to
898 * @param Len Length of Ident
899 * @see Module::setModuleIdentifier()
900 */
901LLVM_C_ABI void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident,
902 size_t Len);
903
904/**
905 * Obtain the module's original source file name.
906 *
907 * @param M Module to obtain the name of
908 * @param Len Out parameter which holds the length of the returned string
909 * @return The original source file name of M
910 * @see Module::getSourceFileName()
911 */
912LLVM_C_ABI const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len);
913
914/**
915 * Set the original source file name of a module to a string Name with length
916 * Len.
917 *
918 * @param M The module to set the source file name of
919 * @param Name The string to set M's source file name to
920 * @param Len Length of Name
921 * @see Module::setSourceFileName()
922 */
923LLVM_C_ABI void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name,
924 size_t Len);
925
926/**
927 * Obtain the data layout for a module.
928 *
929 * @see Module::getDataLayoutStr()
930 *
931 * LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect,
932 * but match the name of another method on the module. Prefer the use
933 * of LLVMGetDataLayoutStr, which is not ambiguous.
934 */
937
938/**
939 * Set the data layout for a module.
940 *
941 * @see Module::setDataLayout()
942 */
943LLVM_C_ABI void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr);
944
945/**
946 * Obtain the target triple for a module.
947 *
948 * @see Module::getTargetTriple()
949 */
951
952/**
953 * Set the target triple for a module.
954 *
955 * @see Module::setTargetTriple()
956 */
957LLVM_C_ABI void LLVMSetTarget(LLVMModuleRef M, const char *Triple);
958
959/**
960 * Returns the module flags as an array of flag-key-value triples. The caller
961 * is responsible for freeing this array by calling
962 * \c LLVMDisposeModuleFlagsMetadata.
963 *
964 * @see Module::getModuleFlagsMetadata()
965 */
967 size_t *Len);
968
969/**
970 * Destroys module flags metadata entries.
971 */
973
974/**
975 * Returns the flag behavior for a module flag entry at a specific index.
976 *
977 * @see Module::ModuleFlagEntry::Behavior
978 */
980 LLVMModuleFlagEntry *Entries, unsigned Index);
981
982/**
983 * Returns the key for a module flag entry at a specific index.
984 *
985 * @see Module::ModuleFlagEntry::Key
986 */
988 unsigned Index, size_t *Len);
989
990/**
991 * Returns the metadata for a module flag entry at a specific index.
992 *
993 * @see Module::ModuleFlagEntry::Val
994 */
997
998/**
999 * Add a module-level flag to the module-level flags metadata if it doesn't
1000 * already exist.
1001 *
1002 * @see Module::getModuleFlag()
1003 */
1005 size_t KeyLen);
1006
1007/**
1008 * Add a module-level flag to the module-level flags metadata if it doesn't
1009 * already exist.
1010 *
1011 * @see Module::addModuleFlag()
1012 */
1014 LLVMModuleFlagBehavior Behavior,
1015 const char *Key, size_t KeyLen,
1016 LLVMMetadataRef Val);
1017
1018/**
1019 * Dump a representation of a module to stderr.
1020 *
1021 * @see Module::dump()
1022 */
1024
1025/**
1026 * Print a representation of a module to a file. The ErrorMessage needs to be
1027 * disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.
1028 *
1029 * @see Module::print()
1030 */
1032 char **ErrorMessage);
1033
1034/**
1035 * Return a string representation of the module. Use
1036 * LLVMDisposeMessage to free the string.
1037 *
1038 * @see Module::print()
1039 */
1041
1042/**
1043 * Get inline assembly for a module.
1044 *
1045 * @see Module::getModuleInlineAsm()
1046 */
1047LLVM_C_ABI const char *LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len);
1048
1049/**
1050 * Set inline assembly for a module.
1051 *
1052 * @see Module::setModuleInlineAsm()
1053 */
1054LLVM_C_ABI void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm,
1055 size_t Len);
1056
1057/**
1058 * Append inline assembly to a module.
1059 *
1060 * @see Module::appendModuleInlineAsm()
1061 */
1062LLVM_C_ABI void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm,
1063 size_t Len);
1064
1065/**
1066 * Create the specified uniqued inline asm string.
1067 *
1068 * @see InlineAsm::get()
1069 */
1071 LLVMTypeRef Ty, const char *AsmString, size_t AsmStringSize,
1072 const char *Constraints, size_t ConstraintsSize, LLVMBool HasSideEffects,
1073 LLVMBool IsAlignStack, LLVMInlineAsmDialect Dialect, LLVMBool CanThrow);
1074
1075/**
1076 * Get the template string used for an inline assembly snippet
1077 *
1078 */
1079LLVM_C_ABI const char *LLVMGetInlineAsmAsmString(LLVMValueRef InlineAsmVal,
1080 size_t *Len);
1081
1082/**
1083 * Get the raw constraint string for an inline assembly snippet
1084 *
1085 */
1086LLVM_C_ABI const char *
1087LLVMGetInlineAsmConstraintString(LLVMValueRef InlineAsmVal, size_t *Len);
1088
1089/**
1090 * Get the dialect used by the inline asm snippet
1091 *
1092 */
1095
1096/**
1097 * Get the function type of the inline assembly snippet. The same type that
1098 * was passed into LLVMGetInlineAsm originally
1099 *
1100 * @see LLVMGetInlineAsm
1101 *
1102 */
1104
1105/**
1106 * Get if the inline asm snippet has side effects
1107 *
1108 */
1110
1111/**
1112 * Get if the inline asm snippet needs an aligned stack
1113 *
1114 */
1117
1118/**
1119 * Get if the inline asm snippet may unwind the stack
1120 *
1121 */
1123
1124/**
1125 * Obtain the context to which this module is associated.
1126 *
1127 * @see Module::getContext()
1128 */
1130
1131/** Deprecated: Use LLVMGetTypeByName2 instead. */
1133
1134/**
1135 * Obtain an iterator to the first NamedMDNode in a Module.
1136 *
1137 * @see llvm::Module::named_metadata_begin()
1138 */
1140
1141/**
1142 * Obtain an iterator to the last NamedMDNode in a Module.
1143 *
1144 * @see llvm::Module::named_metadata_end()
1145 */
1147
1148/**
1149 * Advance a NamedMDNode iterator to the next NamedMDNode.
1150 *
1151 * Returns NULL if the iterator was already at the end and there are no more
1152 * named metadata nodes.
1153 */
1156
1157/**
1158 * Decrement a NamedMDNode iterator to the previous NamedMDNode.
1159 *
1160 * Returns NULL if the iterator was already at the beginning and there are
1161 * no previous named metadata nodes.
1162 */
1165
1166/**
1167 * Retrieve a NamedMDNode with the given name, returning NULL if no such
1168 * node exists.
1169 *
1170 * @see llvm::Module::getNamedMetadata()
1171 */
1173 const char *Name,
1174 size_t NameLen);
1175
1176/**
1177 * Retrieve a NamedMDNode with the given name, creating a new node if no such
1178 * node exists.
1179 *
1180 * @see llvm::Module::getOrInsertNamedMetadata()
1181 */
1183 const char *Name,
1184 size_t NameLen);
1185
1186/**
1187 * Retrieve the name of a NamedMDNode.
1188 *
1189 * @see llvm::NamedMDNode::getName()
1190 */
1192 size_t *NameLen);
1193
1194/**
1195 * Obtain the number of operands for named metadata in a module.
1196 *
1197 * @see llvm::Module::getNamedMetadata()
1198 */
1200 const char *Name);
1201
1202/**
1203 * Obtain the named metadata operands for a module.
1204 *
1205 * The passed LLVMValueRef pointer should refer to an array of
1206 * LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This
1207 * array will be populated with the LLVMValueRef instances. Each
1208 * instance corresponds to a llvm::MDNode.
1209 *
1210 * @see llvm::Module::getNamedMetadata()
1211 * @see llvm::MDNode::getOperand()
1212 */
1214 LLVMValueRef *Dest);
1215
1216/**
1217 * Add an operand to named metadata.
1218 *
1219 * @see llvm::Module::getNamedMetadata()
1220 * @see llvm::MDNode::addOperand()
1221 */
1223 LLVMValueRef Val);
1224
1225/**
1226 * Return the directory of the debug location for this value, which must be
1227 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1228 *
1229 * @see llvm::Instruction::getDebugLoc()
1230 * @see llvm::GlobalVariable::getDebugInfo()
1231 * @see llvm::Function::getSubprogram()
1232 */
1234 unsigned *Length);
1235
1236/**
1237 * Return the filename of the debug location for this value, which must be
1238 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1239 *
1240 * @see llvm::Instruction::getDebugLoc()
1241 * @see llvm::GlobalVariable::getDebugInfo()
1242 * @see llvm::Function::getSubprogram()
1243 */
1245 unsigned *Length);
1246
1247/**
1248 * Return the line number of the debug location for this value, which must be
1249 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1250 *
1251 * @see llvm::Instruction::getDebugLoc()
1252 * @see llvm::GlobalVariable::getDebugInfo()
1253 * @see llvm::Function::getSubprogram()
1254 */
1256
1257/**
1258 * Return the column number of the debug location for this value, which must be
1259 * an llvm::Instruction.
1260 *
1261 * @see llvm::Instruction::getDebugLoc()
1262 */
1264
1265/**
1266 * Add a function to a module under a specified name.
1267 *
1268 * @see llvm::Function::Create()
1269 */
1271 LLVMTypeRef FunctionTy);
1272
1273/**
1274 * Obtain or insert a function into a module.
1275 *
1276 * If a function with the specified name already exists in the module, it
1277 * is returned. Otherwise, a new function is created in the module with the
1278 * specified name and type and is returned.
1279 *
1280 * The returned value corresponds to a llvm::Function instance.
1281 *
1282 * @see llvm::Module::getOrInsertFunction()
1283 */
1285 const char *Name,
1286 size_t NameLen,
1287 LLVMTypeRef FunctionTy);
1288
1289/**
1290 * Obtain a Function value from a Module by its name.
1291 *
1292 * The returned value corresponds to a llvm::Function value.
1293 *
1294 * @see llvm::Module::getFunction()
1295 */
1297
1298/**
1299 * Obtain a Function value from a Module by its name.
1300 *
1301 * The returned value corresponds to a llvm::Function value.
1302 *
1303 * @see llvm::Module::getFunction()
1304 */
1306 const char *Name,
1307 size_t Length);
1308
1309/**
1310 * Obtain an iterator to the first Function in a Module.
1311 *
1312 * @see llvm::Module::begin()
1313 */
1315
1316/**
1317 * Obtain an iterator to the last Function in a Module.
1318 *
1319 * @see llvm::Module::end()
1320 */
1322
1323/**
1324 * Advance a Function iterator to the next Function.
1325 *
1326 * Returns NULL if the iterator was already at the end and there are no more
1327 * functions.
1328 */
1330
1331/**
1332 * Decrement a Function iterator to the previous Function.
1333 *
1334 * Returns NULL if the iterator was already at the beginning and there are
1335 * no previous functions.
1336 */
1338
1339/** Deprecated: Use LLVMSetModuleInlineAsm2 instead. */
1340LLVM_C_ABI void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm);
1341
1342/**
1343 * @}
1344 */
1345
1346/**
1347 * @defgroup LLVMCCoreType Types
1348 *
1349 * Types represent the type of a value.
1350 *
1351 * Types are associated with a context instance. The context internally
1352 * deduplicates types so there is only 1 instance of a specific type
1353 * alive at a time. In other words, a unique type is shared among all
1354 * consumers within a context.
1355 *
1356 * A Type in the C API corresponds to llvm::Type.
1357 *
1358 * Types have the following hierarchy:
1359 *
1360 * types:
1361 * integer type
1362 * byte type
1363 * real type
1364 * function type
1365 * sequence types:
1366 * array type
1367 * pointer type
1368 * vector type
1369 * void type
1370 * label type
1371 * opaque type
1372 *
1373 * @{
1374 */
1375
1376/**
1377 * Obtain the enumerated type of a Type instance.
1378 *
1379 * @see llvm::Type:getTypeID()
1380 */
1382
1383/**
1384 * Whether the type has a known size.
1385 *
1386 * Things that don't have a size are abstract types, labels, and void.a
1387 *
1388 * @see llvm::Type::isSized()
1389 */
1391
1392/**
1393 * Obtain the context to which this type instance is associated.
1394 *
1395 * @see llvm::Type::getContext()
1396 */
1398
1399/**
1400 * Dump a representation of a type to stderr.
1401 *
1402 * @see llvm::Type::dump()
1403 */
1405
1406/**
1407 * Return a string representation of the type. Use
1408 * LLVMDisposeMessage to free the string.
1409 *
1410 * @see llvm::Type::print()
1411 */
1413
1414/**
1415 * @}
1416 */
1417
1418/**
1419 * @defgroup LLVMCCoreTypeByte Byte Types
1420 *
1421 * Functions in this section operate on byte types.
1422 *
1423 * @{
1424 */
1425
1426/**
1427 * Obtain a byte type from a context with specified bit width.
1428 */
1430 unsigned NumBits);
1432
1433/**
1434 * @defgroup LLVMCCoreTypeInt Integer Types
1435 *
1436 * Functions in this section operate on integer types.
1437 *
1438 * @{
1439 */
1440
1441/**
1442 * Obtain an integer type from a context with specified bit width.
1443 */
1451
1452/**
1453 * Obtain an integer type from the global context with a specified bit
1454 * width.
1455 */
1458 "Use of the global context is deprecated, use "
1459 "LLVMInt1TypeInContext instead");
1462 "Use of the global context is deprecated, use "
1463 "LLVMInt8TypeInContext instead");
1466 "Use of the global context is deprecated, use "
1467 "LLVMInt16TypeInContext instead");
1470 "Use of the global context is deprecated, use "
1471 "LLVMInt32TypeInContext instead");
1474 "Use of the global context is deprecated, use "
1475 "LLVMInt64TypeInContext instead");
1478 "Use of the global context is deprecated, use "
1479 "LLVMInt128TypeInContext instead");
1482 "Use of the global context is deprecated, use "
1483 "LLVMIntTypeInContext instead");
1484
1485LLVM_C_ABI unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy);
1486
1487/**
1488 * @}
1489 */
1490
1491/**
1492 * @defgroup LLVMCCoreTypeFloat Floating Point Types
1493 *
1494 * @{
1495 */
1496
1497/**
1498 * Obtain a 16-bit floating point type from a context.
1499 */
1501
1502/**
1503 * Obtain a 16-bit brain floating point type from a context.
1504 */
1506
1507/**
1508 * Obtain a 32-bit floating point type from a context.
1509 */
1511
1512/**
1513 * Obtain a 64-bit floating point type from a context.
1514 */
1516
1517/**
1518 * Obtain a 80-bit floating point type (X87) from a context.
1519 */
1521
1522/**
1523 * Obtain a 128-bit floating point type (112-bit mantissa) from a
1524 * context.
1525 */
1527
1528/**
1529 * Obtain a 128-bit floating point type (two 64-bits) from a context.
1530 */
1532
1533/**
1534 * Obtain a floating point type from the global context.
1535 *
1536 * These map to the functions in this group of the same name.
1537 */
1540 "Use of the global context is deprecated, use "
1541 "LLVMHalfTypeInContext instead");
1544 "Use of the global context is deprecated, use "
1545 "LLVMBFloatTypeInContext instead");
1548 "Use of the global context is deprecated, use "
1549 "LLVMFloatTypeInContext instead");
1552 "Use of the global context is deprecated, use "
1553 "LLVMDoubleTypeInContext instead");
1556 "Use of the global context is deprecated, use "
1557 "LLVMX86FP80TypeInContext instead");
1560 "Use of the global context is deprecated, use "
1561 "LLVMFP128TypeInContext instead");
1564 "Use of the global context is deprecated, use "
1565 "LLVMPPCFP128TypeInContext instead");
1566
1567/**
1568 * @}
1569 */
1570
1571/**
1572 * @defgroup LLVMCCoreTypeFunction Function Types
1573 *
1574 * @{
1575 */
1576
1577/**
1578 * Obtain a function type consisting of a specified signature.
1579 *
1580 * The function is defined as a tuple of a return Type, a list of
1581 * parameter types, and whether the function is variadic.
1582 */
1584 LLVMTypeRef *ParamTypes,
1585 unsigned ParamCount, LLVMBool IsVarArg);
1586
1587/**
1588 * Returns whether a function type is variadic.
1589 */
1591
1592/**
1593 * Obtain the Type this function Type returns.
1594 */
1596
1597/**
1598 * Obtain the number of parameters this function accepts.
1599 */
1600LLVM_C_ABI unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy);
1601
1602/**
1603 * Obtain the types of a function's parameters.
1604 *
1605 * The Dest parameter should point to a pre-allocated array of
1606 * LLVMTypeRef at least LLVMCountParamTypes() large. On return, the
1607 * first LLVMCountParamTypes() entries in the array will be populated
1608 * with LLVMTypeRef instances.
1609 *
1610 * @param FunctionTy The function type to operate on.
1611 * @param Dest Memory address of an array to be filled with result.
1612 */
1613LLVM_C_ABI void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest);
1614
1615/**
1616 * @}
1617 */
1618
1619/**
1620 * @defgroup LLVMCCoreTypeStruct Structure Types
1621 *
1622 * These functions relate to LLVMTypeRef instances.
1623 *
1624 * @see llvm::StructType
1625 *
1626 * @{
1627 */
1628
1629/**
1630 * Create a new structure type in a context.
1631 *
1632 * A structure is specified by a list of inner elements/types and
1633 * whether these can be packed together.
1634 *
1635 * @see llvm::StructType::create()
1636 */
1638 LLVMTypeRef *ElementTypes,
1639 unsigned ElementCount,
1640 LLVMBool Packed);
1641
1642/**
1643 * Create a new structure type in the global context.
1644 *
1645 * @see llvm::StructType::create()
1646 */
1648 LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount,
1649 LLVMBool Packed),
1650 "Use of the global context is deprecated, use LLVMStructTypeInContext "
1651 "instead");
1652
1653/**
1654 * Create an empty structure in a context having a specified name.
1655 *
1656 * @see llvm::StructType::create()
1657 */
1659 const char *Name);
1660
1661/**
1662 * Obtain the name of a structure.
1663 *
1664 * @see llvm::StructType::getName()
1665 */
1667
1668/**
1669 * Set the contents of a structure type.
1670 *
1671 * @see llvm::StructType::setBody()
1672 */
1674 LLVMTypeRef *ElementTypes,
1675 unsigned ElementCount, LLVMBool Packed);
1676
1677/**
1678 * Get the number of elements defined inside the structure.
1679 *
1680 * @see llvm::StructType::getNumElements()
1681 */
1683
1684/**
1685 * Get the elements within a structure.
1686 *
1687 * The function is passed the address of a pre-allocated array of
1688 * LLVMTypeRef at least LLVMCountStructElementTypes() long. After
1689 * invocation, this array will be populated with the structure's
1690 * elements. The objects in the destination array will have a lifetime
1691 * of the structure type itself, which is the lifetime of the context it
1692 * is contained in.
1693 */
1695 LLVMTypeRef *Dest);
1696
1697/**
1698 * Get the type of the element at a given index in the structure.
1699 *
1700 * @see llvm::StructType::getTypeAtIndex()
1701 */
1703 unsigned i);
1704
1705/**
1706 * Determine whether a structure is packed.
1707 *
1708 * @see llvm::StructType::isPacked()
1709 */
1711
1712/**
1713 * Determine whether a structure is opaque.
1714 *
1715 * @see llvm::StructType::isOpaque()
1716 */
1718
1719/**
1720 * Determine whether a structure is literal.
1721 *
1722 * @see llvm::StructType::isLiteral()
1723 */
1725
1726/**
1727 * @}
1728 */
1729
1730/**
1731 * @defgroup LLVMCCoreTypeSequential Sequential Types
1732 *
1733 * Sequential types represents "arrays" of types. This is a super class
1734 * for array, vector, and pointer types.
1735 *
1736 * @{
1737 */
1738
1739/**
1740 * Obtain the element type of an array or vector type.
1741 *
1742 * @see llvm::SequentialType::getElementType()
1743 */
1745
1746/**
1747 * Returns type's subtypes
1748 *
1749 * @see llvm::Type::subtypes()
1750 */
1752
1753/**
1754 * Return the number of types in the derived type.
1755 *
1756 * @see llvm::Type::getNumContainedTypes()
1757 */
1759
1760/**
1761 * Create a fixed size array type that refers to a specific type.
1762 *
1763 * The created type will exist in the context that its element type
1764 * exists in.
1765 *
1766 * @deprecated LLVMArrayType is deprecated in favor of the API accurate
1767 * LLVMArrayType2
1768 * @see llvm::ArrayType::get()
1769 */
1771 unsigned ElementCount);
1772
1773/**
1774 * Create a fixed size array type that refers to a specific type.
1775 *
1776 * The created type will exist in the context that its element type
1777 * exists in.
1778 *
1779 * @see llvm::ArrayType::get()
1780 */
1782 uint64_t ElementCount);
1783
1784/**
1785 * Obtain the length of an array type.
1786 *
1787 * This only works on types that represent arrays.
1788 *
1789 * @deprecated LLVMGetArrayLength is deprecated in favor of the API accurate
1790 * LLVMGetArrayLength2
1791 * @see llvm::ArrayType::getNumElements()
1792 */
1793LLVM_C_ABI unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy);
1794
1795/**
1796 * Obtain the length of an array type.
1797 *
1798 * This only works on types that represent arrays.
1799 *
1800 * @see llvm::ArrayType::getNumElements()
1801 */
1803
1804/**
1805 * Create a pointer type that points to a defined type.
1806 *
1807 * The created type will exist in the context that its pointee type
1808 * exists in.
1809 *
1810 * @see llvm::PointerType::get()
1811 */
1813 unsigned AddressSpace);
1814
1815/**
1816 * Determine whether a pointer is opaque.
1817 *
1818 * True if this is an instance of an opaque PointerType.
1819 *
1820 * @see llvm::Type::isOpaquePointerTy()
1821 */
1823
1824/**
1825 * Create an opaque pointer type in a context.
1826 *
1827 * @see llvm::PointerType::get()
1828 */
1830 unsigned AddressSpace);
1831
1832/**
1833 * Obtain the address space of a pointer type.
1834 *
1835 * This only works on types that represent pointers.
1836 *
1837 * @see llvm::PointerType::getAddressSpace()
1838 */
1840
1841/**
1842 * Create a vector type that contains a defined type and has a specific
1843 * number of elements.
1844 *
1845 * The created type will exist in the context thats its element type
1846 * exists in.
1847 *
1848 * @see llvm::VectorType::get()
1849 */
1851 unsigned ElementCount);
1852
1853/**
1854 * Create a vector type that contains a defined type and has a scalable
1855 * number of elements.
1856 *
1857 * The created type will exist in the context thats its element type
1858 * exists in.
1859 *
1860 * @see llvm::ScalableVectorType::get()
1861 */
1863 unsigned ElementCount);
1864
1865/**
1866 * Obtain the (possibly scalable) number of elements in a vector type.
1867 *
1868 * This only works on types that represent vectors (fixed or scalable).
1869 *
1870 * @see llvm::VectorType::getNumElements()
1871 */
1872LLVM_C_ABI unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy);
1873
1874/**
1875 * Get the pointer value for the associated ConstantPtrAuth constant.
1876 *
1877 * @see llvm::ConstantPtrAuth::getPointer
1878 */
1880
1881/**
1882 * Get the key value for the associated ConstantPtrAuth constant.
1883 *
1884 * @see llvm::ConstantPtrAuth::getKey
1885 */
1887
1888/**
1889 * Get the discriminator value for the associated ConstantPtrAuth constant.
1890 *
1891 * @see llvm::ConstantPtrAuth::getDiscriminator
1892 */
1895
1896/**
1897 * Get the address discriminator value for the associated ConstantPtrAuth
1898 * constant.
1899 *
1900 * @see llvm::ConstantPtrAuth::getAddrDiscriminator
1901 */
1904
1905/**
1906 * @}
1907 */
1908
1909/**
1910 * @defgroup LLVMCCoreTypeOther Other Types
1911 *
1912 * @{
1913 */
1914
1915/**
1916 * Create a void type in a context.
1917 */
1919
1920/**
1921 * Create a label type in a context.
1922 */
1924
1925/**
1926 * Create a X86 AMX type in a context.
1927 */
1929
1930/**
1931 * Create a token type in a context.
1932 */
1934
1935/**
1936 * Create a metadata type in a context.
1937 */
1939
1940/**
1941 * These are similar to the above functions except they operate on the
1942 * global context.
1943 */
1946 "Use of the global context is deprecated, use "
1947 "LLVMVoidTypeInContext instead");
1950 "Use of the global context is deprecated, use "
1951 "LLVMLabelTypeInContext instead");
1954 "Use of the global context is deprecated, use "
1955 "LLVMX86AMXTypeInContext instead");
1956
1957/**
1958 * Create a target extension type in LLVM context.
1959 */
1961 LLVMContextRef C, const char *Name, LLVMTypeRef *TypeParams,
1962 unsigned TypeParamCount, unsigned *IntParams, unsigned IntParamCount);
1963
1964/**
1965 * Obtain the name for this target extension type.
1966 *
1967 * @see llvm::TargetExtType::getName()
1968 */
1969LLVM_C_ABI const char *LLVMGetTargetExtTypeName(LLVMTypeRef TargetExtTy);
1970
1971/**
1972 * Obtain the number of type parameters for this target extension type.
1973 *
1974 * @see llvm::TargetExtType::getNumTypeParameters()
1975 */
1977
1978/**
1979 * Get the type parameter at the given index for the target extension type.
1980 *
1981 * @see llvm::TargetExtType::getTypeParameter()
1982 */
1984 unsigned Idx);
1985
1986/**
1987 * Obtain the number of int parameters for this target extension type.
1988 *
1989 * @see llvm::TargetExtType::getNumIntParameters()
1990 */
1992
1993/**
1994 * Get the int parameter at the given index for the target extension type.
1995 *
1996 * @see llvm::TargetExtType::getIntParameter()
1997 */
1999 unsigned Idx);
2000
2001/**
2002 * @}
2003 */
2004
2005/**
2006 * @}
2007 */
2008
2009/**
2010 * @defgroup LLVMCCoreValues Values
2011 *
2012 * The bulk of LLVM's object model consists of values, which comprise a very
2013 * rich type hierarchy.
2014 *
2015 * LLVMValueRef essentially represents llvm::Value. There is a rich
2016 * hierarchy of classes within this type. Depending on the instance
2017 * obtained, not all APIs are available.
2018 *
2019 * Callers can determine the type of an LLVMValueRef by calling the
2020 * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These
2021 * functions are defined by a macro, so it isn't obvious which are
2022 * available by looking at the Doxygen source code. Instead, look at the
2023 * source definition of LLVM_FOR_EACH_VALUE_SUBCLASS and note the list
2024 * of value names given. These value names also correspond to classes in
2025 * the llvm::Value hierarchy.
2026 *
2027 * @{
2028 */
2029
2030// Currently, clang-format tries to format the LLVM_FOR_EACH_VALUE_SUBCLASS
2031// macro in a progressively-indented fashion, which is not desired
2032// clang-format off
2033
2034#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \
2035 macro(Argument) \
2036 macro(BasicBlock) \
2037 macro(InlineAsm) \
2038 macro(User) \
2039 macro(Constant) \
2040 macro(BlockAddress) \
2041 macro(ConstantAggregateZero) \
2042 macro(ConstantArray) \
2043 macro(ConstantDataSequential) \
2044 macro(ConstantDataArray) \
2045 macro(ConstantDataVector) \
2046 macro(ConstantExpr) \
2047 macro(ConstantFP) \
2048 macro(ConstantInt) \
2049 macro(ConstantByte) \
2050 macro(ConstantPointerNull) \
2051 macro(ConstantStruct) \
2052 macro(ConstantTokenNone) \
2053 macro(ConstantVector) \
2054 macro(ConstantPtrAuth) \
2055 macro(GlobalValue) \
2056 macro(GlobalAlias) \
2057 macro(GlobalObject) \
2058 macro(Function) \
2059 macro(GlobalVariable) \
2060 macro(GlobalIFunc) \
2061 macro(UndefValue) \
2062 macro(PoisonValue) \
2063 macro(Instruction) \
2064 macro(UnaryOperator) \
2065 macro(BinaryOperator) \
2066 macro(CallInst) \
2067 macro(IntrinsicInst) \
2068 macro(DbgInfoIntrinsic) \
2069 macro(DbgVariableIntrinsic) \
2070 macro(DbgDeclareInst) \
2071 macro(DbgLabelInst) \
2072 macro(MemIntrinsic) \
2073 macro(MemCpyInst) \
2074 macro(MemMoveInst) \
2075 macro(MemSetInst) \
2076 macro(CmpInst) \
2077 macro(FCmpInst) \
2078 macro(ICmpInst) \
2079 macro(ExtractElementInst) \
2080 macro(GetElementPtrInst) \
2081 macro(InsertElementInst) \
2082 macro(InsertValueInst) \
2083 macro(LandingPadInst) \
2084 macro(PHINode) \
2085 macro(SelectInst) \
2086 macro(ShuffleVectorInst) \
2087 macro(StoreInst) \
2088 macro(UncondBrInst) \
2089 macro(CondBrInst) \
2090 macro(IndirectBrInst) \
2091 macro(InvokeInst) \
2092 macro(ReturnInst) \
2093 macro(SwitchInst) \
2094 macro(UnreachableInst) \
2095 macro(ResumeInst) \
2096 macro(CleanupReturnInst) \
2097 macro(CatchReturnInst) \
2098 macro(CatchSwitchInst) \
2099 macro(CallBrInst) \
2100 macro(FuncletPadInst) \
2101 macro(CatchPadInst) \
2102 macro(CleanupPadInst) \
2103 macro(UnaryInstruction) \
2104 macro(AllocaInst) \
2105 macro(CastInst) \
2106 macro(AddrSpaceCastInst) \
2107 macro(BitCastInst) \
2108 macro(FPExtInst) \
2109 macro(FPToSIInst) \
2110 macro(FPToUIInst) \
2111 macro(FPTruncInst) \
2112 macro(IntToPtrInst) \
2113 macro(PtrToIntInst) \
2114 macro(SExtInst) \
2115 macro(SIToFPInst) \
2116 macro(TruncInst) \
2117 macro(UIToFPInst) \
2118 macro(ZExtInst) \
2119 macro(ExtractValueInst) \
2120 macro(LoadInst) \
2121 macro(VAArgInst) \
2122 macro(FreezeInst) \
2123 macro(AtomicCmpXchgInst) \
2124 macro(AtomicRMWInst) \
2125 macro(FenceInst)
2126
2127// clang-format on
2128
2129/**
2130 * @defgroup LLVMCCoreValueGeneral General APIs
2131 *
2132 * Functions in this section work on all LLVMValueRef instances,
2133 * regardless of their sub-type. They correspond to functions available
2134 * on llvm::Value.
2135 *
2136 * @{
2137 */
2138
2139/**
2140 * Obtain the type of a value.
2141 *
2142 * @see llvm::Value::getType()
2143 */
2145
2146/**
2147 * Obtain the enumerated type of a Value instance.
2148 *
2149 * @see llvm::Value::getValueID()
2150 */
2152
2153/**
2154 * Obtain the string name of a value.
2155 *
2156 * @see llvm::Value::getName()
2157 */
2158LLVM_C_ABI const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length);
2159
2160/**
2161 * Set the string name of a value.
2162 *
2163 * @see llvm::Value::setName()
2164 */
2165LLVM_C_ABI void LLVMSetValueName2(LLVMValueRef Val, const char *Name,
2166 size_t NameLen);
2167
2168/**
2169 * Dump a representation of a value to stderr.
2170 *
2171 * @see llvm::Value::dump()
2172 */
2174
2175/**
2176 * Return a string representation of the value. Use
2177 * LLVMDisposeMessage to free the string.
2178 *
2179 * @see llvm::Value::print()
2180 */
2182
2183/**
2184 * Obtain the context to which this value is associated.
2185 *
2186 * @see llvm::Value::getContext()
2187 */
2189
2190/**
2191 * Return a string representation of the DbgRecord. Use
2192 * LLVMDisposeMessage to free the string.
2193 *
2194 * @see llvm::DbgRecord::print()
2195 */
2197
2198/**
2199 * Replace all uses of a value with another one.
2200 *
2201 * @see llvm::Value::replaceAllUsesWith()
2202 */
2204 LLVMValueRef NewVal);
2205
2206/**
2207 * Determine whether the specified value instance is constant.
2208 */
2210
2211/**
2212 * Determine whether a value instance is undefined.
2213 */
2215
2216/**
2217 * Determine whether a value instance is poisonous.
2218 */
2220
2221/**
2222 * Convert value instances between types.
2223 *
2224 * Internally, an LLVMValueRef is "pinned" to a specific type. This
2225 * series of functions allows you to cast an instance to a specific
2226 * type.
2227 *
2228 * If the cast is not valid for the specified type, NULL is returned.
2229 *
2230 * @see llvm::dyn_cast_or_null<>
2231 */
2232#define LLVM_DECLARE_VALUE_CAST(name) \
2233 LLVM_C_ABI LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
2235
2238 "Use LLVMIsAUncondBrInst/LLVMIsACondBrInst instead");
2239
2243
2244/** Deprecated: Use LLVMGetValueName2 instead. */
2246/** Deprecated: Use LLVMSetValueName2 instead. */
2247LLVM_C_ABI void LLVMSetValueName(LLVMValueRef Val, const char *Name);
2248
2249/**
2250 * @}
2251 */
2252
2253/**
2254 * @defgroup LLVMCCoreValueUses Usage
2255 *
2256 * This module defines functions that allow you to inspect the uses of a
2257 * LLVMValueRef.
2258 *
2259 * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance.
2260 * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a
2261 * llvm::User and llvm::Value.
2262 *
2263 * @{
2264 */
2265
2266/**
2267 * Obtain the first use of a value.
2268 *
2269 * Uses are obtained in an iterator fashion. First, call this function
2270 * to obtain a reference to the first use. Then, call LLVMGetNextUse()
2271 * on that instance and all subsequently obtained instances until
2272 * LLVMGetNextUse() returns NULL.
2273 *
2274 * @see llvm::Value::use_begin()
2275 */
2277
2278/**
2279 * Obtain the next use of a value.
2280 *
2281 * This effectively advances the iterator. It returns NULL if you are on
2282 * the final use and no more are available.
2283 */
2285
2286/**
2287 * Obtain the user value for a user.
2288 *
2289 * The returned value corresponds to a llvm::User type.
2290 *
2291 * @see llvm::Use::getUser()
2292 */
2294
2295/**
2296 * Obtain the value this use corresponds to.
2297 *
2298 * @see llvm::Use::get().
2299 */
2301
2302/**
2303 * @}
2304 */
2305
2306/**
2307 * @defgroup LLVMCCoreValueUser User value
2308 *
2309 * Function in this group pertain to LLVMValueRef instances that descent
2310 * from llvm::User. This includes constants, instructions, and
2311 * operators.
2312 *
2313 * @{
2314 */
2315
2316/**
2317 * Obtain an operand at a specific index in a llvm::User value.
2318 *
2319 * @see llvm::User::getOperand()
2320 */
2322
2323/**
2324 * Obtain the use of an operand at a specific index in a llvm::User value.
2325 *
2326 * @see llvm::User::getOperandUse()
2327 */
2329
2330/**
2331 * Set an operand at a specific index in a llvm::User value.
2332 *
2333 * @see llvm::User::setOperand()
2334 */
2335LLVM_C_ABI void LLVMSetOperand(LLVMValueRef User, unsigned Index,
2336 LLVMValueRef Val);
2337
2338/**
2339 * Obtain the number of operands in a llvm::User value.
2340 *
2341 * @see llvm::User::getNumOperands()
2342 */
2344
2345/**
2346 * @}
2347 */
2348
2349/**
2350 * @defgroup LLVMCCoreValueConstant Constants
2351 *
2352 * This section contains APIs for interacting with LLVMValueRef that
2353 * correspond to llvm::Constant instances.
2354 *
2355 * These functions will work for any LLVMValueRef in the llvm::Constant
2356 * class hierarchy.
2357 *
2358 * @{
2359 */
2360
2361/**
2362 * Obtain a constant value referring to the null instance of a type.
2363 *
2364 * @see llvm::Constant::getNullValue()
2365 */
2367
2368/**
2369 * Obtain a constant value referring to the instance of a type
2370 * consisting of all ones.
2371 *
2372 * This is only valid for integer types.
2373 *
2374 * @see llvm::Constant::getAllOnesValue()
2375 */
2377
2378/**
2379 * Obtain a constant value referring to an undefined value of a type.
2380 *
2381 * @see llvm::UndefValue::get()
2382 */
2384
2385/**
2386 * Obtain a constant value referring to a poison value of a type.
2387 *
2388 * @see llvm::PoisonValue::get()
2389 */
2391
2392/**
2393 * Determine whether a value instance is null.
2394 *
2395 * @see llvm::Constant::isNullValue()
2396 */
2398
2399/**
2400 * Obtain a constant that is a constant pointer pointing to NULL for a
2401 * specified type.
2402 */
2404
2405/**
2406 * @defgroup LLVMCCoreValueConstantScalar Scalar constants
2407 *
2408 * Functions in this group model LLVMValueRef instances that correspond
2409 * to constants referring to scalar types.
2410 *
2411 * For integer types, the LLVMTypeRef parameter should correspond to a
2412 * llvm::IntegerType instance and the returned LLVMValueRef will
2413 * correspond to a llvm::ConstantInt.
2414 *
2415 * For floating point types, the LLVMTypeRef returned corresponds to a
2416 * llvm::ConstantFP.
2417 *
2418 * @{
2419 */
2420
2421/**
2422 * Obtain a constant value for an integer type.
2423 *
2424 * The returned value corresponds to a llvm::ConstantInt.
2425 *
2426 * @see llvm::ConstantInt::get()
2427 *
2428 * @param IntTy Integer type to obtain value of.
2429 * @param N The value the returned instance should refer to.
2430 * @param SignExtend Whether to sign extend the produced value.
2431 */
2432LLVM_C_ABI LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
2433 LLVMBool SignExtend);
2434
2435/**
2436 * Obtain a constant value for an integer of arbitrary precision.
2437 *
2438 * @see llvm::ConstantInt::get()
2439 */
2441 LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[]);
2442
2443/**
2444 * Obtain a constant value for an integer parsed from a string.
2445 *
2446 * A similar API, LLVMConstIntOfStringAndSize is also available. If the
2447 * string's length is available, it is preferred to call that function
2448 * instead.
2449 *
2450 * @see llvm::ConstantInt::get()
2451 */
2453 const char *Text, uint8_t Radix);
2454
2455/**
2456 * Obtain a constant value for an integer parsed from a string with
2457 * specified length.
2458 *
2459 * @see llvm::ConstantInt::get()
2460 */
2462 const char *Text,
2463 unsigned SLen,
2464 uint8_t Radix);
2465
2466/**
2467 * Obtain a constant value for a byte type.
2468 *
2469 * The returned value corresponds to a llvm::ConstantByte.
2470 *
2471 * @see llvm::ConstantByte::get()
2472 *
2473 * @param ByteTy Byte type to obtain value of.
2474 * @param N The value the returned instance should refer to.
2475 */
2476LLVM_C_ABI LLVMValueRef LLVMConstByte(LLVMTypeRef ByteTy, unsigned long long N);
2477
2478/**
2479 * Obtain a constant value for a byte of arbitrary precision.
2480 *
2481 * @see llvm::ConstantByte::get()
2482 */
2484 LLVMTypeRef ByteTy, unsigned NumWords, const uint64_t Words[]);
2485
2486/**
2487 * Obtain a constant value for a byte parsed from a string with specified
2488 * length.
2489 * @see llvm::ConstantByte::get()
2490 */
2492 const char *Text,
2493 size_t SLen,
2494 uint8_t Radix);
2495
2496/**
2497 * Obtain a constant value referring to a double floating point value.
2498 */
2500
2501/**
2502 * Obtain a constant for a floating point value parsed from a string.
2503 *
2504 * A similar API, LLVMConstRealOfStringAndSize is also available. It
2505 * should be used if the input string's length is known.
2506 */
2508 const char *Text);
2509
2510/**
2511 * Obtain a constant for a floating point value parsed from a string.
2512 */
2514 const char *Text,
2515 unsigned SLen);
2516
2517/**
2518 * Obtain a constant for a floating point value from array of 64 bit values.
2519 * The length of the array N must be ceildiv(bits, 64), where bits is the
2520 * scalar size in bits of the floating-point type.
2521 */
2522
2524
2525/**
2526 * Obtain the zero extended value for an integer constant value.
2527 *
2528 * @see llvm::ConstantInt::getZExtValue()
2529 */
2530LLVM_C_ABI unsigned long long
2532
2533/**
2534 * Obtain the sign extended value for an integer constant value.
2535 *
2536 * @see llvm::ConstantInt::getSExtValue()
2537 */
2538LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal);
2539
2540/**
2541 * Obtain the zero extended value for a byte constant value.
2542 *
2543 * @see llvm::ConstantByte::getZExtValue()
2544 */
2545LLVM_C_ABI unsigned long long
2547
2548/**
2549 * Obtain the sign extended value for a byte constant value.
2550 *
2551 * @see llvm::ConstantByte::getSExtValue()
2552 */
2554
2555/**
2556 * Obtain the double value for an floating point constant value.
2557 * losesInfo indicates if some precision was lost in the conversion.
2558 *
2559 * @see llvm::ConstantFP::getDoubleValue
2560 */
2562 LLVMBool *losesInfo);
2563
2564/**
2565 * @}
2566 */
2567
2568/**
2569 * @defgroup LLVMCCoreValueConstantComposite Composite Constants
2570 *
2571 * Functions in this group operate on composite constants.
2572 *
2573 * @{
2574 */
2575
2576/**
2577 * Create a ConstantDataSequential and initialize it with a string.
2578 *
2579 * @deprecated LLVMConstStringInContext is deprecated in favor of the API
2580 * accurate LLVMConstStringInContext2
2581 * @see llvm::ConstantDataArray::getString()
2582 */
2584 const char *Str,
2585 unsigned Length,
2586 LLVMBool DontNullTerminate);
2587
2588/**
2589 * Create a ConstantDataSequential and initialize it with a string.
2590 *
2591 * @see llvm::ConstantDataArray::getString()
2592 */
2594 const char *Str,
2595 size_t Length,
2596 LLVMBool DontNullTerminate);
2597
2598/**
2599 * Create a ConstantDataSequential with string content in the global context.
2600 *
2601 * This is the same as LLVMConstStringInContext except it operates on the
2602 * global context.
2603 *
2604 * @see LLVMConstStringInContext()
2605 * @see llvm::ConstantDataArray::getString()
2606 */
2608 LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
2609 LLVMBool DontNullTerminate),
2610 "Use of the global context is deprecated, use LLVMConstStringInContext2 "
2611 "instead");
2612
2613/**
2614 * Returns true if the specified constant is an array of i8.
2615 *
2616 * @see ConstantDataSequential::getAsString()
2617 */
2619
2620/**
2621 * Get the given constant data sequential as a string.
2622 *
2623 * @see ConstantDataSequential::getAsString()
2624 */
2625LLVM_C_ABI const char *LLVMGetAsString(LLVMValueRef c, size_t *Length);
2626
2627/**
2628 * Get the raw, underlying bytes of the given constant data sequential.
2629 *
2630 * This is the same as LLVMGetAsString except it works for all constant data
2631 * sequentials, not just i8 arrays.
2632 *
2633 * @see ConstantDataSequential::getRawDataValues()
2634 */
2636 size_t *SizeInBytes);
2637
2638/**
2639 * Create an anonymous ConstantStruct with the specified values.
2640 *
2641 * @see llvm::ConstantStruct::getAnon()
2642 */
2644 LLVMValueRef *ConstantVals,
2645 unsigned Count,
2646 LLVMBool Packed);
2647
2648/**
2649 * Create a ConstantStruct in the global Context.
2650 *
2651 * This is the same as LLVMConstStructInContext except it operates on the
2652 * global Context.
2653 *
2654 * @see LLVMConstStructInContext()
2655 */
2657 LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
2658 LLVMBool Packed),
2659 "Use of the global context is deprecated, use LLVMConstStructInContext "
2660 "instead");
2661
2662/**
2663 * Create a ConstantArray from values.
2664 *
2665 * @deprecated LLVMConstArray is deprecated in favor of the API accurate
2666 * LLVMConstArray2
2667 * @see llvm::ConstantArray::get()
2668 */
2670 LLVMValueRef *ConstantVals,
2671 unsigned Length);
2672
2673/**
2674 * Create a ConstantArray from values.
2675 *
2676 * @see llvm::ConstantArray::get()
2677 */
2679 LLVMValueRef *ConstantVals,
2680 uint64_t Length);
2681
2682/**
2683 * Create a ConstantDataArray from raw values.
2684 *
2685 * ElementTy must be one of i8, i16, i32, i64, half, bfloat, float, or double.
2686 * Data points to a contiguous buffer of raw values in the host endianness. The
2687 * element count is inferred from the element type and the data size in bytes.
2688 *
2689 * @see llvm::ConstantDataArray::getRaw()
2690 */
2692 const char *Data,
2693 size_t SizeInBytes);
2694
2695/**
2696 * Create a non-anonymous ConstantStruct from values.
2697 *
2698 * @see llvm::ConstantStruct::get()
2699 */
2701 LLVMValueRef *ConstantVals,
2702 unsigned Count);
2703
2704/**
2705 * Get element of a constant aggregate (struct, array or vector) at the
2706 * specified index. Returns null if the index is out of range, or it's not
2707 * possible to determine the element (e.g., because the constant is a
2708 * constant expression.)
2709 *
2710 * @see llvm::Constant::getAggregateElement()
2711 */
2713
2714/**
2715 * Get an element at specified index as a constant.
2716 *
2717 * @see ConstantDataSequential::getElementAsConstant()
2718 */
2721 "Use LLVMGetAggregateElement instead");
2722
2723/**
2724 * Create a ConstantVector from values.
2725 *
2726 * @see llvm::ConstantVector::get()
2727 */
2729 unsigned Size);
2730
2731/**
2732 * Create a ConstantPtrAuth constant with the given values.
2733 *
2734 * @see llvm::ConstantPtrAuth::get()
2735 */
2737 LLVMValueRef Disc,
2738 LLVMValueRef AddrDisc);
2739
2740/**
2741 * @}
2742 */
2743
2744/**
2745 * @defgroup LLVMCCoreValueConstantExpressions Constant Expressions
2746 *
2747 * Functions in this group correspond to APIs on llvm::ConstantExpr.
2748 *
2749 * @see llvm::ConstantExpr.
2750 *
2751 * @{
2752 */
2756 "Create a constant based on LLVMABIAlignmentOfType() instead");
2759 "Create a constant based on LLVMABISizeOfType() instead");
2764 "Use LLVMConstNull instead.");
2767 LLVMValueRef RHSConstant);
2769 LLVMValueRef RHSConstant);
2771 LLVMValueRef RHSConstant);
2773 LLVMValueRef RHSConstant);
2775 LLVMValueRef RHSConstant);
2777 LLVMValueRef RHSConstant);
2779 LLVMValueRef RHSConstant);
2781 LLVMValueRef *ConstantIndices,
2782 unsigned NumIndices);
2784 LLVMValueRef ConstantVal,
2785 LLVMValueRef *ConstantIndices,
2786 unsigned NumIndices);
2787/**
2788 * Creates a constant GetElementPtr expression. Similar to LLVMConstGEP2, but
2789 * allows specifying the no-wrap flags.
2790 *
2791 * @see llvm::ConstantExpr::getGetElementPtr()
2792 */
2794 LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices,
2795 unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags);
2797 LLVMTypeRef ToType);
2799 LLVMTypeRef ToType);
2801 LLVMTypeRef ToType);
2803 LLVMTypeRef ToType);
2805 LLVMTypeRef ToType);
2807 LLVMTypeRef ToType);
2809 LLVMTypeRef ToType);
2811 LLVMValueRef IndexConstant);
2813 LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant,
2814 LLVMValueRef IndexConstant);
2816 LLVMValueRef VectorBConstant,
2817 LLVMValueRef MaskConstant);
2819
2820/**
2821 * Gets the function associated with a given BlockAddress constant value.
2822 */
2824
2825/**
2826 * Gets the basic block associated with a given BlockAddress constant value.
2827 */
2830
2831/** Deprecated: Use LLVMGetInlineAsm instead. */
2833 const char *AsmString,
2834 const char *Constraints,
2835 LLVMBool HasSideEffects,
2836 LLVMBool IsAlignStack);
2837
2838/**
2839 * @}
2840 */
2841
2842/**
2843 * @defgroup LLVMCCoreValueConstantGlobals Global Values
2844 *
2845 * This group contains functions that operate on global values. Functions in
2846 * this group relate to functions in the llvm::GlobalValue class tree.
2847 *
2848 * @see llvm::GlobalValue
2849 *
2850 * @{
2851 */
2852
2858LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section);
2863 LLVMDLLStorageClass Class);
2866 LLVMUnnamedAddr UnnamedAddr);
2867
2868/**
2869 * Returns the "value type" of a global value. This differs from the formal
2870 * type of a global value which is always a pointer type.
2871 *
2872 * @see llvm::GlobalValue::getValueType()
2873 * @see llvm::Function::getFunctionType()
2874 */
2876
2877/** Deprecated: Use LLVMGetUnnamedAddress instead. */
2879/** Deprecated: Use LLVMSetUnnamedAddress instead. */
2881 LLVMBool HasUnnamedAddr);
2882
2883/**
2884 * @defgroup LLVMCCoreValueWithAlignment Values with alignment
2885 *
2886 * Functions in this group only apply to values with alignment, i.e.
2887 * global variables, load and store instructions.
2888 */
2889
2890/**
2891 * Obtain the preferred alignment of the value.
2892 * @see llvm::AllocaInst::getAlignment()
2893 * @see llvm::LoadInst::getAlignment()
2894 * @see llvm::StoreInst::getAlignment()
2895 * @see llvm::AtomicRMWInst::setAlignment()
2896 * @see llvm::AtomicCmpXchgInst::setAlignment()
2897 * @see llvm::GlobalValue::getAlignment()
2898 */
2900
2901/**
2902 * Set the preferred alignment of the value.
2903 * @see llvm::AllocaInst::setAlignment()
2904 * @see llvm::LoadInst::setAlignment()
2905 * @see llvm::StoreInst::setAlignment()
2906 * @see llvm::AtomicRMWInst::setAlignment()
2907 * @see llvm::AtomicCmpXchgInst::setAlignment()
2908 * @see llvm::GlobalValue::setAlignment()
2909 */
2910LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes);
2911
2912/**
2913 * Sets a metadata attachment, erasing the existing metadata attachment if
2914 * it already exists for the given kind.
2915 *
2916 * @see llvm::GlobalObject::setMetadata()
2917 */
2918LLVM_C_ABI void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind,
2919 LLVMMetadataRef MD);
2920
2921/**
2922 * Adds a metadata attachment.
2923 *
2924 * @see llvm::GlobalObject::addMetadata()
2925 */
2926LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind,
2927 LLVMMetadataRef MD);
2928
2929/**
2930 * Erases a metadata attachment of the given kind if it exists.
2931 *
2932 * @see llvm::GlobalObject::eraseMetadata()
2933 */
2934LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind);
2935
2936/**
2937 * Removes all metadata attachments from this value.
2938 *
2939 * @see llvm::GlobalObject::clearMetadata()
2940 */
2942
2943/**
2944 * Add debuginfo metadata to this global.
2945 *
2946 * @see llvm::GlobalVariable::addDebugInfo()
2947 */
2949 LLVMMetadataRef GVE);
2950
2951/**
2952 * Retrieves an array of metadata entries representing the metadata attached to
2953 * this value. The caller is responsible for freeing this array by calling
2954 * \c LLVMDisposeValueMetadataEntries.
2955 *
2956 * @see llvm::GlobalObject::getAllMetadata()
2957 */
2959LLVMGlobalCopyAllMetadata(LLVMValueRef Value, size_t *NumEntries);
2960
2961/**
2962 * Destroys value metadata entries.
2963 */
2964LLVM_C_ABI void
2966
2967/**
2968 * Returns the kind of a value metadata entry at a specific index.
2969 */
2970LLVM_C_ABI unsigned
2972 unsigned Index);
2973
2974/**
2975 * Returns the underlying metadata node of a value metadata entry at a
2976 * specific index.
2977 */
2979 LLVMValueMetadataEntry *Entries, unsigned Index);
2980
2981/**
2982 * @}
2983 */
2984
2985/**
2986 * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables
2987 *
2988 * This group contains functions that operate on global variable values.
2989 *
2990 * @see llvm::GlobalVariable
2991 *
2992 * @{
2993 */
2995 const char *Name);
2997 LLVMTypeRef Ty,
2998 const char *Name,
2999 unsigned AddressSpace);
3002 const char *Name,
3003 size_t Length);
3011 LLVMValueRef ConstantVal);
3014 LLVMBool IsThreadLocal);
3017 LLVMBool IsConstant);
3023 LLVMBool IsExtInit);
3024
3025/**
3026 * @}
3027 */
3028
3029/**
3030 * @defgroup LLVMCoreValueConstantGlobalAlias Global Aliases
3031 *
3032 * This group contains function that operate on global alias values.
3033 *
3034 * @see llvm::GlobalAlias
3035 *
3036 * @{
3037 */
3038
3039/**
3040 * Add a GlobalAlias with the given value type, address space and aliasee.
3041 *
3042 * @see llvm::GlobalAlias::create()
3043 */
3045 unsigned AddrSpace, LLVMValueRef Aliasee,
3046 const char *Name);
3047
3048/**
3049 * Obtain a GlobalAlias value from a Module by its name.
3050 *
3051 * The returned value corresponds to a llvm::GlobalAlias value.
3052 *
3053 * @see llvm::Module::getNamedAlias()
3054 */
3056 const char *Name,
3057 size_t NameLen);
3058
3059/**
3060 * Obtain an iterator to the first GlobalAlias in a Module.
3061 *
3062 * @see llvm::Module::alias_begin()
3063 */
3065
3066/**
3067 * Obtain an iterator to the last GlobalAlias in a Module.
3068 *
3069 * @see llvm::Module::alias_end()
3070 */
3072
3073/**
3074 * Advance a GlobalAlias iterator to the next GlobalAlias.
3075 *
3076 * Returns NULL if the iterator was already at the end and there are no more
3077 * global aliases.
3078 */
3080
3081/**
3082 * Decrement a GlobalAlias iterator to the previous GlobalAlias.
3083 *
3084 * Returns NULL if the iterator was already at the beginning and there are
3085 * no previous global aliases.
3086 */
3088
3089/**
3090 * Retrieve the target value of an alias.
3091 */
3093
3094/**
3095 * Set the target value of an alias.
3096 */
3098
3099/**
3100 * @}
3101 */
3102
3103/**
3104 * @defgroup LLVMCCoreValueFunction Function values
3105 *
3106 * Functions in this group operate on LLVMValueRef instances that
3107 * correspond to llvm::Function instances.
3108 *
3109 * @see llvm::Function
3110 *
3111 * @{
3112 */
3113
3114/**
3115 * Remove a function from its containing module and deletes it.
3116 *
3117 * @see llvm::Function::eraseFromParent()
3118 */
3120
3121/**
3122 * Check whether the given function has a personality function.
3123 *
3124 * @see llvm::Function::hasPersonalityFn()
3125 */
3127
3128/**
3129 * Obtain the personality function attached to the function.
3130 *
3131 * @see llvm::Function::getPersonalityFn()
3132 */
3134
3135/**
3136 * Set the personality function attached to the function.
3137 *
3138 * @see llvm::Function::setPersonalityFn()
3139 */
3141 LLVMValueRef PersonalityFn);
3142
3143/**
3144 * Obtain the intrinsic ID number which matches the given function name.
3145 *
3146 * @see llvm::Intrinsic::lookupIntrinsicID()
3147 */
3148LLVM_C_ABI unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen);
3149
3150/**
3151 * Obtain the ID number from a function instance.
3152 *
3153 * @see llvm::Function::getIntrinsicID()
3154 */
3156
3157/**
3158 * Get or insert the declaration of an intrinsic. For overloaded intrinsics,
3159 * overload types must be provided to uniquely identify an overload.
3160 *
3161 * @see llvm::Intrinsic::getOrInsertDeclaration()
3162 */
3164 unsigned ID,
3165 LLVMTypeRef *OverloadTypes,
3166 size_t OverloadCount);
3167
3168/**
3169 * Retrieves the type of an intrinsic. For overloaded intrinsics, overload
3170 * types must be provided to uniquely identify an overload.
3171 *
3172 * @see llvm::Intrinsic::getType()
3173 */
3175 LLVMTypeRef *OverloadTypes,
3176 size_t OverloadCount);
3177
3178/**
3179 * Retrieves the name of an intrinsic.
3180 *
3181 * @see llvm::Intrinsic::getName()
3182 */
3183LLVM_C_ABI const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength);
3184
3185/** Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. */
3187 LLVMTypeRef *OverloadTypes,
3188 size_t OverloadCount,
3189 size_t *NameLength);
3190
3191/**
3192 * Copies the name of an overloaded intrinsic identified by a given list of
3193 * overload types.
3194 *
3195 * Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the
3196 * returned string.
3197 *
3198 * This version also supports unnamed types.
3199 *
3200 * @see llvm::Intrinsic::getName()
3201 */
3203 unsigned ID,
3204 LLVMTypeRef *OverloadTypes,
3205 size_t OverloadCount,
3206 size_t *NameLength);
3207
3208/**
3209 * Obtain if the intrinsic identified by the given ID is overloaded.
3210 *
3211 * @see llvm::Intrinsic::isOverloaded()
3212 */
3214
3215/**
3216 * Obtain the calling function of a function.
3217 *
3218 * The returned value corresponds to the LLVMCallConv enumeration.
3219 *
3220 * @see llvm::Function::getCallingConv()
3221 */
3223
3224/**
3225 * Set the calling convention of a function.
3226 *
3227 * @see llvm::Function::setCallingConv()
3228 *
3229 * @param Fn Function to operate on
3230 * @param CC LLVMCallConv to set calling convention to
3231 */
3232LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC);
3233
3234/**
3235 * Obtain the name of the garbage collector to use during code
3236 * generation.
3237 *
3238 * @see llvm::Function::getGC()
3239 */
3241
3242/**
3243 * Define the garbage collector to use during code generation.
3244 *
3245 * @see llvm::Function::setGC()
3246 */
3247LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name);
3248
3249/**
3250 * Gets the prefix data associated with a function. Only valid on functions, and
3251 * only if LLVMHasPrefixData returns true.
3252 * See https://llvm.org/docs/LangRef.html#prefix-data
3253 */
3255
3256/**
3257 * Check if a given function has prefix data. Only valid on functions.
3258 * See https://llvm.org/docs/LangRef.html#prefix-data
3259 */
3261
3262/**
3263 * Sets the prefix data for the function. Only valid on functions.
3264 * See https://llvm.org/docs/LangRef.html#prefix-data
3265 */
3267
3268/**
3269 * Gets the prologue data associated with a function. Only valid on functions,
3270 * and only if LLVMHasPrologueData returns true.
3271 * See https://llvm.org/docs/LangRef.html#prologue-data
3272 */
3274
3275/**
3276 * Check if a given function has prologue data. Only valid on functions.
3277 * See https://llvm.org/docs/LangRef.html#prologue-data
3278 */
3280
3281/**
3282 * Sets the prologue data for the function. Only valid on functions.
3283 * See https://llvm.org/docs/LangRef.html#prologue-data
3284 */
3286
3287/**
3288 * Add an attribute to a function.
3289 *
3290 * @see llvm::Function::addAttribute()
3291 */
3295 LLVMAttributeIndex Idx);
3297 LLVMAttributeRef *Attrs);
3300 unsigned KindID);
3302 LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
3305 unsigned KindID);
3308 const char *K, unsigned KLen);
3309
3310/**
3311 * Add a target-dependent attribute to a function
3312 * @see llvm::AttrBuilder::addAttribute()
3313 */
3315 const char *A,
3316 const char *V);
3317
3318/**
3319 * @defgroup LLVMCCoreValueFunctionParameters Function Parameters
3320 *
3321 * Functions in this group relate to arguments/parameters on functions.
3322 *
3323 * Functions in this group expect LLVMValueRef instances that correspond
3324 * to llvm::Function instances.
3325 *
3326 * @{
3327 */
3328
3329/**
3330 * Obtain the number of parameters in a function.
3331 *
3332 * @see llvm::Function::arg_size()
3333 */
3335
3336/**
3337 * Obtain the parameters in a function.
3338 *
3339 * The takes a pointer to a pre-allocated array of LLVMValueRef that is
3340 * at least LLVMCountParams() long. This array will be filled with
3341 * LLVMValueRef instances which correspond to the parameters the
3342 * function receives. Each LLVMValueRef corresponds to a llvm::Argument
3343 * instance.
3344 *
3345 * @see llvm::Function::arg_begin()
3346 */
3348
3349/**
3350 * Obtain the parameter at the specified index.
3351 *
3352 * Parameters are indexed from 0.
3353 *
3354 * @see llvm::Function::arg_begin()
3355 */
3357
3358/**
3359 * Obtain the function to which this argument belongs.
3360 *
3361 * Unlike other functions in this group, this one takes an LLVMValueRef
3362 * that corresponds to a llvm::Attribute.
3363 *
3364 * The returned LLVMValueRef is the llvm::Function to which this
3365 * argument belongs.
3366 */
3368
3369/**
3370 * Obtain the first parameter to a function.
3371 *
3372 * @see llvm::Function::arg_begin()
3373 */
3375
3376/**
3377 * Obtain the last parameter to a function.
3378 *
3379 * @see llvm::Function::arg_end()
3380 */
3382
3383/**
3384 * Obtain the next parameter to a function.
3385 *
3386 * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is
3387 * actually a wrapped iterator) and obtains the next parameter from the
3388 * underlying iterator.
3389 */
3391
3392/**
3393 * Obtain the previous parameter to a function.
3394 *
3395 * This is the opposite of LLVMGetNextParam().
3396 */
3398
3399/**
3400 * Set the alignment for a function parameter.
3401 *
3402 * @see llvm::Argument::addAttr()
3403 * @see llvm::AttrBuilder::addAlignmentAttr()
3404 */
3405LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align);
3406
3407/**
3408 * @}
3409 */
3410
3411/**
3412 * @defgroup LLVMCCoreValueGlobalIFunc IFuncs
3413 *
3414 * Functions in this group relate to indirect functions.
3415 *
3416 * Functions in this group expect LLVMValueRef instances that correspond
3417 * to llvm::GlobalIFunc instances.
3418 *
3419 * @{
3420 */
3421
3422/**
3423 * Add a global indirect function to a module under a specified name.
3424 *
3425 * @see llvm::GlobalIFunc::create()
3426 */
3428 size_t NameLen, LLVMTypeRef Ty,
3429 unsigned AddrSpace,
3430 LLVMValueRef Resolver);
3431
3432/**
3433 * Obtain a GlobalIFunc value from a Module by its name.
3434 *
3435 * The returned value corresponds to a llvm::GlobalIFunc value.
3436 *
3437 * @see llvm::Module::getNamedIFunc()
3438 */
3440 const char *Name,
3441 size_t NameLen);
3442
3443/**
3444 * Obtain an iterator to the first GlobalIFunc in a Module.
3445 *
3446 * @see llvm::Module::ifunc_begin()
3447 */
3449
3450/**
3451 * Obtain an iterator to the last GlobalIFunc in a Module.
3452 *
3453 * @see llvm::Module::ifunc_end()
3454 */
3456
3457/**
3458 * Advance a GlobalIFunc iterator to the next GlobalIFunc.
3459 *
3460 * Returns NULL if the iterator was already at the end and there are no more
3461 * global aliases.
3462 */
3464
3465/**
3466 * Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
3467 *
3468 * Returns NULL if the iterator was already at the beginning and there are
3469 * no previous global aliases.
3470 */
3472
3473/**
3474 * Retrieves the resolver function associated with this indirect function, or
3475 * NULL if it doesn't not exist.
3476 *
3477 * @see llvm::GlobalIFunc::getResolver()
3478 */
3480
3481/**
3482 * Sets the resolver function associated with this indirect function.
3483 *
3484 * @see llvm::GlobalIFunc::setResolver()
3485 */
3487 LLVMValueRef Resolver);
3488
3489/**
3490 * Remove a global indirect function from its parent module and delete it.
3491 *
3492 * @see llvm::GlobalIFunc::eraseFromParent()
3493 */
3495
3496/**
3497 * Remove a global indirect function from its parent module.
3498 *
3499 * This unlinks the global indirect function from its containing module but
3500 * keeps it alive.
3501 *
3502 * @see llvm::GlobalIFunc::removeFromParent()
3503 */
3505
3506/**
3507 * @}
3508 */
3509
3510/**
3511 * @}
3512 */
3513
3514/**
3515 * @}
3516 */
3517
3518/**
3519 * @}
3520 */
3521
3522/**
3523 * @defgroup LLVMCCoreValueMetadata Metadata
3524 *
3525 * @{
3526 */
3527
3528/**
3529 * Create an MDString value from a given string value.
3530 *
3531 * The MDString value does not take ownership of the given string, it remains
3532 * the responsibility of the caller to free it.
3533 *
3534 * @see llvm::MDString::get()
3535 */
3537 const char *Str, size_t SLen);
3538
3539/**
3540 * Create an MDNode value with the given array of operands.
3541 *
3542 * @see llvm::MDNode::get()
3543 */
3545 LLVMMetadataRef *MDs,
3546 size_t Count);
3547
3548/**
3549 * Obtain a Metadata as a Value.
3550 */
3552 LLVMMetadataRef MD);
3553
3554/**
3555 * Obtain a Value as a Metadata.
3556 */
3558
3559/**
3560 * Obtain the underlying string from a MDString value.
3561 *
3562 * @param V Instance to obtain string from.
3563 * @param Length Memory address which will hold length of returned string.
3564 * @return String data in MDString.
3565 */
3566LLVM_C_ABI const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length);
3567
3568/**
3569 * Obtain the number of operands from an MDNode value.
3570 *
3571 * @param V MDNode to get number of operands from.
3572 * @return Number of operands of the MDNode.
3573 */
3575
3576/**
3577 * Obtain the given MDNode's operands.
3578 *
3579 * The passed LLVMValueRef pointer should point to enough memory to hold all of
3580 * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as
3581 * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the
3582 * MDNode's operands.
3583 *
3584 * @param V MDNode to get the operands from.
3585 * @param Dest Destination array for operands.
3586 */
3588
3589/**
3590 * Replace an operand at a specific index in a llvm::MDNode value.
3591 *
3592 * @see llvm::MDNode::replaceOperandWith()
3593 */
3595 LLVMMetadataRef Replacement);
3596
3597/** Deprecated: Use LLVMMDStringInContext2 instead. */
3599 unsigned SLen);
3600/** Deprecated: Use LLVMMDStringInContext2 instead. */
3602 LLVMValueRef LLVMMDString(const char *Str, unsigned SLen),
3603 "Use of the global context is deprecated, use LLVMMDStringInContext2 "
3604 "instead");
3605/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3607 LLVMValueRef *Vals, unsigned Count);
3608/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3610 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count),
3611 "Use of the global context is deprecated, use LLVMMDNodeInContext2 "
3612 "instead");
3613
3614/**
3615 * @}
3616 */
3617
3618/**
3619 * @defgroup LLVMCCoreOperandBundle Operand Bundles
3620 *
3621 * Functions in this group operate on LLVMOperandBundleRef instances that
3622 * correspond to llvm::OperandBundleDef instances.
3623 *
3624 * @see llvm::OperandBundleDef
3625 *
3626 * @{
3627 */
3628
3629/**
3630 * Create a new operand bundle.
3631 *
3632 * Every invocation should be paired with LLVMDisposeOperandBundle() or memory
3633 * will be leaked.
3634 *
3635 * @param Tag Tag name of the operand bundle
3636 * @param TagLen Length of Tag
3637 * @param Args Memory address of an array of bundle operands
3638 * @param NumArgs Length of Args
3639 */
3641 size_t TagLen,
3642 LLVMValueRef *Args,
3643 unsigned NumArgs);
3644
3645/**
3646 * Destroy an operand bundle.
3647 *
3648 * This must be called for every created operand bundle or memory will be
3649 * leaked.
3650 */
3652
3653/**
3654 * Obtain the tag of an operand bundle as a string.
3655 *
3656 * @param Bundle Operand bundle to obtain tag of.
3657 * @param Len Out parameter which holds the length of the returned string.
3658 * @return The tag name of Bundle.
3659 * @see OperandBundleDef::getTag()
3660 */
3662 size_t *Len);
3663
3664/**
3665 * Obtain the number of operands for an operand bundle.
3666 *
3667 * @param Bundle Operand bundle to obtain operand count of.
3668 * @return The number of operands.
3669 * @see OperandBundleDef::input_size()
3670 */
3672
3673/**
3674 * Obtain the operand for an operand bundle at the given index.
3675 *
3676 * @param Bundle Operand bundle to obtain operand of.
3677 * @param Index An operand index, must be less than
3678 * LLVMGetNumOperandBundleArgs().
3679 * @return The operand.
3680 */
3683
3684/**
3685 * @}
3686 */
3687
3688/**
3689 * @defgroup LLVMCCoreValueBasicBlock Basic Block
3690 *
3691 * A basic block represents a single entry single exit section of code.
3692 * Basic blocks contain a list of instructions which form the body of
3693 * the block.
3694 *
3695 * Basic blocks belong to functions. They have the type of label.
3696 *
3697 * Basic blocks are themselves values. However, the C API models them as
3698 * LLVMBasicBlockRef.
3699 *
3700 * @see llvm::BasicBlock
3701 *
3702 * @{
3703 */
3704
3705/**
3706 * Convert a basic block instance to a value type.
3707 */
3709
3710/**
3711 * Determine whether an LLVMValueRef is itself a basic block.
3712 */
3714
3715/**
3716 * Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
3717 */
3719
3720/**
3721 * Obtain the string name of a basic block.
3722 */
3724
3725/**
3726 * Obtain the function to which a basic block belongs.
3727 *
3728 * @see llvm::BasicBlock::getParent()
3729 */
3731
3732/**
3733 * Obtain the terminator instruction for a basic block.
3734 *
3735 * If the basic block does not have a terminator (it is not well-formed
3736 * if it doesn't), then NULL is returned.
3737 *
3738 * The returned LLVMValueRef corresponds to an llvm::Instruction.
3739 *
3740 * @see llvm::BasicBlock::getTerminator()
3741 */
3743
3744/**
3745 * Obtain the number of basic blocks in a function.
3746 *
3747 * @param Fn Function value to operate on.
3748 */
3750
3751/**
3752 * Obtain all of the basic blocks in a function.
3753 *
3754 * This operates on a function value. The BasicBlocks parameter is a
3755 * pointer to a pre-allocated array of LLVMBasicBlockRef of at least
3756 * LLVMCountBasicBlocks() in length. This array is populated with
3757 * LLVMBasicBlockRef instances.
3758 */
3760 LLVMBasicBlockRef *BasicBlocks);
3761
3762/**
3763 * Obtain the first basic block in a function.
3764 *
3765 * The returned basic block can be used as an iterator. You will likely
3766 * eventually call into LLVMGetNextBasicBlock() with it.
3767 *
3768 * @see llvm::Function::begin()
3769 */
3771
3772/**
3773 * Obtain the last basic block in a function.
3774 *
3775 * @see llvm::Function::end()
3776 */
3778
3779/**
3780 * Advance a basic block iterator.
3781 */
3783
3784/**
3785 * Go backwards in a basic block iterator.
3786 */
3788
3789/**
3790 * Obtain the basic block that corresponds to the entry point of a
3791 * function.
3792 *
3793 * @see llvm::Function::getEntryBlock()
3794 */
3796
3797/**
3798 * Insert the given basic block after the insertion point of the given builder.
3799 *
3800 * The insertion point must be valid.
3801 *
3802 * @see llvm::Function::BasicBlockListType::insertAfter()
3803 */
3804LLVM_C_ABI void
3807
3808/**
3809 * Append the given basic block to the basic block list of the given function.
3810 *
3811 * @see llvm::Function::BasicBlockListType::push_back()
3812 */
3815
3816/**
3817 * Create a new basic block without inserting it into a function.
3818 *
3819 * @see llvm::BasicBlock::Create()
3820 */
3822 const char *Name);
3823
3824/**
3825 * Append a basic block to the end of a function.
3826 *
3827 * @see llvm::BasicBlock::Create()
3828 */
3830 LLVMValueRef Fn,
3831 const char *Name);
3832
3833/**
3834 * Append a basic block to the end of a function using the global
3835 * context.
3836 *
3837 * @see llvm::BasicBlock::Create()
3838 */
3841 "Use of the global context is deprecated, use "
3842 "LLVMAppendBasicBlockInContext instead");
3843
3844/**
3845 * Insert a basic block in a function before another basic block.
3846 *
3847 * The function to add to is determined by the function of the
3848 * passed basic block.
3849 *
3850 * @see llvm::BasicBlock::Create()
3851 */
3854 const char *Name);
3855
3856/**
3857 * Insert a basic block in a function using the global context.
3858 *
3859 * @see llvm::BasicBlock::Create()
3860 */
3863 const char *Name),
3864 "Use of the global context is deprecated, use "
3865 "LLVMInsertBasicBlockInContext instead");
3866
3867/**
3868 * Remove a basic block from a function and delete it.
3869 *
3870 * This deletes the basic block from its containing function and deletes
3871 * the basic block itself.
3872 *
3873 * @see llvm::BasicBlock::eraseFromParent()
3874 */
3876
3877/**
3878 * Remove a basic block from a function.
3879 *
3880 * This deletes the basic block from its containing function but keep
3881 * the basic block alive.
3882 *
3883 * @see llvm::BasicBlock::removeFromParent()
3884 */
3886
3887/**
3888 * Move a basic block to before another one.
3889 *
3890 * @see llvm::BasicBlock::moveBefore()
3891 */
3893 LLVMBasicBlockRef MovePos);
3894
3895/**
3896 * Move a basic block to after another one.
3897 *
3898 * @see llvm::BasicBlock::moveAfter()
3899 */
3901 LLVMBasicBlockRef MovePos);
3902
3903/**
3904 * Obtain the first instruction in a basic block.
3905 *
3906 * The returned LLVMValueRef corresponds to a llvm::Instruction
3907 * instance.
3908 */
3910
3911/**
3912 * Obtain the last instruction in a basic block.
3913 *
3914 * The returned LLVMValueRef corresponds to an LLVM:Instruction.
3915 */
3917
3918/**
3919 * @}
3920 */
3921
3922/**
3923 * @defgroup LLVMCCoreValueInstruction Instructions
3924 *
3925 * Functions in this group relate to the inspection and manipulation of
3926 * individual instructions.
3927 *
3928 * In the C++ API, an instruction is modeled by llvm::Instruction. This
3929 * class has a large number of descendents. llvm::Instruction is a
3930 * llvm::Value and in the C API, instructions are modeled by
3931 * LLVMValueRef.
3932 *
3933 * This group also contains sub-groups which operate on specific
3934 * llvm::Instruction types, e.g. llvm::CallInst.
3935 *
3936 * @{
3937 */
3938
3939/**
3940 * Determine whether an instruction has any metadata attached.
3941 */
3943
3944/**
3945 * Return metadata associated with an instruction value.
3946 */
3948
3949/**
3950 * Set metadata associated with an instruction value.
3951 */
3952LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID,
3954
3955/**
3956 * Returns the metadata associated with an instruction value, but filters out
3957 * all the debug locations.
3958 *
3959 * @see llvm::Instruction::getAllMetadataOtherThanDebugLoc()
3960 */
3963 size_t *NumEntries);
3964
3965/**
3966 * Obtain the basic block to which an instruction belongs.
3967 *
3968 * @see llvm::Instruction::getParent()
3969 */
3971
3972/**
3973 * Obtain the instruction that occurs after the one specified.
3974 *
3975 * The next instruction will be from the same basic block.
3976 *
3977 * If this is the last instruction in a basic block, NULL will be
3978 * returned.
3979 */
3981
3982/**
3983 * Obtain the instruction that occurred before this one.
3984 *
3985 * If the instruction is the first instruction in a basic block, NULL
3986 * will be returned.
3987 */
3989
3990/**
3991 * Remove an instruction.
3992 *
3993 * The instruction specified is removed from its containing building
3994 * block but is kept alive.
3995 *
3996 * @see llvm::Instruction::removeFromParent()
3997 */
3999
4000/**
4001 * Remove and delete an instruction.
4002 *
4003 * The instruction specified is removed from its containing building
4004 * block and then deleted.
4005 *
4006 * @see llvm::Instruction::eraseFromParent()
4007 */
4009
4010/**
4011 * Delete an instruction.
4012 *
4013 * The instruction specified is deleted. It must have previously been
4014 * removed from its containing building block.
4015 *
4016 * @see llvm::Value::deleteValue()
4017 */
4019
4020/**
4021 * Obtain the code opcode for an individual instruction.
4022 *
4023 * @see llvm::Instruction::getOpCode()
4024 */
4026
4027/**
4028 * Obtain the predicate of an instruction.
4029 *
4030 * This is only valid for instructions that correspond to llvm::ICmpInst.
4031 *
4032 * @see llvm::ICmpInst::getPredicate()
4033 */
4035
4036/**
4037 * Get whether or not an icmp instruction has the samesign flag.
4038 *
4039 * This is only valid for instructions that correspond to llvm::ICmpInst.
4040 *
4041 * @see llvm::ICmpInst::hasSameSign()
4042 */
4044
4045/**
4046 * Set the samesign flag on an icmp instruction.
4047 *
4048 * This is only valid for instructions that correspond to llvm::ICmpInst.
4049 *
4050 * @see llvm::ICmpInst::setSameSign()
4051 */
4053
4054/**
4055 * Obtain the float predicate of an instruction.
4056 *
4057 * This is only valid for instructions that correspond to llvm::FCmpInst.
4058 *
4059 * @see llvm::FCmpInst::getPredicate()
4060 */
4062
4063/**
4064 * Create a copy of 'this' instruction that is identical in all ways
4065 * except the following:
4066 * * The instruction has no parent
4067 * * The instruction has no name
4068 *
4069 * @see llvm::Instruction::clone()
4070 */
4072
4073/**
4074 * Determine whether an instruction is a terminator. This routine is named to
4075 * be compatible with historical functions that did this by querying the
4076 * underlying C++ type.
4077 *
4078 * @see llvm::Instruction::isTerminator()
4079 */
4081
4082/**
4083 * Obtain the first debug record attached to an instruction.
4084 *
4085 * Use LLVMGetNextDbgRecord() and LLVMGetPreviousDbgRecord() to traverse the
4086 * sequence of DbgRecords.
4087 *
4088 * Return the first DbgRecord attached to Inst or NULL if there are none.
4089 *
4090 * @see llvm::Instruction::getDbgRecordRange()
4091 */
4093
4094/**
4095 * Obtain the last debug record attached to an instruction.
4096 *
4097 * Return the last DbgRecord attached to Inst or NULL if there are none.
4098 *
4099 * @see llvm::Instruction::getDbgRecordRange()
4100 */
4102
4103/**
4104 * Obtain the next DbgRecord in the sequence or NULL if there are no more.
4105 *
4106 * @see llvm::Instruction::getDbgRecordRange()
4107 */
4109
4110/**
4111 * Obtain the previous DbgRecord in the sequence or NULL if there are no more.
4112 *
4113 * @see llvm::Instruction::getDbgRecordRange()
4114 */
4117
4118/**
4119 * Get the debug location attached to the debug record.
4120 *
4121 * @see llvm::DbgRecord::getDebugLoc()
4122 */
4124
4126
4127/**
4128 * Get the value of the DbgVariableRecord.
4129 *
4130 * @see llvm::DbgVariableRecord::getValue()
4131 */
4133 unsigned OpIdx);
4134
4135/**
4136 * Get the debug info variable of the DbgVariableRecord.
4137 *
4138 * @see llvm::DbgVariableRecord::getVariable()
4139 */
4142
4143/**
4144 * Get the debug info expression of the DbgVariableRecord.
4145 *
4146 * @see llvm::DbgVariableRecord::getExpression()
4147 */
4150
4151/**
4152 * @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations
4153 *
4154 * Functions in this group apply to instructions that refer to call
4155 * sites and invocations. These correspond to C++ types in the
4156 * llvm::CallInst class tree.
4157 *
4158 * @{
4159 */
4160
4161/**
4162 * Obtain the argument count for a call instruction.
4163 *
4164 * This expects an LLVMValueRef that corresponds to a llvm::CallInst,
4165 * llvm::InvokeInst, or llvm:FuncletPadInst.
4166 *
4167 * @see llvm::CallInst::getNumArgOperands()
4168 * @see llvm::InvokeInst::getNumArgOperands()
4169 * @see llvm::FuncletPadInst::getNumArgOperands()
4170 */
4172
4173/**
4174 * Set the calling convention for a call instruction.
4175 *
4176 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4177 * llvm::InvokeInst.
4178 *
4179 * @see llvm::CallInst::setCallingConv()
4180 * @see llvm::InvokeInst::setCallingConv()
4181 */
4182LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
4183
4184/**
4185 * Obtain the calling convention for a call instruction.
4186 *
4187 * This is the opposite of LLVMSetInstructionCallConv(). Reads its
4188 * usage.
4189 *
4190 * @see LLVMSetInstructionCallConv()
4191 */
4193
4196 unsigned Align);
4197
4201 LLVMAttributeIndex Idx);
4204 LLVMAttributeRef *Attrs);
4207 unsigned KindID);
4209 LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
4212 unsigned KindID);
4215 const char *K, unsigned KLen);
4216
4217/**
4218 * Obtain the function type called by this instruction.
4219 *
4220 * @see llvm::CallBase::getFunctionType()
4221 */
4223
4224/**
4225 * Obtain the pointer to the function invoked by this instruction.
4226 *
4227 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4228 * llvm::InvokeInst.
4229 *
4230 * @see llvm::CallInst::getCalledOperand()
4231 * @see llvm::InvokeInst::getCalledOperand()
4232 */
4234
4235/**
4236 * Obtain the number of operand bundles attached to this instruction.
4237 *
4238 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4239 *
4240 * @see llvm::CallBase::getNumOperandBundles()
4241 */
4243
4244/**
4245 * Obtain the operand bundle attached to this instruction at the given index.
4246 * Use LLVMDisposeOperandBundle to free the operand bundle.
4247 *
4248 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4249 */
4251 unsigned Index);
4252
4253/**
4254 * Obtain whether a call instruction is a tail call.
4255 *
4256 * This only works on llvm::CallInst instructions.
4257 *
4258 * @see llvm::CallInst::isTailCall()
4259 */
4261
4262/**
4263 * Set whether a call instruction is a tail call.
4264 *
4265 * This only works on llvm::CallInst instructions.
4266 *
4267 * @see llvm::CallInst::setTailCall()
4268 */
4269LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall);
4270
4271/**
4272 * Obtain a tail call kind of the call instruction.
4273 *
4274 * @see llvm::CallInst::setTailCallKind()
4275 */
4277
4278/**
4279 * Set the call kind of the call instruction.
4280 *
4281 * @see llvm::CallInst::getTailCallKind()
4282 */
4284 LLVMTailCallKind kind);
4285
4286/**
4287 * Return the normal destination basic block.
4288 *
4289 * This only works on llvm::InvokeInst instructions.
4290 *
4291 * @see llvm::InvokeInst::getNormalDest()
4292 */
4294
4295/**
4296 * Return the unwind destination basic block.
4297 *
4298 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4299 * llvm::CatchSwitchInst instructions.
4300 *
4301 * @see llvm::InvokeInst::getUnwindDest()
4302 * @see llvm::CleanupReturnInst::getUnwindDest()
4303 * @see llvm::CatchSwitchInst::getUnwindDest()
4304 */
4306
4307/**
4308 * Set the normal destination basic block.
4309 *
4310 * This only works on llvm::InvokeInst instructions.
4311 *
4312 * @see llvm::InvokeInst::setNormalDest()
4313 */
4315
4316/**
4317 * Set the unwind destination basic block.
4318 *
4319 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4320 * llvm::CatchSwitchInst instructions.
4321 *
4322 * @see llvm::InvokeInst::setUnwindDest()
4323 * @see llvm::CleanupReturnInst::setUnwindDest()
4324 * @see llvm::CatchSwitchInst::setUnwindDest()
4325 */
4327
4328/**
4329 * Get the default destination of a CallBr instruction.
4330 *
4331 * @see llvm::CallBrInst::getDefaultDest()
4332 */
4334
4335/**
4336 * Get the number of indirect destinations of a CallBr instruction.
4337 *
4338 * @see llvm::CallBrInst::getNumIndirectDests()
4339
4340 */
4342
4343/**
4344 * Get the indirect destination of a CallBr instruction at the given index.
4345 *
4346 * @see llvm::CallBrInst::getIndirectDest()
4347 */
4349 unsigned Idx);
4350
4351/**
4352 * @}
4353 */
4354
4355/**
4356 * @defgroup LLVMCCoreValueInstructionTerminator Terminators
4357 *
4358 * Functions in this group only apply to instructions for which
4359 * LLVMIsATerminatorInst returns true.
4360 *
4361 * @{
4362 */
4363
4364/**
4365 * Return the number of successors that this terminator has.
4366 *
4367 * @see llvm::Instruction::getNumSuccessors
4368 */
4370
4371/**
4372 * Return the specified successor.
4373 *
4374 * @see llvm::Instruction::getSuccessor
4375 */
4377
4378/**
4379 * Update the specified successor to point at the provided block.
4380 *
4381 * @see llvm::Instruction::setSuccessor
4382 */
4383LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i,
4385
4386/**
4387 * Return if an instruction is a conditional branch.
4388 *
4389 * Deprecated: Use LLVMIsACondBrInst instead.
4390 */
4392
4393/**
4394 * Return the condition of a branch instruction.
4395 *
4396 * This only works on llvm::CondBrInst instructions.
4397 *
4398 * @see llvm::CondBrInst::getCondition
4399 */
4401
4402/**
4403 * Set the condition of a branch instruction.
4404 *
4405 * This only works on llvm::CondBrInst instructions.
4406 *
4407 * @see llvm::CondBrInst::setCondition
4408 */
4410
4411/**
4412 * Obtain the default destination basic block of a switch instruction.
4413 *
4414 * This only works on llvm::SwitchInst instructions.
4415 *
4416 * @see llvm::SwitchInst::getDefaultDest()
4417 */
4419
4420/**
4421 * Obtain the case value for a successor of a switch instruction. i corresponds
4422 * to the successor index. The first successor is the default destination, so i
4423 * must be greater than zero.
4424 *
4425 * This only works on llvm::SwitchInst instructions.
4426 *
4427 * @see llvm::SwitchInst::CaseHandle::getCaseValue()
4428 */
4430 unsigned i);
4431
4432/**
4433 * Set the case value for a successor of a switch instruction. i corresponds to
4434 * the successor index. The first successor is the default destination, so i
4435 * must be greater than zero.
4436 *
4437 * This only works on llvm::SwitchInst instructions.
4438 *
4439 * @see llvm::SwitchInst::CaseHandle::setValue()
4440 */
4441LLVM_C_ABI void LLVMSetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i,
4442 LLVMValueRef CaseValue);
4443
4444/**
4445 * @}
4446 */
4447
4448/**
4449 * @defgroup LLVMCCoreValueInstructionAlloca Allocas
4450 *
4451 * Functions in this group only apply to instructions that map to
4452 * llvm::AllocaInst instances.
4453 *
4454 * @{
4455 */
4456
4457/**
4458 * Obtain the type that is being allocated by the alloca instruction.
4459 */
4461
4462/**
4463 * @}
4464 */
4465
4466/**
4467 * @defgroup LLVMCCoreValueInstructionGetElementPointer GEPs
4468 *
4469 * Functions in this group only apply to instructions that map to
4470 * llvm::GetElementPtrInst instances.
4471 *
4472 * @{
4473 */
4474
4475/**
4476 * Check whether the given GEP operator is inbounds.
4477 */
4479
4480/**
4481 * Set the given GEP instruction to be inbounds or not.
4482 */
4484
4485/**
4486 * Get the source element type of the given GEP operator.
4487 */
4489
4490/**
4491 * Get the no-wrap related flags for the given GEP instruction.
4492 *
4493 * @see llvm::GetElementPtrInst::getNoWrapFlags
4494 */
4496
4497/**
4498 * Set the no-wrap related flags for the given GEP instruction.
4499 *
4500 * @see llvm::GetElementPtrInst::setNoWrapFlags
4501 */
4503 LLVMGEPNoWrapFlags NoWrapFlags);
4504
4505/**
4506 * @}
4507 */
4508
4509/**
4510 * @defgroup LLVMCCoreValueInstructionPHINode PHI Nodes
4511 *
4512 * Functions in this group only apply to instructions that map to
4513 * llvm::PHINode instances.
4514 *
4515 * @{
4516 */
4517
4518/**
4519 * Add an incoming value to the end of a PHI list.
4520 */
4522 LLVMValueRef *IncomingValues,
4523 LLVMBasicBlockRef *IncomingBlocks,
4524 unsigned Count);
4525
4526/**
4527 * Obtain the number of incoming basic blocks to a PHI node.
4528 */
4529LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode);
4530
4531/**
4532 * Obtain an incoming value to a PHI node as an LLVMValueRef.
4533 */
4535 unsigned Index);
4536
4537/**
4538 * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
4539 */
4541 unsigned Index);
4542
4543/**
4544 * @}
4545 */
4546
4547/**
4548 * @defgroup LLVMCCoreValueInstructionExtractValue ExtractValue
4549 * @defgroup LLVMCCoreValueInstructionInsertValue InsertValue
4550 *
4551 * Functions in this group only apply to instructions that map to
4552 * llvm::ExtractValue and llvm::InsertValue instances.
4553 *
4554 * @{
4555 */
4556
4557/**
4558 * Obtain the number of indices.
4559 * NB: This also works on GEP operators.
4560 */
4562
4563/**
4564 * Obtain the indices as an array.
4565 */
4567
4568/**
4569 * @}
4570 */
4571
4572/**
4573 * @}
4574 */
4575
4576/**
4577 * @}
4578 */
4579
4580/**
4581 * @defgroup LLVMCCoreInstructionBuilder Instruction Builders
4582 *
4583 * An instruction builder represents a point within a basic block and is
4584 * the exclusive means of building instructions using the C interface.
4585 *
4586 * @{
4587 */
4588
4592 "Use of the global context is deprecated, use "
4593 "LLVMCreateBuilderInContext instead");
4594/**
4595 * Set the builder position before Instr but after any attached debug records,
4596 * or if Instr is null set the position to the end of Block.
4597 */
4599 LLVMBasicBlockRef Block,
4600 LLVMValueRef Instr);
4601/**
4602 * Set the builder position before Instr and any attached debug records,
4603 * or if Instr is null set the position to the end of Block.
4604 */
4606 LLVMBasicBlockRef Block,
4607 LLVMValueRef Inst);
4608/**
4609 * Set the builder position before Instr but after any attached debug records.
4610 */
4612 LLVMValueRef Instr);
4613/**
4614 * Set the builder position before Instr and any attached debug records.
4615 */
4616LLVM_C_ABI void
4618 LLVMValueRef Instr);
4620 LLVMBasicBlockRef Block);
4624 LLVMValueRef Instr);
4626 LLVMValueRef Instr,
4627 const char *Name);
4629
4630/* Metadata */
4631
4632/**
4633 * Get location information used by debugging information.
4634 *
4635 * @see llvm::IRBuilder::getCurrentDebugLocation()
4636 */
4638
4639/**
4640 * Set location information used by debugging information.
4641 *
4642 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
4643 *
4644 * @see llvm::IRBuilder::SetCurrentDebugLocation()
4645 */
4647 LLVMMetadataRef Loc);
4648
4649/**
4650 * Attempts to set the debug location for the given instruction using the
4651 * current debug location for the given builder. If the builder has no current
4652 * debug location, this function is a no-op.
4653 *
4654 * @see llvm::IRBuilder::SetInstDebugLocation()
4655 */
4657 LLVMValueRef Inst);
4658
4659/**
4660 * Same as LLVMSetInstDebugLocation.
4661 *
4662 * @deprecated Use the identical LLVMSetInstDebugLocation.
4663 *
4664 * @see llvm::IRBuilder::SetInstDebugLocation()
4665 */
4667 LLVMValueRef Inst);
4668
4669/**
4670 * Get the dafult floating-point math metadata for a given builder.
4671 *
4672 * @see llvm::IRBuilder::getDefaultFPMathTag()
4673 */
4676
4677/**
4678 * Set the default floating-point math metadata for the given builder.
4679 *
4680 * To clear the metadata, pass NULL to \p FPMathTag.
4681 *
4682 * @see llvm::IRBuilder::setDefaultFPMathTag()
4683 */
4685 LLVMMetadataRef FPMathTag);
4686
4687/**
4688 * Obtain the context to which this builder is associated.
4689 *
4690 * @see llvm::IRBuilder::getContext()
4691 */
4693
4694/**
4695 * Deprecated: Passing the NULL location will crash.
4696 * Use LLVMGetCurrentDebugLocation2 instead.
4697 */
4699 LLVMValueRef L);
4700/**
4701 * Deprecated: Returning the NULL location will crash.
4702 * Use LLVMGetCurrentDebugLocation2 instead.
4703 */
4705
4706/* Terminators */
4710 LLVMValueRef *RetVals,
4711 unsigned N);
4714 LLVMBasicBlockRef Then,
4715 LLVMBasicBlockRef Else);
4717 LLVMBasicBlockRef Else,
4718 unsigned NumCases);
4720 unsigned NumDests);
4723 LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests,
4724 unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs,
4725 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4727 LLVMValueRef Fn, LLVMValueRef *Args,
4728 unsigned NumArgs,
4729 LLVMBasicBlockRef Then,
4730 LLVMBasicBlockRef Catch,
4731 const char *Name);
4734 unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
4735 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4737
4738/* Exception Handling */
4741 LLVMValueRef PersFn,
4742 unsigned NumClauses,
4743 const char *Name);
4745 LLVMValueRef CatchPad,
4748 LLVMValueRef CatchPad,
4751 LLVMValueRef ParentPad,
4752 LLVMValueRef *Args, unsigned NumArgs,
4753 const char *Name);
4755 LLVMValueRef ParentPad,
4756 LLVMValueRef *Args,
4757 unsigned NumArgs, const char *Name);
4759 LLVMValueRef ParentPad,
4760 LLVMBasicBlockRef UnwindBB,
4761 unsigned NumHandlers,
4762 const char *Name);
4763
4764/* Add a case to the switch instruction */
4766 LLVMBasicBlockRef Dest);
4767
4768/* Add a destination to the indirectbr instruction */
4770 LLVMBasicBlockRef Dest);
4771
4772/* Get the number of clauses on the landingpad instruction */
4773LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
4774
4775/* Get the value of the clause at index Idx on the landingpad instruction */
4776LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
4777
4778/* Add a catch or filter clause to the landingpad instruction */
4779LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal);
4780
4781/* Get the 'cleanup' flag in the landingpad instruction */
4783
4784/* Set the 'cleanup' flag in the landingpad instruction */
4785LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val);
4786
4787/* Add a destination to the catchswitch instruction */
4788LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch,
4789 LLVMBasicBlockRef Dest);
4790
4791/* Get the number of handlers on the catchswitch instruction */
4792LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch);
4793
4794/**
4795 * Obtain the basic blocks acting as handlers for a catchswitch instruction.
4796 *
4797 * The Handlers parameter should point to a pre-allocated array of
4798 * LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the
4799 * first LLVMGetNumHandlers() entries in the array will be populated
4800 * with LLVMBasicBlockRef instances.
4801 *
4802 * @param CatchSwitch The catchswitch instruction to operate on.
4803 * @param Handlers Memory address of an array to be filled with basic blocks.
4804 */
4805LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch,
4806 LLVMBasicBlockRef *Handlers);
4807
4808/* Funclets */
4809
4810/* Get the number of funcletpad arguments. */
4812
4813/* Set a funcletpad argument at the given index. */
4814LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i,
4815 LLVMValueRef value);
4816
4817/**
4818 * Get the parent catchswitch instruction of a catchpad instruction.
4819 *
4820 * This only works on llvm::CatchPadInst instructions.
4821 *
4822 * @see llvm::CatchPadInst::getCatchSwitch()
4823 */
4825
4826/**
4827 * Set the parent catchswitch instruction of a catchpad instruction.
4828 *
4829 * This only works on llvm::CatchPadInst instructions.
4830 *
4831 * @see llvm::CatchPadInst::setCatchSwitch()
4832 */
4834 LLVMValueRef CatchSwitch);
4835
4836/* Arithmetic */
4838 LLVMValueRef RHS, const char *Name);
4840 LLVMValueRef RHS, const char *Name);
4842 LLVMValueRef RHS, const char *Name);
4844 LLVMValueRef RHS, const char *Name);
4846 LLVMValueRef RHS, const char *Name);
4848 LLVMValueRef RHS, const char *Name);
4850 LLVMValueRef RHS, const char *Name);
4852 LLVMValueRef RHS, const char *Name);
4854 LLVMValueRef RHS, const char *Name);
4856 LLVMValueRef RHS, const char *Name);
4858 LLVMValueRef RHS, const char *Name);
4860 LLVMValueRef RHS, const char *Name);
4862 LLVMValueRef RHS, const char *Name);
4864 LLVMValueRef RHS, const char *Name);
4866 LLVMValueRef RHS, const char *Name);
4868 LLVMValueRef RHS, const char *Name);
4870 LLVMValueRef RHS, const char *Name);
4872 LLVMValueRef RHS, const char *Name);
4874 LLVMValueRef RHS, const char *Name);
4876 LLVMValueRef RHS, const char *Name);
4878 LLVMValueRef RHS, const char *Name);
4880 LLVMValueRef RHS, const char *Name);
4882 LLVMValueRef RHS, const char *Name);
4884 LLVMValueRef RHS, const char *Name);
4886 LLVMValueRef RHS, const char *Name);
4888 LLVMValueRef RHS, const char *Name);
4891 const char *Name);
4893 const char *Name);
4895 const char *Name);
4898 const char *Name),
4899 "Use LLVMBuildNeg + LLVMSetNUW instead.");
4901 const char *Name);
4903 const char *Name);
4904
4906LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW);
4908LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
4910LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact);
4911
4912/**
4913 * Gets if the instruction has the non-negative flag set.
4914 * Only valid for zext instructions.
4915 */
4917/**
4918 * Sets the non-negative flag for the instruction.
4919 * Only valid for zext instructions.
4920 */
4921LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg);
4922
4923/**
4924 * Get the flags for which fast-math-style optimizations are allowed for this
4925 * value.
4926 *
4927 * Only valid on floating point instructions.
4928 * @see LLVMCanValueUseFastMathFlags
4929 */
4931
4932/**
4933 * Sets the flags for which fast-math-style optimizations are allowed for this
4934 * value.
4935 *
4936 * Only valid on floating point instructions.
4937 * @see LLVMCanValueUseFastMathFlags
4938 */
4940 LLVMFastMathFlags FMF);
4941
4942/**
4943 * Check if a given value can potentially have fast math flags.
4944 *
4945 * Will return true for floating point arithmetic instructions, and for select,
4946 * phi, and call instructions whose type is a floating point type, or a vector
4947 * or array thereof. See https://llvm.org/docs/LangRef.html#fast-math-flags
4948 */
4950
4951/**
4952 * Gets whether the instruction has the disjoint flag set.
4953 * Only valid for or instructions.
4954 */
4956/**
4957 * Sets the disjoint flag for the instruction.
4958 * Only valid for or instructions.
4959 */
4960LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint);
4961
4962/* Memory */
4964 const char *Name);
4966 LLVMValueRef Val,
4967 const char *Name);
4968
4969/**
4970 * Creates and inserts a memset to the specified pointer and the
4971 * specified value.
4972 *
4973 * @see llvm::IRRBuilder::CreateMemSet()
4974 */
4976 LLVMValueRef Val, LLVMValueRef Len,
4977 unsigned Align);
4978/**
4979 * Creates and inserts a memcpy between the specified pointers.
4980 *
4981 * @see llvm::IRRBuilder::CreateMemCpy()
4982 */
4984 unsigned DstAlign, LLVMValueRef Src,
4985 unsigned SrcAlign, LLVMValueRef Size);
4986/**
4987 * Creates and inserts a memmove between the specified pointers.
4988 *
4989 * @see llvm::IRRBuilder::CreateMemMove()
4990 */
4992 unsigned DstAlign, LLVMValueRef Src,
4993 unsigned SrcAlign, LLVMValueRef Size);
4994
4996 const char *Name);
4998 LLVMValueRef Val,
4999 const char *Name);
5002 LLVMValueRef PointerVal,
5003 const char *Name);
5005 LLVMValueRef Ptr);
5007 LLVMValueRef Pointer,
5008 LLVMValueRef *Indices,
5009 unsigned NumIndices, const char *Name);
5011 LLVMValueRef Pointer,
5012 LLVMValueRef *Indices,
5013 unsigned NumIndices,
5014 const char *Name);
5015/**
5016 * Creates a GetElementPtr instruction. Similar to LLVMBuildGEP2, but allows
5017 * specifying the no-wrap flags.
5018 *
5019 * @see llvm::IRBuilder::CreateGEP()
5020 */
5023 LLVMValueRef *Indices, unsigned NumIndices, const char *Name,
5024 LLVMGEPNoWrapFlags NoWrapFlags);
5026 LLVMValueRef Pointer, unsigned Idx,
5027 const char *Name);
5029 const char *Name);
5030/**
5031 * Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
5032 */
5034 const char *Str,
5035 const char *Name);
5037LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst,
5038 LLVMBool IsVolatile);
5040LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
5042LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst,
5043 LLVMAtomicOrdering Ordering);
5046 LLVMAtomicRMWBinOp BinOp);
5047
5048/* Casts */
5050 LLVMTypeRef DestTy, const char *Name);
5052 LLVMTypeRef DestTy, const char *Name);
5054 LLVMTypeRef DestTy, const char *Name);
5056 LLVMTypeRef DestTy, const char *Name);
5058 LLVMTypeRef DestTy, const char *Name);
5060 LLVMTypeRef DestTy, const char *Name);
5062 LLVMTypeRef DestTy, const char *Name);
5064 LLVMTypeRef DestTy, const char *Name);
5066 LLVMTypeRef DestTy, const char *Name);
5068 LLVMTypeRef DestTy, const char *Name);
5070 LLVMTypeRef DestTy, const char *Name);
5072 LLVMTypeRef DestTy, const char *Name);
5074 LLVMTypeRef DestTy,
5075 const char *Name);
5077 LLVMTypeRef DestTy,
5078 const char *Name);
5080 LLVMTypeRef DestTy,
5081 const char *Name);
5083 LLVMValueRef Val,
5084 LLVMTypeRef DestTy,
5085 const char *Name);
5087 LLVMValueRef Val, LLVMTypeRef DestTy,
5088 const char *Name);
5090 LLVMTypeRef DestTy,
5091 const char *Name);
5093 LLVMTypeRef DestTy, LLVMBool IsSigned,
5094 const char *Name);
5096 LLVMTypeRef DestTy, const char *Name);
5097
5098/** Deprecated: This cast is always signed. Use LLVMBuildIntCast2 instead. */
5100 LLVMValueRef Val, /*Signed cast!*/
5101 LLVMTypeRef DestTy, const char *Name);
5102
5104 LLVMTypeRef DestTy,
5105 LLVMBool DestIsSigned);
5106
5107/* Comparisons */
5110 const char *Name);
5113 const char *Name);
5114
5115/* Miscellaneous instructions */
5117 const char *Name);
5119 LLVMValueRef Fn, LLVMValueRef *Args,
5120 unsigned NumArgs, const char *Name);
5123 unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles,
5124 const char *Name);
5126 LLVMValueRef Then, LLVMValueRef Else,
5127 const char *Name);
5129 LLVMTypeRef Ty, const char *Name);
5131 LLVMValueRef VecVal,
5132 LLVMValueRef Index,
5133 const char *Name);
5135 LLVMValueRef VecVal,
5136 LLVMValueRef EltVal,
5137 LLVMValueRef Index,
5138 const char *Name);
5140 LLVMValueRef V2,
5141 LLVMValueRef Mask,
5142 const char *Name);
5144 LLVMValueRef AggVal,
5145 unsigned Index, const char *Name);
5147 LLVMValueRef AggVal,
5148 LLVMValueRef EltVal,
5149 unsigned Index, const char *Name);
5151 const char *Name);
5153 LLVMValueRef Src,
5154 LLVMValueRef Offset,
5155 const char *Name);
5157 LLVMValueRef Val,
5158 LLVMValueRef Offset,
5159 const char *Name);
5160
5162 const char *Name);
5164 const char *Name);
5167 const char *Name);
5169 LLVMAtomicOrdering ordering,
5170 LLVMBool singleThread, const char *Name);
5172 LLVMAtomicOrdering ordering,
5173 unsigned SSID,
5174 const char *Name);
5177 LLVMValueRef PTR, LLVMValueRef Val,
5178 LLVMAtomicOrdering ordering,
5179 LLVMBool singleThread);
5182 LLVMAtomicOrdering ordering, unsigned SSID);
5185 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5186 LLVMBool SingleThread);
5189 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5190 unsigned SSID);
5191
5192/**
5193 * Get the number of elements in the mask of a ShuffleVector instruction.
5194 */
5195LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
5196
5197/**
5198 * \returns a constant that specifies that the result of a \c ShuffleVectorInst
5199 * is undefined.
5200 */
5202
5203/**
5204 * Get the mask value at position Elt in the mask of a ShuffleVector
5205 * instruction.
5206 *
5207 * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is
5208 * poison at that position.
5209 */
5210LLVM_C_ABI int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
5211
5214 LLVMBool SingleThread);
5215
5216/**
5217 * Returns whether an instruction is an atomic instruction, e.g., atomicrmw,
5218 * cmpxchg, fence, or loads and stores with atomic ordering.
5219 */
5221
5222/**
5223 * Returns the synchronization scope ID of an atomic instruction.
5224 */
5226
5227/**
5228 * Sets the synchronization scope ID of an atomic instruction.
5229 */
5231 unsigned SSID);
5232
5236 LLVMAtomicOrdering Ordering);
5240 LLVMAtomicOrdering Ordering);
5241
5242/**
5243 * @}
5244 */
5245
5246/**
5247 * @defgroup LLVMCCoreModuleProvider Module Providers
5248 *
5249 * @{
5250 */
5251
5252/**
5253 * Changes the type of M so it can be passed to FunctionPassManagers and the
5254 * JIT. They take ModuleProviders for historical reasons.
5255 */
5258
5259/**
5260 * Destroys the module M.
5261 */
5263
5264/**
5265 * @}
5266 */
5267
5268/**
5269 * @defgroup LLVMCCoreMemoryBuffers Memory Buffers
5270 *
5271 * @{
5272 */
5273
5275 const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5277 LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5279 const char *InputData, size_t InputDataLength, const char *BufferName,
5280 LLVMBool RequiresNullTerminator);
5282 const char *InputData, size_t InputDataLength, const char *BufferName);
5286
5287/**
5288 * @}
5289 */
5290
5291/**
5292 * @defgroup LLVMCCorePassManagers Pass Managers
5293 * @ingroup LLVMCCore
5294 *
5295 * @{
5296 */
5297
5298/** Constructs a new whole-module pass pipeline. This type of pipeline is
5299 suitable for link-time optimization and whole-module transformations.
5300 @see llvm::PassManager::PassManager */
5302
5303/** Constructs a new function-by-function pass pipeline over the module
5304 provider. It does not take ownership of the module provider. This type of
5305 pipeline is suitable for code generation and JIT compilation tasks.
5306 @see llvm::FunctionPassManager::FunctionPassManager */
5309
5310/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */
5313
5314/** Initializes, executes on the provided module, and finalizes all of the
5315 passes scheduled in the pass manager. Returns 1 if any of the passes
5316 modified the module, 0 otherwise.
5317 @see llvm::PassManager::run(Module&) */
5319
5320/** Initializes all of the function passes scheduled in the function pass
5321 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5322 @see llvm::FunctionPassManager::doInitialization */
5324
5325/** Executes all of the function passes scheduled in the function pass manager
5326 on the provided function. Returns 1 if any of the passes modified the
5327 function, false otherwise.
5328 @see llvm::FunctionPassManager::run(Function&) */
5330 LLVMValueRef F);
5331
5332/** Finalizes all of the function passes scheduled in the function pass
5333 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5334 @see llvm::FunctionPassManager::doFinalization */
5336
5337/** Frees the memory of a pass pipeline. For function pipelines, does not free
5338 the module provider.
5339 @see llvm::PassManagerBase::~PassManagerBase. */
5341
5342/**
5343 * @}
5344 */
5345
5346/**
5347 * @defgroup LLVMCCoreThreading Threading
5348 *
5349 * Handle the structures needed to make LLVM safe for multithreading.
5350 *
5351 * @{
5352 */
5353
5354/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5355 time define LLVM_ENABLE_THREADS. This function always returns
5356 LLVMIsMultithreaded(). */
5358
5359/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5360 time define LLVM_ENABLE_THREADS. */
5362
5363/** Check whether LLVM is executing in thread-safe mode or not.
5364 @see llvm::llvm_is_multithreaded */
5366
5367/**
5368 * @}
5369 */
5370
5371/**
5372 * @defgroup LLVMCCoreDataLayout Data Layout
5373 *
5374 * @{
5375 */
5376
5378
5379typedef struct LLVMOpaqueTargetData *LLVMTargetDataRef;
5380
5381/**
5382 * Obtain the data layout for a module.
5383 *
5384 * @see Module::getDataLayout()
5385 */
5387
5388/**
5389 * Set the data layout for a module.
5390 *
5391 * @see Module::setDataLayout()
5392 */
5394
5395/** Creates target data from a target layout string.
5396 See the constructor llvm::DataLayout::DataLayout. */
5398
5399/** Deallocates a TargetData.
5400 See the destructor llvm::DataLayout::~DataLayout. */
5402
5403/** Converts target data to a target layout string. The string must be disposed
5404 with LLVMDisposeMessage.
5405 See the constructor llvm::DataLayout::DataLayout. */
5407
5408/** Returns the byte order of a target, either LLVMBigEndian or
5409 LLVMLittleEndian.
5410 See the method llvm::DataLayout::isLittleEndian. */
5412
5413/** Returns the pointer size in bytes for a target.
5414 See the method llvm::DataLayout::getPointerSize. */
5416
5417/** Returns the pointer size in bytes for a target for a specified
5418 address space.
5419 See the method llvm::DataLayout::getPointerSize. */
5420LLVM_C_ABI unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS);
5421
5422/** Returns the integer type that is the same size as a pointer on a target.
5423 See the method llvm::DataLayout::getIntPtrType. */
5426 "Use of the global context is deprecated, use "
5427 "LLVMIntPtrTypeInContext instead");
5428
5429/** Returns the integer type that is the same size as a pointer on a target.
5430 This version allows the address space to be specified.
5431 See the method llvm::DataLayout::getIntPtrType. */
5434 "Use of the global context is deprecated, use LLVMIntPtrTypeForASInContext "
5435 "instead");
5436
5437/** Returns the integer type that is the same size as a pointer on a target.
5438 See the method llvm::DataLayout::getIntPtrType. */
5441
5442/** Returns the integer type that is the same size as a pointer on a target.
5443 This version allows the address space to be specified.
5444 See the method llvm::DataLayout::getIntPtrType. */
5447 unsigned AS);
5448
5449/** Computes the size of a type in bits for a target.
5450 See the method llvm::DataLayout::getTypeSizeInBits. */
5452 LLVMTypeRef Ty);
5453
5454/** Computes the storage size of a type in bytes for a target.
5455 See the method llvm::DataLayout::getTypeStoreSize. */
5457 LLVMTypeRef Ty);
5458
5459/** Computes the ABI size of a type in bytes for a target.
5460 See the method llvm::DataLayout::getTypeAllocSize. */
5461LLVM_C_ABI unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD,
5462 LLVMTypeRef Ty);
5463
5464/** Computes the ABI alignment of a type in bytes for a target.
5465 See the method llvm::DataLayout::getTypeABISize. */
5467 LLVMTypeRef Ty);
5468
5469/** Computes the call frame alignment of a type in bytes for a target.
5470 See the method llvm::DataLayout::getTypeABISize. */
5472 LLVMTypeRef Ty);
5473
5474/** Computes the preferred alignment of a type in bytes for a target.
5475 See the method llvm::DataLayout::getTypeABISize. */
5477 LLVMTypeRef Ty);
5478
5479/** Computes the preferred alignment of a global variable in bytes for a target.
5480 See the method llvm::DataLayout::getPreferredAlignment. */
5482 LLVMValueRef GlobalVar);
5483
5484/** Computes the structure element that contains the byte offset for a target.
5485 See the method llvm::StructLayout::getElementContainingOffset. */
5487 LLVMTypeRef StructTy,
5488 unsigned long long Offset);
5489
5490/** Computes the byte offset of the indexed struct element for a target.
5491 See the method llvm::StructLayout::getElementContainingOffset. */
5493 LLVMTypeRef StructTy,
5494 unsigned Element);
5495
5496/**
5497 * @}
5498 */
5499
5500/**
5501 * @}
5502 */
5503
5504/**
5505 * @}
5506 */
5507
5509
5510#endif /* LLVM_C_CORE_H */
aarch64 promote const
unsigned uint64_t
MachineBasicBlock MachineBasicBlock::iterator DebugLoc DL
static GCRegistry::Add< ShadowStackGC > C("shadow-stack", "Very portable GC for uncooperative code generators")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
DXIL Finalize Linkage
#define LLVM_ATTRIBUTE_C_DEPRECATED(decl, message)
Definition Deprecated.h:34
#define LLVM_C_EXTERN_C_BEGIN
Definition ExternC.h:35
#define LLVM_C_EXTERN_C_END
Definition ExternC.h:36
#define op(i)
Hexagon Common GEP
LLVMTypeRef LLVMFP128Type(void)
Definition Core.cpp:792
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx)
Definition Core.cpp:1714
LLVMTypeRef LLVMInt64Type(void)
Definition Core.cpp:736
LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Definition Core.cpp:1761
LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef FnRef, const char *Name)
Definition Core.cpp:2982
LLVMTypeRef LLVMVoidType(void)
Definition Core.cpp:995
LLVMValueRef LLVMMDString(const char *Str, unsigned SLen)
Definition Core.cpp:1341
LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty)
Definition Core.cpp:1850
LLVMTypeRef LLVMBFloatType(void)
Definition Core.cpp:780
LLVMTypeRef LLVMInt32Type(void)
Definition Core.cpp:733
LLVMTypeRef LLVMHalfType(void)
Definition Core.cpp:777
LLVMTypeRef LLVMIntType(unsigned NumBits)
Definition Core.cpp:742
LLVMTypeRef LLVMX86AMXType(void)
Definition Core.cpp:798
LLVMTypeRef LLVMIntPtrType(LLVMTargetDataRef TD)
Definition Core.cpp:4833
LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Definition Core.cpp:837
LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID)
Definition Core.cpp:295
LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty)
Definition Core.cpp:1844
LLVMTypeRef LLVMX86FP80Type(void)
Definition Core.cpp:789
LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef BBRef, const char *Name)
Definition Core.cpp:2993
LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3933
LLVMTypeRef LLVMPPCFP128Type(void)
Definition Core.cpp:795
LLVMTypeRef LLVMFloatType(void)
Definition Core.cpp:783
LLVMTypeRef LLVMLabelType(void)
Definition Core.cpp:998
LLVMValueRef LLVMConstString(const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Definition Core.cpp:1704
unsigned LLVMGetMDKindID(const char *Name, unsigned SLen)
Definition Core.cpp:152
LLVMTypeRef LLVMIntPtrTypeForAS(LLVMTargetDataRef TD, unsigned AS)
Definition Core.cpp:4837
LLVMTypeRef LLVMInt8Type(void)
Definition Core.cpp:727
LLVMTypeRef LLVMDoubleType(void)
Definition Core.cpp:786
LLVMTypeRef LLVMInt1Type(void)
Definition Core.cpp:724
LLVMBuilderRef LLVMCreateBuilder(void)
Definition Core.cpp:3443
LLVMTypeRef LLVMInt128Type(void)
Definition Core.cpp:739
LLVMValueRef LLVMIsABranchInst(LLVMValueRef Val)
Definition Core.cpp:1187
LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1864
LLVMTypeRef LLVMInt16Type(void)
Definition Core.cpp:730
LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count)
Definition Core.cpp:1372
LLVMContextRef LLVMGetGlobalContext()
Definition Core.cpp:108
#define F(x, y, z)
Definition MD5.cpp:54
static constexpr StringLiteral Filename
if(auto Err=PB.parsePassPipeline(MPM, Passes)) return wrap(std MPM run * Mod
const SmallVectorImpl< MachineOperand > & Cond
static cl::opt< RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode > Mode("regalloc-enable-advisor", cl::Hidden, cl::init(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default), cl::desc("Enable regalloc advisor mode"), cl::values(clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Default, "default", "Default"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Release, "release", "precompiled"), clEnumValN(RegAllocEvictionAdvisorAnalysisLegacy::AdvisorMode::Development, "development", "for training")))
unify loop Fixup each natural loop to have a single exit block
#define LLVM_C_ABI
LLVM_C_ABI is the export/visibility macro used to mark symbols declared in llvm-c as exported when bu...
Definition Visibility.h:40
Value * RHS
Value * LHS
LLVM_C_ABI LLVMTypeRef LLVMGetTypeByName2(LLVMContextRef C, const char *Name)
Obtain a Type from a context by its registered name.
Definition Core.cpp:893
LLVM_C_ABI LLVMBool LLVMIsEnumAttribute(LLVMAttributeRef A)
Check for the different types of attributes.
Definition Core.cpp:249
LLVM_C_ABI LLVMTypeRef LLVMGetTypeAttributeValue(LLVMAttributeRef A)
Get the type attribute's value.
Definition Core.cpp:193
LLVM_C_ABI void LLVMContextSetDiagnosticHandler(LLVMContextRef C, LLVMDiagnosticHandler Handler, void *DiagnosticContext)
Set the diagnostic handler for this context.
Definition Core.cpp:110
LLVM_C_ABI LLVMAttributeRef LLVMCreateDenormalFPEnvAttribute(LLVMContextRef C, LLVMDenormalModeKind DefaultModeOutput, LLVMDenormalModeKind DefaultModeInput, LLVMDenormalModeKind FloatModeOutput, LLVMDenormalModeKind FloatModeInput)
Create a DenormalFPEnv attribute.
Definition Core.cpp:212
LLVM_C_ABI const char * LLVMGetStringAttributeValue(LLVMAttributeRef A, unsigned *Length)
Get the string attribute's value.
Definition Core.cpp:242
LLVM_C_ABI uint64_t LLVMGetEnumAttributeValue(LLVMAttributeRef A)
Get the enum attribute's value.
Definition Core.cpp:179
LLVMDenormalModeKind
Represent different denormal handling kinds for use with LLVMCreateDenormalFPEnvAttribute.
Definition Core.h:752
LLVM_C_ABI LLVMBool LLVMIsStringAttribute(LLVMAttributeRef A)
Definition Core.cpp:254
LLVM_C_ABI LLVMAttributeRef LLVMCreateConstantRangeAttribute(LLVMContextRef C, unsigned KindID, unsigned NumBits, const uint64_t LowerWords[], const uint64_t UpperWords[])
Create a ConstantRange attribute.
Definition Core.cpp:198
LLVM_C_ABI unsigned LLVMGetEnumAttributeKindForName(const char *Name, size_t SLen)
Return an unique id given the name of a enum attribute, or 0 if no attribute by that name exists.
Definition Core.cpp:160
LLVM_C_ABI LLVMDiagnosticHandler LLVMContextGetDiagnosticHandler(LLVMContextRef C)
Get the diagnostic handler of this context.
Definition Core.cpp:119
LLVM_C_ABI void LLVMContextSetYieldCallback(LLVMContextRef C, LLVMYieldCallback Callback, void *OpaqueHandle)
Set the yield callback function for this context.
Definition Core.cpp:128
LLVM_C_ABI char * LLVMGetDiagInfoDescription(LLVMDiagnosticInfoRef DI)
Return a string representation of the DiagnosticInfo.
Definition Core.cpp:262
LLVM_C_ABI LLVMAttributeRef LLVMCreateStringAttribute(LLVMContextRef C, const char *K, unsigned KLength, const char *V, unsigned VLength)
Create a string attribute.
Definition Core.cpp:228
LLVM_C_ABI unsigned LLVMGetSyncScopeID(LLVMContextRef C, const char *Name, size_t SLen)
Maps a synchronization scope name to a ID unique within this context.
Definition Core.cpp:156
LLVM_C_ABI void LLVMContextSetDiscardValueNames(LLVMContextRef C, LLVMBool Discard)
Set whether the given context discards all value names.
Definition Core.cpp:139
LLVM_C_ABI unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name, unsigned SLen)
Definition Core.cpp:147
LLVM_C_ABI unsigned LLVMGetEnumAttributeKind(LLVMAttributeRef A)
Get the unique id corresponding to the enum attribute passed as argument.
Definition Core.cpp:175
LLVM_C_ABI void * LLVMContextGetDiagnosticContext(LLVMContextRef C)
Get the diagnostic context of this context.
Definition Core.cpp:124
LLVM_C_ABI LLVMAttributeRef LLVMCreateTypeAttribute(LLVMContextRef C, unsigned KindID, LLVMTypeRef type_ref)
Create a type attribute.
Definition Core.cpp:186
LLVM_C_ABI unsigned LLVMGetLastEnumAttributeKind(void)
Definition Core.cpp:164
LLVM_C_ABI LLVMBool LLVMContextShouldDiscardValueNames(LLVMContextRef C)
Retrieve whether the given context is set to discard all value names.
Definition Core.cpp:135
LLVM_C_ABI LLVMBool LLVMIsTypeAttribute(LLVMAttributeRef A)
Definition Core.cpp:258
LLVM_C_ABI void LLVMContextDispose(LLVMContextRef C)
Destroy a context instance.
Definition Core.cpp:143
void(* LLVMYieldCallback)(LLVMContextRef, void *)
Definition Core.h:593
LLVM_C_ABI LLVMAttributeRef LLVMCreateEnumAttribute(LLVMContextRef C, unsigned KindID, uint64_t Val)
Create an enum attribute.
Definition Core.cpp:168
LLVM_C_ABI const char * LLVMGetStringAttributeKind(LLVMAttributeRef A, unsigned *Length)
Get the string attribute's kind.
Definition Core.cpp:235
LLVM_C_ABI LLVMContextRef LLVMContextCreate(void)
Create a new context.
Definition Core.cpp:104
void(* LLVMDiagnosticHandler)(LLVMDiagnosticInfoRef, void *)
Definition Core.h:592
LLVM_C_ABI LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI)
Return an enum LLVMDiagnosticSeverity.
Definition Core.cpp:272
@ LLVMDenormalModeKindPreserveSign
Definition Core.h:754
@ LLVMDenormalModeKindDynamic
Definition Core.h:756
@ LLVMDenormalModeKindPositiveZero
Definition Core.h:755
@ LLVMDenormalModeKindIEEE
Definition Core.h:753
LLVM_C_ABI LLVMTargetDataRef LLVMGetModuleDataLayout(LLVMModuleRef M)
Obtain the data layout for a module.
Definition Core.cpp:4802
LLVM_C_ABI LLVMTargetDataRef LLVMCreateTargetData(const char *StringRep)
Creates target data from a target layout string.
Definition Core.cpp:4810
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the preferred alignment of a type in bytes for a target.
Definition Core.cpp:4871
LLVM_C_ABI unsigned LLVMCallFrameAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the call frame alignment of a type in bytes for a target.
Definition Core.cpp:4867
LLVM_C_ABI unsigned long long LLVMOffsetOfElement(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned Element)
Computes the byte offset of the indexed struct element for a target.
Definition Core.cpp:4888
LLVM_C_ABI void LLVMDisposeTargetData(LLVMTargetDataRef TD)
Deallocates a TargetData.
Definition Core.cpp:4814
LLVM_C_ABI enum LLVMByteOrdering LLVMByteOrder(LLVMTargetDataRef TD)
Returns the byte order of a target, either LLVMBigEndian or LLVMLittleEndian.
Definition Core.cpp:4821
LLVM_C_ABI unsigned LLVMPreferredAlignmentOfGlobal(LLVMTargetDataRef TD, LLVMValueRef GlobalVar)
Computes the preferred alignment of a global variable in bytes for a target.
Definition Core.cpp:4875
LLVM_C_ABI unsigned long long LLVMStoreSizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the storage size of a type in bytes for a target.
Definition Core.cpp:4855
LLVMByteOrdering
Definition Core.h:5377
LLVM_C_ABI unsigned long long LLVMABISizeOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI size of a type in bytes for a target.
Definition Core.cpp:4859
LLVM_C_ABI unsigned LLVMPointerSizeForAS(LLVMTargetDataRef TD, unsigned AS)
Returns the pointer size in bytes for a target for a specified address space.
Definition Core.cpp:4829
LLVM_C_ABI unsigned LLVMABIAlignmentOfType(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the ABI alignment of a type in bytes for a target.
Definition Core.cpp:4863
LLVM_C_ABI unsigned LLVMElementAtOffset(LLVMTargetDataRef TD, LLVMTypeRef StructTy, unsigned long long Offset)
Computes the structure element that contains the byte offset for a target.
Definition Core.cpp:4882
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeInContext(LLVMContextRef C, LLVMTargetDataRef TD)
Returns the integer type that is the same size as a pointer on a target.
Definition Core.cpp:4842
LLVM_C_ABI char * LLVMCopyStringRepOfTargetData(LLVMTargetDataRef TD)
Converts target data to a target layout string.
Definition Core.cpp:4816
LLVM_C_ABI unsigned LLVMPointerSize(LLVMTargetDataRef TD)
Returns the pointer size in bytes for a target.
Definition Core.cpp:4825
LLVM_C_ABI LLVMTypeRef LLVMIntPtrTypeForASInContext(LLVMContextRef C, LLVMTargetDataRef TD, unsigned AS)
Returns the integer type that is the same size as a pointer on a target.
Definition Core.cpp:4846
LLVM_C_ABI void LLVMSetModuleDataLayout(LLVMModuleRef M, LLVMTargetDataRef DL)
Set the data layout for a module.
Definition Core.cpp:4806
LLVM_C_ABI unsigned long long LLVMSizeOfTypeInBits(LLVMTargetDataRef TD, LLVMTypeRef Ty)
Computes the size of a type in bits for a target.
Definition Core.cpp:4851
struct LLVMOpaqueTargetData * LLVMTargetDataRef
Definition Core.h:5379
@ LLVMBigEndian
Definition Core.h:5377
@ LLVMLittleEndian
Definition Core.h:5377
LLVM_C_ABI LLVMValueRef LLVMBuildAggregateRet(LLVMBuilderRef, LLVMValueRef *RetVals, unsigned N)
Definition Core.cpp:3563
LLVM_C_ABI LLVMValueRef LLVMBuildMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3827
LLVM_C_ABI LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef)
Definition Core.cpp:3555
LLVM_C_ABI LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3807
LLVM_C_ABI LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3837
LLVM_C_ABI LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4269
LLVM_C_ABI LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4397
LLVM_C_ABI LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4540
LLVM_C_ABI LLVMValueRef LLVMBuildGEPWithNoWrapFlags(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a GetElementPtr instruction.
Definition Core.cpp:4227
LLVM_C_ABI LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3787
LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak)
Definition Core.cpp:4273
LLVM_C_ABI LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3907
LLVM_C_ABI LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4369
LLVM_C_ABI LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3852
LLVM_C_ABI LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4212
LLVM_C_ABI LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3812
LLVM_C_ABI void LLVMPositionBuilderBeforeInstrAndDbgRecords(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr and any attached debug records.
Definition Core.cpp:3472
LLVM_C_ABI LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4545
LLVM_C_ABI void LLVMDisposeBuilder(LLVMBuilderRef Builder)
Definition Core.cpp:3500
LLVM_C_ABI void LLVMClearInsertionPosition(LLVMBuilderRef Builder)
Definition Core.cpp:3487
LLVM_C_ABI LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)
Definition Core.cpp:3629
LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint)
Sets the disjoint flag for the instruction.
Definition Core.cpp:4010
LLVM_C_ABI LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst)
Definition Core.cpp:4623
LLVM_C_ABI LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn)
Definition Core.cpp:3659
LLVM_C_ABI void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp)
Definition Core.cpp:4308
LLVM_C_ABI LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3867
LLVM_C_ABI LLVMValueRef LLVMBuildInvokeWithOperandBundles(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
Definition Core.cpp:3615
LLVM_C_ABI LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3912
LLVM_C_ABI LLVMValueRef LLVMBuildBitExtract(LLVMBuilderRef, LLVMTypeRef Type, LLVMValueRef Src, LLVMValueRef Offset, const char *Name)
Definition Core.cpp:4533
LLVM_C_ABI LLVMBool LLVMGetExact(LLVMValueRef DivOrShrInst)
Definition Core.cpp:3969
LLVM_C_ABI LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4374
LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst)
Get the number of elements in the mask of a ShuffleVector instruction.
Definition Core.cpp:4605
LLVM_C_ABI void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr)
Definition Core.cpp:3491
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3680
LLVM_C_ABI LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4334
LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers)
Obtain the basic blocks acting as handlers for a catchswitch instruction.
Definition Core.cpp:3727
LLVM_C_ABI LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4314
LLVM_C_ABI LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned i)
Definition Core.cpp:3744
LLVM_C_ABI LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3902
LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch)
Definition Core.cpp:3723
LLVM_C_ABI LLVMValueRef LLVMBuildCallBr(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests, unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
Definition Core.cpp:3587
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder)
Definition Core.cpp:3483
LLVM_C_ABI LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3857
LLVM_C_ABI LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4385
LLVM_C_ABI LLVMValueRef LLVMBuildCall2(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:4454
LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW)
Definition Core.cpp:3964
LLVM_C_ABI LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder)
Get location information used by debugging information.
Definition Core.cpp:3506
LLVM_C_ABI LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3847
LLVM_C_ABI LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)
Definition Core.cpp:4477
LLVM_C_ABI void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records.
Definition Core.cpp:3467
LLVM_C_ABI LLVMBool LLVMCanValueUseFastMathFlags(LLVMValueRef Inst)
Check if a given value can potentially have fast math flags.
Definition Core.cpp:4000
LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i, LLVMValueRef value)
Definition Core.cpp:3748
LLVM_C_ABI LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)
Definition Core.cpp:3572
LLVM_C_ABI LLVMBool LLVMGetNUW(LLVMValueRef ArithInst)
Definition Core.cpp:3949
LLVM_C_ABI LLVMOpcode LLVMGetCastOpcode(LLVMValueRef Src, LLVMBool SrcIsSigned, LLVMTypeRef DestTy, LLVMBool DestIsSigned)
Definition Core.cpp:4426
LLVM_C_ABI void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)
Definition Core.cpp:3495
LLVM_C_ABI LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3877
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3648
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Deprecated: This cast is always signed.
Definition Core.cpp:4415
LLVM_C_ABI LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder)
Deprecated: Returning the NULL location will crash.
Definition Core.cpp:3523
LLVM_C_ABI LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4489
LLVM_C_ABI LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3887
LLVM_C_ABI LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C)
Definition Core.cpp:3439
LLVM_C_ABI LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3674
LLVM_C_ABI LLVMValueRef LLVMBuildMemMove(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size)
Creates and inserts a memmove between the specified pointers.
Definition Core.cpp:4054
LLVM_C_ABI LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst)
Definition Core.cpp:4277
LLVM_C_ABI LLVMValueRef LLVMBuildStructGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, unsigned Idx, const char *Name)
Definition Core.cpp:4237
LLVM_C_ABI int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt)
Get the mask value at position Elt in the mask of a ShuffleVector instruction.
Definition Core.cpp:4611
LLVM_C_ABI void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)
Definition Core.cpp:3690
LLVM_C_ABI LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest)
Definition Core.cpp:3568
LLVM_C_ABI LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4495
LLVM_C_ABI void LLVMPositionBuilderBeforeDbgRecords(LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Inst)
Set the builder position before Instr and any attached debug records, or if Instr is null set the pos...
Definition Core.cpp:3460
LLVM_C_ABI void LLVMSetFastMathFlags(LLVMValueRef FPMathInst, LLVMFastMathFlags FMF)
Sets the flags for which fast-math-style optimizations are allowed for this value.
Definition Core.cpp:3995
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, LLVMBool IsSigned, const char *Name)
Definition Core.cpp:4408
LLVM_C_ABI LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3817
LLVM_C_ABI LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3802
LLVM_C_ABI LLVMValueRef LLVMBuildCatchPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3641
LLVM_C_ABI LLVMValueRef LLVMBuildCallWithOperandBundles(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
Definition Core.cpp:4463
LLVM_C_ABI LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad)
Definition Core.cpp:3711
LLVM_C_ABI LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4379
LLVM_C_ABI LLVMBool LLVMGetVolatile(LLVMValueRef Inst)
Definition Core.cpp:4254
LLVM_C_ABI LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4421
LLVM_C_ABI LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4359
LLVM_C_ABI LLVMValueRef LLVMBuildPtrDiff2(LLVMBuilderRef, LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4550
LLVM_C_ABI LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4391
LLVM_C_ABI LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4068
LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx)
Definition Core.cpp:3703
LLVM_C_ABI unsigned LLVMGetAtomicSyncScopeID(LLVMValueRef AtomicInst)
Returns the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4642
LLVM_C_ABI LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4484
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchgSyncScope(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, unsigned SSID)
Definition Core.cpp:4594
LLVM_C_ABI LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3917
LLVM_C_ABI LLVMBool LLVMIsAtomic(LLVMValueRef Inst)
Returns whether an instruction is an atomic instruction, e.g., atomicrmw, cmpxchg,...
Definition Core.cpp:4619
LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)
Definition Core.cpp:4258
LLVM_C_ABI void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread)
Definition Core.cpp:4632
LLVM_C_ABI LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3882
LLVM_C_ABI LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3872
LLVM_C_ABI LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4364
LLVM_C_ABI LLVMBool LLVMGetNSW(LLVMValueRef ArithInst)
Definition Core.cpp:3959
LLVM_C_ABI LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3832
LLVM_C_ABI LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal)
Definition Core.cpp:4073
LLVM_C_ABI LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3924
LLVM_C_ABI LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3822
LLVM_C_ABI LLVMValueRef LLVMBuildCatchSwitch(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMBasicBlockRef UnwindBB, unsigned NumHandlers, const char *Name)
Definition Core.cpp:3663
LLVM_C_ABI LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef PointerVal, const char *Name)
Definition Core.cpp:4077
LLVM_C_ABI LLVMValueRef LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4219
LLVM_C_ABI LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4027
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread)
Definition Core.cpp:4581
LLVM_C_ABI LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)
Definition Core.cpp:3582
LLVM_C_ABI LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef)
Definition Core.cpp:3686
LLVM_C_ABI LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4344
LLVM_C_ABI LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4324
LLVM_C_ABI LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4329
LLVM_C_ABI void LLVMSetInstDebugLocation(LLVMBuilderRef Builder, LLVMValueRef Inst)
Attempts to set the debug location for the given instruction using the current debug location for the...
Definition Core.cpp:3529
LLVM_C_ABI void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc)
Set location information used by debugging information.
Definition Core.cpp:3510
LLVM_C_ABI LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4063
LLVM_C_ABI void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L)
Deprecated: Passing the NULL location will crash.
Definition Core.cpp:3517
LLVM_C_ABI LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4450
LLVM_C_ABI void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)
Definition Core.cpp:3695
LLVM_C_ABI LLVMBool LLVMGetNNeg(LLVMValueRef NonNegInst)
Gets if the instruction has the non-negative flag set.
Definition Core.cpp:3979
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMWSyncScope(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, unsigned SSID)
Definition Core.cpp:4570
LLVM_C_ABI LLVMValueRef LLVMBuildRet(LLVMBuilderRef, LLVMValueRef V)
Definition Core.cpp:3559
LLVM_C_ABI LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder)
Get the dafult floating-point math metadata for a given builder.
Definition Core.cpp:3549
LLVM_C_ABI LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef, LLVMValueRef AggVal, unsigned Index, const char *Name)
Definition Core.cpp:4509
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str, const char *Name)
Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
Definition Core.cpp:4249
LLVM_C_ABI LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3792
LLVM_C_ABI void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block)
Definition Core.cpp:3478
LLVM_C_ABI LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3842
LLVM_C_ABI LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3892
LLVM_C_ABI LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst)
Definition Core.cpp:4304
LLVM_C_ABI LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3941
LLVM_C_ABI LLVMValueRef LLVMBuildMemSet(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Val, LLVMValueRef Len, unsigned Align)
Creates and inserts a memset to the specified pointer and the specified value.
Definition Core.cpp:4038
LLVM_C_ABI void LLVMSetAtomicSyncScopeID(LLVMValueRef AtomicInst, unsigned SSID)
Sets the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4648
LLVM_C_ABI LLVMContextRef LLVMGetBuilderContext(LLVMBuilderRef Builder)
Obtain the context to which this builder is associated.
Definition Core.cpp:3545
LLVM_C_ABI LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4017
LLVM_C_ABI LLVMValueRef LLVMBuildFreeze(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4521
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str, const char *Name)
Definition Core.cpp:4244
LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW)
Definition Core.cpp:3954
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4654
LLVM_C_ABI LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4441
LLVM_C_ABI LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4403
LLVM_C_ABI LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3862
LLVM_C_ABI LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)
Definition Core.cpp:4502
LLVM_C_ABI LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4354
LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val)
Definition Core.cpp:3715
LLVM_C_ABI LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4434
LLVM_C_ABI void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4672
LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
Definition Core.cpp:3707
LLVM_C_ABI LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering ordering, LLVMBool singleThread, const char *Name)
Definition Core.cpp:4196
LLVM_C_ABI void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch)
Set the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3737
LLVM_C_ABI LLVMValueRef LLVMBuildFenceSyncScope(LLVMBuilderRef B, LLVMAtomicOrdering ordering, unsigned SSID, const char *Name)
Definition Core.cpp:4205
LLVM_C_ABI LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4339
LLVM_C_ABI void LLVMPositionBuilder(LLVMBuilderRef Builder, LLVMBasicBlockRef Block, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records, or if Instr is null set t...
Definition Core.cpp:3454
LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad)
Definition Core.cpp:3699
LLVM_C_ABI int LLVMGetUndefMaskElem(void)
Definition Core.cpp:4617
LLVM_C_ABI void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4659
LLVM_C_ABI LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad)
Get the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3733
LLVM_C_ABI LLVMFastMathFlags LLVMGetFastMathFlags(LLVMValueRef FPMathInst)
Get the flags for which fast-math-style optimizations are allowed for this value.
Definition Core.cpp:3989
LLVM_C_ABI LLVMBool LLVMGetIsDisjoint(LLVMValueRef Inst)
Gets whether the instruction has the disjoint flag set.
Definition Core.cpp:4005
LLVM_C_ABI LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)
Definition Core.cpp:3577
LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg)
Sets the non-negative flag for the instruction.
Definition Core.cpp:3984
LLVM_C_ABI LLVMValueRef LLVMBuildMemCpy(LLVMBuilderRef B, LLVMValueRef Dst, unsigned DstAlign, LLVMValueRef Src, unsigned SrcAlign, LLVMValueRef Size)
Creates and inserts a memcpy between the specified pointers.
Definition Core.cpp:4045
LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest)
Definition Core.cpp:3719
LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact)
Definition Core.cpp:3974
LLVM_C_ABI LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3928
LLVM_C_ABI LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3897
LLVM_C_ABI LLVMValueRef LLVMBuildInvoke2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)
Definition Core.cpp:3606
LLVM_C_ABI LLVMValueRef LLVMBuildBitInsert(LLVMBuilderRef, LLVMValueRef Base, LLVMValueRef Val, LLVMValueRef Offset, const char *Name)
Definition Core.cpp:4526
LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4291
LLVM_C_ABI LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4349
LLVM_C_ABI LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)
Definition Core.cpp:4082
LLVM_C_ABI void LLVMAddMetadataToInst(LLVMBuilderRef Builder, LLVMValueRef Inst)
Same as LLVMSetInstDebugLocation.
Definition Core.cpp:3533
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4667
LLVM_C_ABI LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3797
LLVM_C_ABI LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)
Definition Core.cpp:4514
LLVM_C_ABI void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder, LLVMMetadataRef FPMathTag)
Set the default floating-point math metadata for the given builder.
Definition Core.cpp:3537
LLVM_C_ABI LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4319
LLVM_C_ABI LLVMValueRef LLVMBuildNot(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3945
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)
Definition Core.cpp:4559
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)
Definition Core.cpp:4719
LLVM_C_ABI size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4744
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, size_t InputDataLength, const char *BufferName)
Definition Core.cpp:4730
LLVM_C_ABI const char * LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4740
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4694
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4708
LLVM_C_ABI void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4748
LLVM_C_ABI LLVMModuleProviderRef LLVMCreateModuleProviderForExistingModule(LLVMModuleRef M)
Changes the type of M so it can be passed to FunctionPassManagers and the JIT.
Definition Core.cpp:4683
LLVM_C_ABI void LLVMDisposeModuleProvider(LLVMModuleProviderRef M)
Destroys the module M.
Definition Core.cpp:4687
LLVM_C_ABI char * LLVMPrintModuleToString(LLVMModuleRef M)
Return a string representation of the module.
Definition Core.cpp:491
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetOrInsertNamedMetadata(LLVMModuleRef M, const char *Name, size_t NameLen)
Retrieve a NamedMDNode with the given name, creating a new node if no such node exists.
Definition Core.cpp:1443
LLVM_C_ABI LLVMValueRef LLVMGetNamedFunctionWithLength(LLVMModuleRef M, const char *Name, size_t Length)
Obtain a Function value from a Module by its name.
Definition Core.cpp:2513
LLVM_C_ABI unsigned LLVMGetDebugLocColumn(LLVMValueRef Val)
Return the column number of the debug location for this value, which must be an llvm::Instruction.
Definition Core.cpp:1571
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetNamedMetadata(LLVMModuleRef M, const char *Name, size_t NameLen)
Retrieve a NamedMDNode with the given name, returning NULL if no such node exists.
Definition Core.cpp:1438
LLVM_C_ABI LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID, LLVMContextRef C)
Create a new, empty module in a specific context.
Definition Core.cpp:299
LLVM_C_ABI const char * LLVMGetTarget(LLVMModuleRef M)
Obtain the target triple for a module.
Definition Core.cpp:342
LLVM_C_ABI LLVMBool LLVMGetInlineAsmCanUnwind(LLVMValueRef InlineAsmVal)
Get if the inline asm snippet may unwind the stack.
Definition Core.cpp:600
LLVM_C_ABI const char * LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len)
Get inline assembly for a module.
Definition Core.cpp:514
LLVM_C_ABI LLVMBool LLVMGetInlineAsmNeedsAlignedStack(LLVMValueRef InlineAsmVal)
Get if the inline asm snippet needs an aligned stack.
Definition Core.cpp:595
LLVM_C_ABI LLVMBool LLVMGetInlineAsmHasSideEffects(LLVMValueRef InlineAsmVal)
Get if the inline asm snippet has side effects.
Definition Core.cpp:590
LLVM_C_ABI unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name)
Obtain the number of operands for named metadata in a module.
Definition Core.cpp:1474
LLVM_C_ABI void LLVMDumpModule(LLVMModuleRef M)
Dump a representation of a module to stderr.
Definition Core.cpp:463
LLVM_C_ABI void LLVMSetTarget(LLVMModuleRef M, const char *Triple)
Set the target triple for a module.
Definition Core.cpp:346
LLVM_C_ABI LLVMTypeRef LLVMGetInlineAsmFunctionType(LLVMValueRef InlineAsmVal)
Get the function type of the inline assembly snippet.
Definition Core.cpp:585
LLVM_C_ABI LLVMBool LLVMIsNewDbgInfoFormat(LLVMModuleRef M)
Soon to be deprecated.
Definition Core.cpp:453
LLVM_C_ABI LLVMContextRef LLVMGetModuleContext(LLVMModuleRef M)
Obtain the context to which this module is associated.
Definition Core.cpp:606
LLVM_C_ABI LLVMInlineAsmDialect LLVMGetInlineAsmDialect(LLVMValueRef InlineAsmVal)
Get the dialect used by the inline asm snippet.
Definition Core.cpp:569
LLVM_C_ABI LLVMModuleRef LLVMCloneModule(LLVMModuleRef M)
Return an exact copy of the specified module.
LLVM_C_ABI void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm)
Deprecated: Use LLVMSetModuleInlineAsm2 instead.
Definition Core.cpp:506
LLVM_C_ABI LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn)
Advance a Function iterator to the next Function.
Definition Core.cpp:2534
LLVM_C_ABI const char * LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len)
Obtain the identifier of a module.
Definition Core.cpp:308
LLVM_C_ABI const char * LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len)
Obtain the module's original source file name.
Definition Core.cpp:318
LLVM_C_ABI const char * LLVMGetDataLayoutStr(LLVMModuleRef M)
Obtain the data layout for a module.
Definition Core.cpp:329
LLVM_C_ABI LLVMModuleFlagBehavior LLVMModuleFlagEntriesGetFlagBehavior(LLVMModuleFlagEntry *Entries, unsigned Index)
Returns the flag behavior for a module flag entry at a specific index.
Definition Core.cpp:419
LLVM_C_ABI void LLVMSetIsNewDbgInfoFormat(LLVMModuleRef M, LLVMBool UseNewFormat)
Soon to be deprecated.
Definition Core.cpp:455
LLVM_C_ABI LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name)
Deprecated: Use LLVMGetTypeByName2 instead.
Definition Core.cpp:889
LLVM_C_ABI void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident, size_t Len)
Set the identifier of a module to a string Ident with length Len.
Definition Core.cpp:314
LLVM_C_ABI const char * LLVMGetInlineAsmAsmString(LLVMValueRef InlineAsmVal, size_t *Len)
Get the template string used for an inline assembly snippet.
Definition Core.cpp:551
LLVM_C_ABI LLVMValueRef LLVMGetInlineAsm(LLVMTypeRef Ty, const char *AsmString, size_t AsmStringSize, const char *Constraints, size_t ConstraintsSize, LLVMBool HasSideEffects, LLVMBool IsAlignStack, LLVMInlineAsmDialect Dialect, LLVMBool CanThrow)
Create the specified uniqued inline asm string.
Definition Core.cpp:531
LLVM_C_ABI LLVMValueRef LLVMGetOrInsertFunction(LLVMModuleRef M, const char *Name, size_t NameLen, LLVMTypeRef FunctionTy)
Obtain or insert a function into a module.
Definition Core.cpp:2501
LLVM_C_ABI const char * LLVMGetInlineAsmConstraintString(LLVMValueRef InlineAsmVal, size_t *Len)
Get the raw constraint string for an inline assembly snippet.
Definition Core.cpp:560
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetNextNamedMetadata(LLVMNamedMDNodeRef NamedMDNode)
Advance a NamedMDNode iterator to the next NamedMDNode.
Definition Core.cpp:1422
LLVM_C_ABI void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, LLVMValueRef *Dest)
Obtain the named metadata operands for a module.
Definition Core.cpp:1481
LLVM_C_ABI LLVMMetadataRef LLVMGetModuleFlag(LLVMModuleRef M, const char *Key, size_t KeyLen)
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
Definition Core.cpp:441
LLVM_C_ABI LLVMValueRef LLVMAddFunction(LLVMModuleRef M, const char *Name, LLVMTypeRef FunctionTy)
Add a function to a module under a specified name.
Definition Core.cpp:2495
LLVM_C_ABI LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn)
Decrement a Function iterator to the previous Function.
Definition Core.cpp:2542
LLVM_C_ABI const char * LLVMGetDebugLocDirectory(LLVMValueRef Val, unsigned *Length)
Return the directory of the debug location for this value, which must be an llvm::Instruction,...
Definition Core.cpp:1501
LLVM_C_ABI void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, LLVMValueRef Val)
Add an operand to named metadata.
Definition Core.cpp:1491
LLVM_C_ABI unsigned LLVMGetDebugLocLine(LLVMValueRef Val)
Return the line number of the debug location for this value, which must be an llvm::Instruction,...
Definition Core.cpp:1549
LLVM_C_ABI LLVMMetadataRef LLVMModuleFlagEntriesGetMetadata(LLVMModuleFlagEntry *Entries, unsigned Index)
Returns the metadata for a module flag entry at a specific index.
Definition Core.cpp:434
LLVM_C_ABI void LLVMAddModuleFlag(LLVMModuleRef M, LLVMModuleFlagBehavior Behavior, const char *Key, size_t KeyLen, LLVMMetadataRef Val)
Add a module-level flag to the module-level flags metadata if it doesn't already exist.
Definition Core.cpp:446
LLVM_C_ABI LLVMValueRef LLVMGetLastFunction(LLVMModuleRef M)
Obtain an iterator to the last Function in a Module.
Definition Core.cpp:2526
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NamedMDNode)
Decrement a NamedMDNode iterator to the previous NamedMDNode.
Definition Core.cpp:1430
LLVM_C_ABI const char * LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NamedMD, size_t *NameLen)
Retrieve the name of a NamedMDNode.
Definition Core.cpp:1448
LLVM_C_ABI LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name)
Obtain a Function value from a Module by its name.
Definition Core.cpp:2509
LLVM_C_ABI const char * LLVMGetDebugLocFilename(LLVMValueRef Val, unsigned *Length)
Return the filename of the debug location for this value, which must be an llvm::Instruction,...
Definition Core.cpp:1525
LLVM_C_ABI void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm, size_t Len)
Append inline assembly to a module.
Definition Core.cpp:510
LLVM_C_ABI void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr)
Set the data layout for a module.
Definition Core.cpp:337
LLVM_C_ABI void LLVMDisposeModuleFlagsMetadata(LLVMModuleFlagEntry *Entries)
Destroys module flags metadata entries.
Definition Core.cpp:414
LLVM_C_ABI void LLVMDisposeModule(LLVMModuleRef M)
Destroy a module instance.
Definition Core.cpp:304
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetLastNamedMetadata(LLVMModuleRef M)
Obtain an iterator to the last NamedMDNode in a Module.
Definition Core.cpp:1414
LLVM_C_ABI void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm, size_t Len)
Set inline assembly for a module.
Definition Core.cpp:502
LLVM_C_ABI LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M)
Obtain an iterator to the first Function in a Module.
Definition Core.cpp:2518
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata(LLVMModuleRef M)
Obtain an iterator to the first NamedMDNode in a Module.
Definition Core.cpp:1406
LLVM_C_ABI const char * LLVMModuleFlagEntriesGetKey(LLVMModuleFlagEntry *Entries, unsigned Index, size_t *Len)
Returns the key for a module flag entry at a specific index.
Definition Core.cpp:426
LLVM_C_ABI void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name, size_t Len)
Set the original source file name of a module to a string Name with length Len.
Definition Core.cpp:324
LLVM_C_ABI LLVMBool LLVMPrintModuleToFile(LLVMModuleRef M, const char *Filename, char **ErrorMessage)
Print a representation of a module to a file.
Definition Core.cpp:468
LLVM_C_ABI const char * LLVMGetDataLayout(LLVMModuleRef M)
Definition Core.cpp:333
LLVM_C_ABI LLVMModuleFlagEntry * LLVMCopyModuleFlagsMetadata(LLVMModuleRef M, size_t *Len)
Returns the module flags as an array of flag-key-value triples.
Definition Core.cpp:397
LLVM_C_ABI LLVMOperandBundleRef LLVMCreateOperandBundle(const char *Tag, size_t TagLen, LLVMValueRef *Args, unsigned NumArgs)
Create a new operand bundle.
Definition Core.cpp:2860
LLVM_C_ABI unsigned LLVMGetNumOperandBundleArgs(LLVMOperandBundleRef Bundle)
Obtain the number of operands for an operand bundle.
Definition Core.cpp:2877
LLVM_C_ABI const char * LLVMGetOperandBundleTag(LLVMOperandBundleRef Bundle, size_t *Len)
Obtain the tag of an operand bundle as a string.
Definition Core.cpp:2871
LLVM_C_ABI void LLVMDisposeOperandBundle(LLVMOperandBundleRef Bundle)
Destroy an operand bundle.
Definition Core.cpp:2867
LLVM_C_ABI LLVMValueRef LLVMGetOperandBundleArgAtIndex(LLVMOperandBundleRef Bundle, unsigned Index)
Obtain the operand for an operand bundle at the given index.
Definition Core.cpp:2881
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP)
Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
Definition Core.cpp:4762
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M)
Constructs a new function-by-function pass pipeline over the module provider.
Definition Core.cpp:4758
LLVM_C_ABI LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM)
Finalizes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4779
LLVM_C_ABI void LLVMDisposePassManager(LLVMPassManagerRef PM)
Frees the memory of a pass pipeline.
Definition Core.cpp:4783
LLVM_C_ABI LLVMBool LLVMRunFunctionPassManager(LLVMPassManagerRef FPM, LLVMValueRef F)
Executes all of the function passes scheduled in the function pass manager on the provided function.
Definition Core.cpp:4775
LLVM_C_ABI LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM)
Initializes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4771
LLVM_C_ABI LLVMBool LLVMRunPassManager(LLVMPassManagerRef PM, LLVMModuleRef M)
Initializes, executes on the provided module, and finalizes all of the passes scheduled in the pass m...
Definition Core.cpp:4767
LLVM_C_ABI LLVMPassManagerRef LLVMCreatePassManager(void)
Constructs a new whole-module pass pipeline.
Definition Core.cpp:4754
LLVM_C_ABI void LLVMStopMultithreaded(void)
Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THR...
Definition Core.cpp:4793
LLVM_C_ABI LLVMBool LLVMStartMultithreaded(void)
Deprecated: Multi-threading can only be enabled/disabled with the compile time define LLVM_ENABLE_THR...
Definition Core.cpp:4789
LLVM_C_ABI LLVMBool LLVMIsMultithreaded(void)
Check whether LLVM is executing in thread-safe mode or not.
Definition Core.cpp:4796
LLVM_C_ABI LLVMTypeRef LLVMByteTypeInContext(LLVMContextRef C, unsigned NumBits)
Obtain a byte type from a context with specified bit width.
Definition Core.cpp:692
LLVM_C_ABI unsigned LLVMGetByteTypeWidth(LLVMTypeRef ByteTy)
Definition Core.cpp:696
LLVM_C_ABI LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C)
Obtain a 16-bit floating point type from a context.
Definition Core.cpp:752
LLVM_C_ABI LLVMTypeRef LLVMBFloatTypeInContext(LLVMContextRef C)
Obtain a 16-bit brain floating point type from a context.
Definition Core.cpp:755
LLVM_C_ABI LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C)
Obtain a 128-bit floating point type (two 64-bits) from a context.
Definition Core.cpp:770
LLVM_C_ABI LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C)
Obtain a 64-bit floating point type from a context.
Definition Core.cpp:761
LLVM_C_ABI LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C)
Obtain a 32-bit floating point type from a context.
Definition Core.cpp:758
LLVM_C_ABI LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C)
Obtain a 128-bit floating point type (112-bit mantissa) from a context.
Definition Core.cpp:767
LLVM_C_ABI LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C)
Obtain a 80-bit floating point type (X87) from a context.
Definition Core.cpp:764
LLVM_C_ABI LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy)
Obtain the Type this function Type returns.
Definition Core.cpp:815
LLVM_C_ABI LLVMTypeRef LLVMFunctionType(LLVMTypeRef ReturnType, LLVMTypeRef *ParamTypes, unsigned ParamCount, LLVMBool IsVarArg)
Obtain a function type consisting of a specified signature.
Definition Core.cpp:804
LLVM_C_ABI LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy)
Returns whether a function type is variadic.
Definition Core.cpp:811
LLVM_C_ABI unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy)
Obtain the number of parameters this function accepts.
Definition Core.cpp:819
LLVM_C_ABI void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)
Obtain the types of a function's parameters.
Definition Core.cpp:823
LLVM_C_ABI LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C)
Obtain an integer type from a context with specified bit width.
Definition Core.cpp:702
LLVM_C_ABI LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C)
Definition Core.cpp:705
LLVM_C_ABI LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C)
Definition Core.cpp:711
LLVM_C_ABI LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits)
Definition Core.cpp:720
LLVM_C_ABI LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C)
Definition Core.cpp:714
LLVM_C_ABI LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C)
Definition Core.cpp:708
LLVM_C_ABI unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy)
Definition Core.cpp:746
LLVM_C_ABI LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C)
Definition Core.cpp:717
LLVM_C_ABI unsigned LLVMGetTargetExtTypeNumTypeParams(LLVMTypeRef TargetExtTy)
Obtain the number of type parameters for this target extension type.
Definition Core.cpp:1018
LLVM_C_ABI LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C)
Create a X86 AMX type in a context.
Definition Core.cpp:773
LLVM_C_ABI const char * LLVMGetTargetExtTypeName(LLVMTypeRef TargetExtTy)
Obtain the name for this target extension type.
Definition Core.cpp:1013
LLVM_C_ABI LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C)
Create a void type in a context.
Definition Core.cpp:982
LLVM_C_ABI LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C)
Create a token type in a context.
Definition Core.cpp:988
LLVM_C_ABI unsigned LLVMGetTargetExtTypeNumIntParams(LLVMTypeRef TargetExtTy)
Obtain the number of int parameters for this target extension type.
Definition Core.cpp:1029
LLVM_C_ABI LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C)
Create a label type in a context.
Definition Core.cpp:985
LLVM_C_ABI LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C)
Create a metadata type in a context.
Definition Core.cpp:991
LLVM_C_ABI LLVMTypeRef LLVMGetTargetExtTypeTypeParam(LLVMTypeRef TargetExtTy, unsigned Idx)
Get the type parameter at the given index for the target extension type.
Definition Core.cpp:1023
LLVM_C_ABI LLVMTypeRef LLVMTargetExtTypeInContext(LLVMContextRef C, const char *Name, LLVMTypeRef *TypeParams, unsigned TypeParamCount, unsigned *IntParams, unsigned IntParamCount)
Create a target extension type in LLVM context.
Definition Core.cpp:1002
LLVM_C_ABI unsigned LLVMGetTargetExtTypeIntParam(LLVMTypeRef TargetExtTy, unsigned Idx)
Get the int parameter at the given index for the target extension type.
Definition Core.cpp:1034
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthAddrDiscriminator(LLVMValueRef PtrAuth)
Get the address discriminator value for the associated ConstantPtrAuth constant.
Definition Core.cpp:972
LLVM_C_ABI LLVMBool LLVMPointerTypeIsOpaque(LLVMTypeRef Ty)
Determine whether a pointer is opaque.
Definition Core.cpp:920
LLVM_C_ABI LLVMTypeRef LLVMPointerTypeInContext(LLVMContextRef C, unsigned AddressSpace)
Create an opaque pointer type in a context.
Definition Core.cpp:978
LLVM_C_ABI LLVMTypeRef LLVMVectorType(LLVMTypeRef ElementType, unsigned ElementCount)
Create a vector type that contains a defined type and has a specific number of elements.
Definition Core.cpp:924
LLVM_C_ABI LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty)
Obtain the element type of an array or vector type.
Definition Core.cpp:933
LLVM_C_ABI LLVMTypeRef LLVMScalableVectorType(LLVMTypeRef ElementType, unsigned ElementCount)
Create a vector type that contains a defined type and has a scalable number of elements.
Definition Core.cpp:928
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthDiscriminator(LLVMValueRef PtrAuth)
Get the discriminator value for the associated ConstantPtrAuth constant.
Definition Core.cpp:968
LLVM_C_ABI uint64_t LLVMGetArrayLength2(LLVMTypeRef ArrayTy)
Obtain the length of an array type.
Definition Core.cpp:948
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthKey(LLVMValueRef PtrAuth)
Get the key value for the associated ConstantPtrAuth constant.
Definition Core.cpp:964
LLVM_C_ABI unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy)
Obtain the length of an array type.
Definition Core.cpp:944
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthPointer(LLVMValueRef PtrAuth)
Get the pointer value for the associated ConstantPtrAuth constant.
Definition Core.cpp:960
LLVM_C_ABI unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy)
Obtain the address space of a pointer type.
Definition Core.cpp:952
LLVM_C_ABI LLVMTypeRef LLVMArrayType2(LLVMTypeRef ElementType, uint64_t ElementCount)
Create a fixed size array type that refers to a specific type.
Definition Core.cpp:911
LLVM_C_ABI unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy)
Obtain the (possibly scalable) number of elements in a vector type.
Definition Core.cpp:956
LLVM_C_ABI LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount)
Create a fixed size array type that refers to a specific type.
Definition Core.cpp:907
LLVM_C_ABI void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr)
Returns type's subtypes.
Definition Core.cpp:899
LLVM_C_ABI LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace)
Create a pointer type that points to a defined type.
Definition Core.cpp:915
LLVM_C_ABI unsigned LLVMGetNumContainedTypes(LLVMTypeRef Tp)
Return the number of types in the derived type.
Definition Core.cpp:940
LLVM_C_ABI LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Create a new structure type in a context.
Definition Core.cpp:831
LLVM_C_ABI void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest)
Get the elements within a structure.
Definition Core.cpp:866
LLVM_C_ABI LLVMTypeRef LLVMStructGetTypeAtIndex(LLVMTypeRef StructTy, unsigned i)
Get the type of the element at a given index in the structure.
Definition Core.cpp:872
LLVM_C_ABI LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy)
Determine whether a structure is packed.
Definition Core.cpp:877
LLVM_C_ABI LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name)
Create an empty structure in a context having a specified name.
Definition Core.cpp:843
LLVM_C_ABI void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Set the contents of a structure type.
Definition Core.cpp:856
LLVM_C_ABI LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy)
Determine whether a structure is opaque.
Definition Core.cpp:881
LLVM_C_ABI unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy)
Get the number of elements defined inside the structure.
Definition Core.cpp:862
LLVM_C_ABI const char * LLVMGetStructName(LLVMTypeRef Ty)
Obtain the name of a structure.
Definition Core.cpp:848
LLVM_C_ABI LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy)
Determine whether a structure is literal.
Definition Core.cpp:885
LLVM_C_ABI void LLVMDumpType(LLVMTypeRef Val)
Dump a representation of a type to stderr.
Definition Core.cpp:674
LLVM_C_ABI LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty)
Whether the type has a known size.
Definition Core.cpp:665
LLVM_C_ABI LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty)
Obtain the context to which this type instance is associated.
Definition Core.cpp:670
LLVM_C_ABI char * LLVMPrintTypeToString(LLVMTypeRef Val)
Return a string representation of the type.
Definition Core.cpp:678
LLVM_C_ABI LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)
Obtain the enumerated type of a Type instance.
Definition Core.cpp:615
LLVMTailCallKind
Tail call kind for LLVMSetTailCallKind and LLVMGetTailCallKind.
Definition Core.h:504
LLVMLinkage
Definition Core.h:181
LLVMOpcode
External users depend on the following values being stable.
Definition Core.h:62
LLVMRealPredicate
Definition Core.h:315
LLVMTypeKind
Definition Core.h:156
LLVMDLLStorageClass
Definition Core.h:216
LLVMValueKind
Definition Core.h:266
unsigned LLVMAttributeIndex
Definition Core.h:495
LLVMCallConv
Definition Core.h:222
LLVMDbgRecordKind
Definition Core.h:548
LLVMIntPredicate
Definition Core.h:302
unsigned LLVMFastMathFlags
Flags to indicate what fast-math-style optimizations are allowed on operations.
Definition Core.h:532
LLVMUnnamedAddr
Definition Core.h:210
LLVMModuleFlagBehavior
Definition Core.h:432
LLVMDiagnosticSeverity
Definition Core.h:420
LLVMVisibility
Definition Core.h:204
LLVMAtomicRMWBinOp
Definition Core.h:369
LLVMThreadLocalMode
Definition Core.h:334
unsigned LLVMGEPNoWrapFlags
Flags that constrain the allowed wrap semantics of a getelementptr instruction.
Definition Core.h:546
LLVMAtomicOrdering
Definition Core.h:342
LLVMInlineAsmDialect
Definition Core.h:427
@ LLVMTailCallKindNoTail
Definition Core.h:508
@ LLVMTailCallKindNone
Definition Core.h:505
@ LLVMTailCallKindTail
Definition Core.h:506
@ LLVMTailCallKindMustTail
Definition Core.h:507
@ LLVMDLLImportLinkage
Obsolete.
Definition Core.h:195
@ LLVMInternalLinkage
Rename collisions when linking (static functions)
Definition Core.h:192
@ LLVMLinkOnceAnyLinkage
Keep one copy of function when linking (inline)
Definition Core.h:184
@ LLVMExternalLinkage
Externally visible function.
Definition Core.h:182
@ LLVMExternalWeakLinkage
ExternalWeak linkage description.
Definition Core.h:197
@ LLVMLinkOnceODRLinkage
Same, but only replaced by something equivalent.
Definition Core.h:185
@ LLVMPrivateLinkage
Like Internal, but omit from symbol table.
Definition Core.h:194
@ LLVMDLLExportLinkage
Obsolete.
Definition Core.h:196
@ LLVMLinkerPrivateLinkage
Like Private, but linker removes.
Definition Core.h:200
@ LLVMWeakODRLinkage
Same, but only replaced by something equivalent.
Definition Core.h:189
@ LLVMGhostLinkage
Obsolete.
Definition Core.h:198
@ LLVMWeakAnyLinkage
Keep one copy of function when linking (weak)
Definition Core.h:188
@ LLVMAppendingLinkage
Special purpose, only applies to global arrays.
Definition Core.h:191
@ LLVMCommonLinkage
Tentative definitions.
Definition Core.h:199
@ LLVMLinkOnceODRAutoHideLinkage
Obsolete.
Definition Core.h:187
@ LLVMLinkerPrivateWeakLinkage
Like LinkerPrivate, but is weak.
Definition Core.h:201
@ LLVMAvailableExternallyLinkage
Definition Core.h:183
@ LLVMAttributeReturnIndex
Definition Core.h:488
@ LLVMAttributeFunctionIndex
Definition Core.h:492
@ LLVMFastMathAllowReassoc
Definition Core.h:512
@ LLVMFastMathNoSignedZeros
Definition Core.h:515
@ LLVMFastMathApproxFunc
Definition Core.h:518
@ LLVMFastMathNoInfs
Definition Core.h:514
@ LLVMFastMathNoNaNs
Definition Core.h:513
@ LLVMFastMathAll
Definition Core.h:520
@ LLVMFastMathNone
Definition Core.h:519
@ LLVMFastMathAllowContract
Definition Core.h:517
@ LLVMFastMathAllowReciprocal
Definition Core.h:516
@ LLVMSelect
Definition Core.h:127
@ LLVMSRem
Definition Core.h:89
@ LLVMOr
Definition Core.h:97
@ LLVMCallBr
Definition Core.h:73
@ LLVMUIToFP
Definition Core.h:112
@ LLVMIntToPtr
Definition Core.h:118
@ LLVMAtomicRMW
Definition Core.h:143
@ LLVMFMul
Definition Core.h:84
@ LLVMLoad
Definition Core.h:102
@ LLVMUncondBr
Definition Core.h:66
@ LLVMIndirectBr
Definition Core.h:69
@ LLVMUnreachable
Definition Core.h:72
@ LLVMCatchSwitch
Definition Core.h:152
@ LLVMCall
Definition Core.h:126
@ LLVMGetElementPtr
Definition Core.h:104
@ LLVMBitExtract
Definition Core.h:138
@ LLVMAdd
Definition Core.h:79
@ LLVMSub
Definition Core.h:81
@ LLVMExtractValue
Definition Core.h:134
@ LLVMUserOp1
Definition Core.h:128
@ LLVMICmp
Definition Core.h:123
@ LLVMFDiv
Definition Core.h:87
@ LLVMLShr
Definition Core.h:94
@ LLVMFPTrunc
Definition Core.h:114
@ LLVMResume
Definition Core.h:146
@ LLVMAddrSpaceCast
Definition Core.h:120
@ LLVMFNeg
Definition Core.h:76
@ LLVMRet
Definition Core.h:64
@ LLVMFPToSI
Definition Core.h:111
@ LLVMCatchRet
Definition Core.h:149
@ LLVMFreeze
Definition Core.h:136
@ LLVMFRem
Definition Core.h:90
@ LLVMSIToFP
Definition Core.h:113
@ LLVMPHI
Definition Core.h:125
@ LLVMPtrToAddr
Definition Core.h:117
@ LLVMCondBr
Definition Core.h:67
@ LLVMUDiv
Definition Core.h:85
@ LLVMInvoke
Definition Core.h:70
@ LLVMCleanupPad
Definition Core.h:151
@ LLVMSDiv
Definition Core.h:86
@ LLVMFence
Definition Core.h:141
@ LLVMAnd
Definition Core.h:96
@ LLVMFPToUI
Definition Core.h:110
@ LLVMLandingPad
Definition Core.h:147
@ LLVMURem
Definition Core.h:88
@ LLVMCleanupRet
Definition Core.h:148
@ LLVMTrunc
Definition Core.h:107
@ LLVMVAArg
Definition Core.h:130
@ LLVMShuffleVector
Definition Core.h:133
@ LLVMSExt
Definition Core.h:109
@ LLVMBitCast
Definition Core.h:119
@ LLVMUserOp2
Definition Core.h:129
@ LLVMMul
Definition Core.h:83
@ LLVMCatchPad
Definition Core.h:150
@ LLVMAShr
Definition Core.h:95
@ LLVMPtrToInt
Definition Core.h:116
@ LLVMInsertElement
Definition Core.h:132
@ LLVMFAdd
Definition Core.h:80
@ LLVMFSub
Definition Core.h:82
@ LLVMBitInsert
Definition Core.h:137
@ LLVMStore
Definition Core.h:103
@ LLVMZExt
Definition Core.h:108
@ LLVMShl
Definition Core.h:93
@ LLVMInsertValue
Definition Core.h:135
@ LLVMExtractElement
Definition Core.h:131
@ LLVMXor
Definition Core.h:98
@ LLVMFCmp
Definition Core.h:124
@ LLVMFPExt
Definition Core.h:115
@ LLVMAlloca
Definition Core.h:101
@ LLVMAtomicCmpXchg
Definition Core.h:142
@ LLVMSwitch
Definition Core.h:68
@ LLVMGEPFlagInBounds
Definition Core.h:535
@ LLVMGEPFlagNUSW
Definition Core.h:536
@ LLVMGEPFlagNUW
Definition Core.h:537
@ LLVMRealUNE
True if unordered or not equal.
Definition Core.h:330
@ LLVMRealUGT
True if unordered or greater than.
Definition Core.h:326
@ LLVMRealULE
True if unordered, less than, or equal.
Definition Core.h:329
@ LLVMRealOLE
True if ordered and less than or equal.
Definition Core.h:321
@ LLVMRealOGE
True if ordered and greater than or equal.
Definition Core.h:319
@ LLVMRealULT
True if unordered or less than.
Definition Core.h:328
@ LLVMRealPredicateFalse
Always false (always folded)
Definition Core.h:316
@ LLVMRealPredicateTrue
Always true (always folded)
Definition Core.h:331
@ LLVMRealUNO
True if unordered: isnan(X) | isnan(Y)
Definition Core.h:324
@ LLVMRealOEQ
True if ordered and equal.
Definition Core.h:317
@ LLVMRealOLT
True if ordered and less than.
Definition Core.h:320
@ LLVMRealUEQ
True if unordered or equal.
Definition Core.h:325
@ LLVMRealORD
True if ordered (no nans)
Definition Core.h:323
@ LLVMRealOGT
True if ordered and greater than.
Definition Core.h:318
@ LLVMRealUGE
True if unordered, greater than, or equal.
Definition Core.h:327
@ LLVMRealONE
True if ordered and operands are unequal.
Definition Core.h:322
@ LLVMHalfTypeKind
16 bit floating point type
Definition Core.h:158
@ LLVMFP128TypeKind
128 bit floating point type (112-bit mantissa)
Definition Core.h:162
@ LLVMIntegerTypeKind
Arbitrary bit width integers.
Definition Core.h:165
@ LLVMPointerTypeKind
Pointers.
Definition Core.h:169
@ LLVMX86_FP80TypeKind
80 bit floating point type (X87)
Definition Core.h:161
@ LLVMX86_AMXTypeKind
X86 AMX.
Definition Core.h:176
@ LLVMMetadataTypeKind
Metadata.
Definition Core.h:171
@ LLVMByteTypeKind
Arbitrary bit width bytes.
Definition Core.h:178
@ LLVMScalableVectorTypeKind
Scalable SIMD vector type.
Definition Core.h:174
@ LLVMArrayTypeKind
Arrays.
Definition Core.h:168
@ LLVMBFloatTypeKind
16 bit brain floating point type
Definition Core.h:175
@ LLVMStructTypeKind
Structures.
Definition Core.h:167
@ LLVMLabelTypeKind
Labels.
Definition Core.h:164
@ LLVMDoubleTypeKind
64 bit floating point type
Definition Core.h:160
@ LLVMVoidTypeKind
type with no size
Definition Core.h:157
@ LLVMTokenTypeKind
Tokens.
Definition Core.h:173
@ LLVMFloatTypeKind
32 bit floating point type
Definition Core.h:159
@ LLVMFunctionTypeKind
Functions.
Definition Core.h:166
@ LLVMVectorTypeKind
Fixed width SIMD vector type.
Definition Core.h:170
@ LLVMPPC_FP128TypeKind
128 bit floating point type (two 64-bits)
Definition Core.h:163
@ LLVMTargetExtTypeKind
Target extension type.
Definition Core.h:177
@ LLVMDefaultStorageClass
Definition Core.h:217
@ LLVMDLLExportStorageClass
Function to be accessible from DLL.
Definition Core.h:219
@ LLVMDLLImportStorageClass
Function to be imported from DLL.
Definition Core.h:218
@ LLVMMemoryDefValueKind
Definition Core.h:270
@ LLVMConstantDataVectorValueKind
Definition Core.h:286
@ LLVMConstantIntValueKind
Definition Core.h:287
@ LLVMConstantDataArrayValueKind
Definition Core.h:285
@ LLVMUndefValueValueKind
Definition Core.h:283
@ LLVMFunctionValueKind
Definition Core.h:273
@ LLVMConstantVectorValueKind
Definition Core.h:281
@ LLVMMemoryPhiValueKind
Definition Core.h:271
@ LLVMConstantTokenNoneValueKind
Definition Core.h:291
@ LLVMArgumentValueKind
Definition Core.h:267
@ LLVMInlineAsmValueKind
Definition Core.h:294
@ LLVMConstantAggregateZeroValueKind
Definition Core.h:284
@ LLVMGlobalAliasValueKind
Definition Core.h:274
@ LLVMMetadataAsValueValueKind
Definition Core.h:293
@ LLVMConstantTargetNoneValueKind
Definition Core.h:298
@ LLVMConstantStructValueKind
Definition Core.h:280
@ LLVMInstructionValueKind
Definition Core.h:296
@ LLVMConstantArrayValueKind
Definition Core.h:279
@ LLVMMemoryUseValueKind
Definition Core.h:269
@ LLVMConstantPtrAuthValueKind
Definition Core.h:299
@ LLVMConstantPointerNullValueKind
Definition Core.h:290
@ LLVMBasicBlockValueKind
Definition Core.h:268
@ LLVMConstantByteValueKind
Definition Core.h:288
@ LLVMBlockAddressValueKind
Definition Core.h:277
@ LLVMConstantExprValueKind
Definition Core.h:278
@ LLVMPoisonValueValueKind
Definition Core.h:297
@ LLVMGlobalVariableValueKind
Definition Core.h:276
@ LLVMGlobalIFuncValueKind
Definition Core.h:275
@ LLVMConstantFPValueKind
Definition Core.h:289
@ LLVMCXXFASTTLSCallConv
Definition Core.h:232
@ LLVMX86INTRCallConv
Definition Core.h:250
@ LLVMAMDGPUCSCallConv
Definition Core.h:257
@ LLVMAMDGPUHSCallConv
Definition Core.h:260
@ LLVMSwiftCallConv
Definition Core.h:231
@ LLVMPTXDeviceCallConv
Definition Core.h:241
@ LLVMX86VectorCallCallConv
Definition Core.h:247
@ LLVMPreserveAllCallConv
Definition Core.h:230
@ LLVMAMDGPUGSCallConv
Definition Core.h:255
@ LLVMMSP430INTRCallConv
Definition Core.h:238
@ LLVMCCallConv
Definition Core.h:223
@ LLVMARMAPCSCallConv
Definition Core.h:235
@ LLVMAVRSIGNALCallConv
Definition Core.h:252
@ LLVMX86RegCallCallConv
Definition Core.h:259
@ LLVMAMDGPUVSCallConv
Definition Core.h:254
@ LLVMSPIRKERNELCallConv
Definition Core.h:243
@ LLVMGHCCallConv
Definition Core.h:226
@ LLVMX86ThisCallCallConv
Definition Core.h:239
@ LLVMPTXKernelCallConv
Definition Core.h:240
@ LLVMAnyRegCallConv
Definition Core.h:228
@ LLVMAVRINTRCallConv
Definition Core.h:251
@ LLVMAMDGPUPSCallConv
Definition Core.h:256
@ LLVMSPIRFUNCCallConv
Definition Core.h:242
@ LLVMPreserveMostCallConv
Definition Core.h:229
@ LLVMMSP430BUILTINCallConv
Definition Core.h:261
@ LLVMAMDGPUKERNELCallConv
Definition Core.h:258
@ LLVMX8664SysVCallConv
Definition Core.h:245
@ LLVMARMAAPCSCallConv
Definition Core.h:236
@ LLVMColdCallConv
Definition Core.h:225
@ LLVMAMDGPULSCallConv
Definition Core.h:262
@ LLVMX86FastcallCallConv
Definition Core.h:234
@ LLVMAMDGPUESCallConv
Definition Core.h:263
@ LLVMX86StdcallCallConv
Definition Core.h:233
@ LLVMFastCallConv
Definition Core.h:224
@ LLVMAVRBUILTINCallConv
Definition Core.h:253
@ LLVMHHVMCallConv
Definition Core.h:248
@ LLVMIntelOCLBICallConv
Definition Core.h:244
@ LLVMWin64CallConv
Definition Core.h:246
@ LLVMHiPECallConv
Definition Core.h:227
@ LLVMHHVMCCallConv
Definition Core.h:249
@ LLVMARMAAPCSVFPCallConv
Definition Core.h:237
@ LLVMDbgRecordValue
Definition Core.h:551
@ LLVMDbgRecordDeclare
Definition Core.h:550
@ LLVMDbgRecordLabel
Definition Core.h:549
@ LLVMDbgRecordAssign
Definition Core.h:552
@ LLVMIntSGT
signed greater than
Definition Core.h:309
@ LLVMIntULE
unsigned less or equal
Definition Core.h:308
@ LLVMIntEQ
equal
Definition Core.h:303
@ LLVMIntUGE
unsigned greater or equal
Definition Core.h:306
@ LLVMIntSGE
signed greater or equal
Definition Core.h:310
@ LLVMIntULT
unsigned less than
Definition Core.h:307
@ LLVMIntUGT
unsigned greater than
Definition Core.h:305
@ LLVMIntSLE
signed less or equal
Definition Core.h:312
@ LLVMIntSLT
signed less than
Definition Core.h:311
@ LLVMIntNE
not equal
Definition Core.h:304
@ LLVMGlobalUnnamedAddr
Address of the GV is globally insignificant.
Definition Core.h:213
@ LLVMLocalUnnamedAddr
Address of the GV is locally insignificant.
Definition Core.h:212
@ LLVMNoUnnamedAddr
Address of the GV is significant.
Definition Core.h:211
@ LLVMModuleFlagBehaviorRequire
Adds a requirement that another module flag be present and have a specified value after linking is pe...
Definition Core.h:458
@ LLVMModuleFlagBehaviorWarning
Emits a warning if two values disagree.
Definition Core.h:446
@ LLVMModuleFlagBehaviorOverride
Uses the specified value, regardless of the behavior or value of the other module.
Definition Core.h:466
@ LLVMModuleFlagBehaviorAppendUnique
Appends the two values, which are required to be metadata nodes.
Definition Core.h:480
@ LLVMModuleFlagBehaviorAppend
Appends the two values, which are required to be metadata nodes.
Definition Core.h:472
@ LLVMModuleFlagBehaviorError
Emits an error if two values disagree, otherwise the resulting value is that of the operands.
Definition Core.h:439
@ LLVMDSWarning
Definition Core.h:422
@ LLVMDSNote
Definition Core.h:424
@ LLVMDSError
Definition Core.h:421
@ LLVMDSRemark
Definition Core.h:423
@ LLVMProtectedVisibility
The GV is protected.
Definition Core.h:207
@ LLVMDefaultVisibility
The GV is visible.
Definition Core.h:205
@ LLVMHiddenVisibility
The GV is hidden.
Definition Core.h:206
@ LLVMAtomicRMWBinOpXor
Xor a value and return the old one.
Definition Core.h:376
@ LLVMAtomicRMWBinOpXchg
Set the new value and return the one old.
Definition Core.h:370
@ LLVMAtomicRMWBinOpSub
Subtract a value and return the old one.
Definition Core.h:372
@ LLVMAtomicRMWBinOpUMax
Sets the value if it's greater than the original using an unsigned comparison and return the old one.
Definition Core.h:383
@ LLVMAtomicRMWBinOpUSubSat
Subtracts the value, clamping to zero.
Definition Core.h:405
@ LLVMAtomicRMWBinOpAnd
And a value and return the old one.
Definition Core.h:373
@ LLVMAtomicRMWBinOpUDecWrap
Decrements the value, wrapping back to the input value when decremented below zero.
Definition Core.h:401
@ LLVMAtomicRMWBinOpFMax
Sets the value if it's greater than the original using an floating point comparison and return the ol...
Definition Core.h:393
@ LLVMAtomicRMWBinOpMin
Sets the value if it's Smaller than the original using a signed comparison and return the old one.
Definition Core.h:380
@ LLVMAtomicRMWBinOpOr
OR a value and return the old one.
Definition Core.h:375
@ LLVMAtomicRMWBinOpFMin
Sets the value if it's smaller than the original using an floating point comparison and return the ol...
Definition Core.h:396
@ LLVMAtomicRMWBinOpMax
Sets the value if it's greater than the original using a signed comparison and return the old one.
Definition Core.h:377
@ LLVMAtomicRMWBinOpFMaximum
Sets the value if it's greater than the original using an floating point comparison and return the ol...
Definition Core.h:406
@ LLVMAtomicRMWBinOpFMinimum
Sets the value if it's smaller than the original using an floating point comparison and return the ol...
Definition Core.h:409
@ LLVMAtomicRMWBinOpFMinimumNum
Sets the value if it's smaller than the original using an floating point comparison and return the ol...
Definition Core.h:415
@ LLVMAtomicRMWBinOpUIncWrap
Increments the value, wrapping back to zero when incremented above input value.
Definition Core.h:399
@ LLVMAtomicRMWBinOpFMaximumNum
Sets the value if it's greater than the original using an floating point comparison and return the ol...
Definition Core.h:412
@ LLVMAtomicRMWBinOpFAdd
Add a floating point value and return the old one.
Definition Core.h:389
@ LLVMAtomicRMWBinOpFSub
Subtract a floating point value and return the old one.
Definition Core.h:391
@ LLVMAtomicRMWBinOpAdd
Add a value and return the old one.
Definition Core.h:371
@ LLVMAtomicRMWBinOpUMin
Sets the value if it's greater than the original using an unsigned comparison and return the old one.
Definition Core.h:386
@ LLVMAtomicRMWBinOpNand
Not-And a value and return the old one.
Definition Core.h:374
@ LLVMAtomicRMWBinOpUSubCond
Subtracts the value only if no unsigned overflow.
Definition Core.h:403
@ LLVMGeneralDynamicTLSModel
Definition Core.h:336
@ LLVMLocalDynamicTLSModel
Definition Core.h:337
@ LLVMNotThreadLocal
Definition Core.h:335
@ LLVMInitialExecTLSModel
Definition Core.h:338
@ LLVMLocalExecTLSModel
Definition Core.h:339
@ LLVMAtomicOrderingAcquireRelease
provides both an Acquire and a Release barrier (for fences and operations which both read and write m...
Definition Core.h:355
@ LLVMAtomicOrderingRelease
Release is similar to Acquire, but with a barrier of the sort necessary to release a lock.
Definition Core.h:352
@ LLVMAtomicOrderingAcquire
Acquire provides a barrier of the sort necessary to acquire a lock to access other memory with normal...
Definition Core.h:349
@ LLVMAtomicOrderingMonotonic
guarantees that if you take all the operations affecting a specific address, a consistent ordering ex...
Definition Core.h:346
@ LLVMAtomicOrderingSequentiallyConsistent
provides Acquire semantics for loads and Release semantics for stores.
Definition Core.h:359
@ LLVMAtomicOrderingNotAtomic
A load or store which is not atomic.
Definition Core.h:343
@ LLVMAtomicOrderingUnordered
Lowest level of atomicity, guarantees somewhat sane results, lock free.
Definition Core.h:344
@ LLVMInlineAsmDialectATT
Definition Core.h:428
@ LLVMInlineAsmDialectIntel
Definition Core.h:429
LLVM_C_ABI LLVMValueRef LLVMGetLastInstruction(LLVMBasicBlockRef BB)
Obtain the last instruction in a basic block.
Definition Core.cpp:3028
LLVM_C_ABI void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to after another one.
Definition Core.cpp:3010
LLVM_C_ABI LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn)
Obtain the first basic block in a function.
Definition Core.cpp:2926
LLVM_C_ABI LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C, const char *Name)
Create a new basic block without inserting it into a function.
Definition Core.cpp:2958
LLVM_C_ABI LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB)
Go backwards in a basic block iterator.
Definition Core.cpp:2950
LLVM_C_ABI LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn)
Obtain the last basic block in a function.
Definition Core.cpp:2934
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB)
Obtain the terminator instruction for a basic block.
Definition Core.cpp:2908
LLVM_C_ABI const char * LLVMGetBasicBlockName(LLVMBasicBlockRef BB)
Obtain the string name of a basic block.
Definition Core.cpp:2900
LLVM_C_ABI void LLVMAppendExistingBasicBlock(LLVMValueRef Fn, LLVMBasicBlockRef BB)
Append the given basic block to the basic block list of the given function.
Definition Core.cpp:2971
LLVM_C_ABI void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB)
Remove a basic block from a function and delete it.
Definition Core.cpp:2998
LLVM_C_ABI LLVMBasicBlockRef LLVMInsertBasicBlockInContext(LLVMContextRef C, LLVMBasicBlockRef BB, const char *Name)
Insert a basic block in a function before another basic block.
Definition Core.cpp:2986
LLVM_C_ABI void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks)
Obtain all of the basic blocks in a function.
Definition Core.cpp:2916
LLVM_C_ABI void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to before another one.
Definition Core.cpp:3006
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB)
Obtain the function to which a basic block belongs.
Definition Core.cpp:2904
LLVM_C_ABI LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn)
Obtain the basic block that corresponds to the entry point of a function.
Definition Core.cpp:2922
LLVM_C_ABI LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB)
Obtain the first instruction in a basic block.
Definition Core.cpp:3020
LLVM_C_ABI void LLVMInsertExistingBasicBlockAfterInsertBlock(LLVMBuilderRef Builder, LLVMBasicBlockRef BB)
Insert the given basic block after the insertion point of the given builder.
Definition Core.cpp:2963
LLVM_C_ABI LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB)
Convert a basic block instance to a value type.
Definition Core.cpp:2888
LLVM_C_ABI LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val)
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
Definition Core.cpp:2896
LLVM_C_ABI void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB)
Remove a basic block from a function.
Definition Core.cpp:3002
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB)
Advance a basic block iterator.
Definition Core.cpp:2942
LLVM_C_ABI unsigned LLVMCountBasicBlocks(LLVMValueRef Fn)
Obtain the number of basic blocks in a function.
Definition Core.cpp:2912
LLVM_C_ABI LLVMBasicBlockRef LLVMAppendBasicBlockInContext(LLVMContextRef C, LLVMValueRef Fn, const char *Name)
Append a basic block to the end of a function.
Definition Core.cpp:2976
LLVM_C_ABI LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val)
Determine whether an LLVMValueRef is itself a basic block.
Definition Core.cpp:2892
LLVM_C_ABI LLVMValueRef LLVMConstantPtrAuth(LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc)
Create a ConstantPtrAuth constant with the given values.
Definition Core.cpp:1781
LLVM_C_ABI LLVMValueRef LLVMGetAggregateElement(LLVMValueRef C, unsigned Idx)
Get element of a constant aggregate (struct, array or vector) at the specified index.
Definition Core.cpp:1710
LLVM_C_ABI LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size)
Create a ConstantVector from values.
Definition Core.cpp:1776
LLVM_C_ABI LLVMValueRef LLVMConstStringInContext2(LLVMContextRef C, const char *Str, size_t Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential and initialize it with a string.
Definition Core.cpp:1695
LLVM_C_ABI LLVMValueRef LLVMConstDataArray(LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes)
Create a ConstantDataArray from raw values.
Definition Core.cpp:1746
LLVM_C_ABI LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
Create a ConstantArray from values.
Definition Core.cpp:1734
LLVM_C_ABI LLVMBool LLVMIsConstantString(LLVMValueRef c)
Returns true if the specified constant is an array of i8.
Definition Core.cpp:1718
LLVM_C_ABI LLVMValueRef LLVMConstStringInContext(LLVMContextRef C, const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Create a ConstantDataSequential and initialize it with a string.
Definition Core.cpp:1686
LLVM_C_ABI LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length)
Create a ConstantArray from values.
Definition Core.cpp:1740
LLVM_C_ABI const char * LLVMGetAsString(LLVMValueRef c, size_t *Length)
Get the given constant data sequential as a string.
Definition Core.cpp:1722
LLVM_C_ABI LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
Create a non-anonymous ConstantStruct from values.
Definition Core.cpp:1767
LLVM_C_ABI const char * LLVMGetRawDataValues(LLVMValueRef c, size_t *SizeInBytes)
Get the raw, underlying bytes of the given constant data sequential.
Definition Core.cpp:1728
LLVM_C_ABI LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Create an anonymous ConstantStruct with the specified values.
Definition Core.cpp:1753
LLVM_C_ABI LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1967
LLVM_C_ABI LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1873
LLVM_C_ABI LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1890
LLVM_C_ABI LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1973
LLVM_C_ABI LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1962
LLVM_C_ABI LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1901
LLVM_C_ABI LLVMValueRef LLVMConstGEPWithNoWrapFlags(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a constant GetElementPtr expression.
Definition Core.cpp:1933
LLVM_C_ABI LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal)
Definition Core.cpp:1840
LLVM_C_ABI LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1985
LLVM_C_ABI LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1878
LLVM_C_ABI LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1856
LLVM_C_ABI LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1979
LLVM_C_ABI LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1991
LLVM_C_ABI LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1907
LLVM_C_ABI LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1895
LLVM_C_ABI LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
Definition Core.cpp:1999
LLVM_C_ABI LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1947
LLVM_C_ABI LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1912
LLVM_C_ABI LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB)
Definition Core.cpp:2017
LLVM_C_ABI LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal)
Definition Core.cpp:1869
LLVM_C_ABI LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1884
LLVM_C_ABI LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1952
LLVM_C_ABI LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1957
LLVM_C_ABI LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1922
LLVM_C_ABI LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
Deprecated: Use LLVMGetInlineAsm instead.
Definition Core.cpp:2009
LLVM_C_ABI LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1860
LLVM_C_ABI LLVMValueRef LLVMGetBlockAddressFunction(LLVMValueRef BlockAddr)
Gets the function associated with a given BlockAddress constant value.
Definition Core.cpp:2021
LLVM_C_ABI LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock(LLVMValueRef BlockAddr)
Gets the basic block associated with a given BlockAddress constant value.
Definition Core.cpp:2025
LLVM_C_ABI LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global)
Definition Core.cpp:2163
LLVM_C_ABI LLVMTypeRef LLVMGlobalGetValueType(LLVMValueRef Global)
Returns the "value type" of a global value.
Definition Core.cpp:2198
LLVM_C_ABI unsigned LLVMGetAlignment(LLVMValueRef V)
Obtain the preferred alignment of the value.
Definition Core.cpp:2204
LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section)
Definition Core.cpp:2139
LLVM_C_ABI void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr)
Definition Core.cpp:2175
LLVM_C_ABI void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Sets a metadata attachment, erasing the existing metadata attachment if it already exists for the giv...
Definition Core.cpp:2279
LLVM_C_ABI void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage)
Definition Core.cpp:2068
LLVM_C_ABI void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr)
Deprecated: Use LLVMSetUnnamedAddress instead.
Definition Core.cpp:2192
LLVM_C_ABI LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global)
Definition Core.cpp:2031
LLVM_C_ABI unsigned LLVMValueMetadataEntriesGetKind(LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the kind of a value metadata entry at a specific index.
Definition Core.cpp:2260
LLVM_C_ABI void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class)
Definition Core.cpp:2158
LLVM_C_ABI LLVMVisibility LLVMGetVisibility(LLVMValueRef Global)
Definition Core.cpp:2143
LLVM_C_ABI LLVMValueMetadataEntry * LLVMGlobalCopyAllMetadata(LLVMValueRef Value, size_t *NumEntries)
Retrieves an array of metadata entries representing the metadata attached to this value.
Definition Core.cpp:2248
LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes)
Set the preferred alignment of the value.
Definition Core.cpp:2226
LLVM_C_ABI const char * LLVMGetSection(LLVMValueRef Global)
Definition Core.cpp:2133
LLVM_C_ABI void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz)
Definition Core.cpp:2148
LLVM_C_ABI LLVMLinkage LLVMGetLinkage(LLVMValueRef Global)
Definition Core.cpp:2039
LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind)
Erases a metadata attachment of the given kind if it exists.
Definition Core.cpp:2289
LLVM_C_ABI LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global)
Definition Core.cpp:2153
LLVM_C_ABI LLVMBool LLVMIsDeclaration(LLVMValueRef Global)
Definition Core.cpp:2035
LLVM_C_ABI void LLVMGlobalClearMetadata(LLVMValueRef Global)
Removes all metadata attachments from this value.
Definition Core.cpp:2293
LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Adds a metadata attachment.
Definition Core.cpp:2284
LLVM_C_ABI LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global)
Deprecated: Use LLVMGetUnnamedAddress instead.
Definition Core.cpp:2188
LLVM_C_ABI LLVMMetadataRef LLVMValueMetadataEntriesGetMetadata(LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the underlying metadata node of a value metadata entry at a specific index.
Definition Core.cpp:2268
LLVM_C_ABI void LLVMDisposeValueMetadataEntries(LLVMValueMetadataEntry *Entries)
Destroys value metadata entries.
Definition Core.cpp:2275
LLVM_C_ABI void LLVMGlobalAddDebugInfo(LLVMValueRef Global, LLVMMetadataRef GVE)
Add debuginfo metadata to this global.
Definition Core.cpp:2297
LLVM_C_ABI LLVMValueRef LLVMConstRealOfStringAndSize(LLVMTypeRef RealTy, const char *Text, unsigned SLen)
Obtain a constant for a floating point value parsed from a string.
LLVM_C_ABI LLVMValueRef LLVMConstIntOfStringAndSize(LLVMTypeRef IntTy, const char *Text, unsigned SLen, uint8_t Radix)
Obtain a constant value for an integer parsed from a string with specified length.
LLVM_C_ABI LLVMValueRef LLVMConstIntOfString(LLVMTypeRef IntTy, const char *Text, uint8_t Radix)
Obtain a constant value for an integer parsed from a string.
LLVM_C_ABI LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N, LLVMBool SignExtend)
Obtain a constant value for an integer type.
Definition Core.cpp:1581
LLVM_C_ABI LLVMValueRef LLVMConstFPFromBits(LLVMTypeRef Ty, const uint64_t N[])
Obtain a constant for a floating point value from array of 64 bit values.
Definition Core.cpp:1643
LLVM_C_ABI LLVMValueRef LLVMConstIntOfArbitraryPrecision(LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[])
Obtain a constant value for an integer of arbitrary precision.
Definition Core.cpp:1586
LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for an integer constant value.
Definition Core.cpp:1655
LLVM_C_ABI unsigned long long LLVMConstByteGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for a byte constant value.
Definition Core.cpp:1659
LLVM_C_ABI LLVMValueRef LLVMConstRealOfString(LLVMTypeRef RealTy, const char *Text)
Obtain a constant for a floating point value parsed from a string.
Definition Core.cpp:1634
LLVM_C_ABI LLVMValueRef LLVMConstByteOfArbitraryPrecision(LLVMTypeRef ByteTy, unsigned NumWords, const uint64_t Words[])
Obtain a constant value for a byte of arbitrary precision.
Definition Core.cpp:1610
LLVM_C_ABI double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo)
Obtain the double value for an floating point constant value.
Definition Core.cpp:1667
LLVM_C_ABI LLVMValueRef LLVMConstByte(LLVMTypeRef ByteTy, unsigned long long N)
Obtain a constant value for a byte type.
Definition Core.cpp:1606
LLVM_C_ABI LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N)
Obtain a constant value referring to a double floating point value.
Definition Core.cpp:1630
LLVM_C_ABI long long LLVMConstByteGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for a byte constant value.
Definition Core.cpp:1663
LLVM_C_ABI unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for an integer constant value.
Definition Core.cpp:1651
LLVM_C_ABI LLVMValueRef LLVMConstByteOfStringAndSize(LLVMTypeRef ByteTy, const char *Text, size_t SLen, uint8_t Radix)
Obtain a constant value for a byte parsed from a string with specified length.
LLVM_C_ABI LLVMValueRef LLVMGetPoison(LLVMTypeRef Ty)
Obtain a constant value referring to a poison value of a type.
Definition Core.cpp:1296
LLVM_C_ABI LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty)
Obtain a constant that is a constant pointer pointing to NULL for a specified type.
Definition Core.cpp:1318
LLVM_C_ABI LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty)
Obtain a constant value referring to an undefined value of a type.
Definition Core.cpp:1292
LLVM_C_ABI LLVMBool LLVMIsNull(LLVMValueRef Val)
Determine whether a value instance is null.
Definition Core.cpp:1304
LLVM_C_ABI LLVMValueRef LLVMConstNull(LLVMTypeRef Ty)
Obtain a constant value referring to the null instance of a type.
Definition Core.cpp:1284
LLVM_C_ABI LLVMValueRef LLVMConstAllOnes(LLVMTypeRef Ty)
Obtain a constant value referring to the instance of a type consisting of all ones.
Definition Core.cpp:1288
LLVM_C_ABI LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg)
Obtain the previous parameter to a function.
Definition Core.cpp:2781
LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align)
Set the alignment for a function parameter.
Definition Core.cpp:2788
LLVM_C_ABI unsigned LLVMCountParams(LLVMValueRef Fn)
Obtain the number of parameters in a function.
Definition Core.cpp:2736
LLVM_C_ABI void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params)
Obtain the parameters in a function.
Definition Core.cpp:2742
LLVM_C_ABI LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn)
Obtain the first parameter to a function.
Definition Core.cpp:2757
LLVM_C_ABI LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn)
Obtain the last parameter to a function.
Definition Core.cpp:2765
LLVM_C_ABI LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index)
Obtain the parameter at the specified index.
Definition Core.cpp:2748
LLVM_C_ABI LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg)
Obtain the next parameter to a function.
Definition Core.cpp:2773
LLVM_C_ABI LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst)
Obtain the function to which this argument belongs.
Definition Core.cpp:2753
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName2(LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *OverloadTypes, size_t OverloadCount, size_t *NameLength)
Copies the name of an overloaded intrinsic identified by a given list of overload types.
Definition Core.cpp:2612
LLVM_C_ABI void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Add an attribute to a function.
Definition Core.cpp:2686
LLVM_C_ABI LLVMValueRef LLVMGetPrefixData(LLVMValueRef Fn)
Gets the prefix data associated with a function.
Definition Core.cpp:2654
LLVM_C_ABI LLVMValueRef LLVMGetPrologueData(LLVMValueRef Fn)
Gets the prologue data associated with a function.
Definition Core.cpp:2670
LLVM_C_ABI unsigned LLVMGetIntrinsicID(LLVMValueRef Fn)
Obtain the ID number from a function instance.
Definition Core.cpp:2567
LLVM_C_ABI LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn)
Obtain the personality function attached to the function.
Definition Core.cpp:2558
LLVM_C_ABI unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx)
Definition Core.cpp:2691
LLVM_C_ABI LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn)
Check whether the given function has a personality function.
Definition Core.cpp:2554
LLVM_C_ABI void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2722
LLVM_C_ABI void LLVMSetPrefixData(LLVMValueRef Fn, LLVMValueRef prefixData)
Sets the prefix data for the function.
Definition Core.cpp:2664
LLVM_C_ABI const char * LLVMGetGC(LLVMValueRef Fn)
Obtain the name of the garbage collector to use during code generation.
Definition Core.cpp:2641
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName(unsigned ID, LLVMTypeRef *OverloadTypes, size_t OverloadCount, size_t *NameLength)
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
Definition Core.cpp:2602
LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name)
Define the garbage collector to use during code generation.
Definition Core.cpp:2646
LLVM_C_ABI void LLVMSetPrologueData(LLVMValueRef Fn, LLVMValueRef prologueData)
Sets the prologue data for the function.
Definition Core.cpp:2680
LLVM_C_ABI void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn)
Set the personality function attached to the function.
Definition Core.cpp:2562
LLVM_C_ABI void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:2696
LLVM_C_ABI unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn)
Obtain the calling function of a function.
Definition Core.cpp:2632
LLVM_C_ABI LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID)
Obtain if the intrinsic identified by the given ID is overloaded.
Definition Core.cpp:2627
LLVM_C_ABI void LLVMDeleteFunction(LLVMValueRef Fn)
Remove a function from its containing module and deletes it.
Definition Core.cpp:2550
LLVM_C_ABI void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2717
LLVM_C_ABI LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2703
LLVM_C_ABI unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen)
Obtain the intrinsic ID number which matches the given function name.
Definition Core.cpp:2623
LLVM_C_ABI const char * LLVMIntrinsicGetName(unsigned ID, size_t *NameLength)
Retrieves the name of an intrinsic.
Definition Core.cpp:2587
LLVM_C_ABI LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *OverloadTypes, size_t OverloadCount)
Get or insert the declaration of an intrinsic.
Definition Core.cpp:2578
LLVM_C_ABI LLVMBool LLVMHasPrologueData(LLVMValueRef Fn)
Check if a given function has prologue data.
Definition Core.cpp:2675
LLVM_C_ABI LLVMBool LLVMHasPrefixData(LLVMValueRef Fn)
Check if a given function has prefix data.
Definition Core.cpp:2659
LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC)
Set the calling convention of a function.
Definition Core.cpp:2636
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *OverloadTypes, size_t OverloadCount)
Retrieves the type of an intrinsic.
Definition Core.cpp:2594
LLVM_C_ABI void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, const char *V)
Add a target-dependent attribute to a function.
Definition Core.cpp:2727
LLVM_C_ABI LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2710
LLVM_C_ABI LLVMValueRef LLVMIsAMDString(LLVMValueRef Val)
Definition Core.cpp:1208
LLVM_C_ABI LLVMBool LLVMIsPoison(LLVMValueRef Val)
Determine whether a value instance is poisonous.
Definition Core.cpp:1314
LLVM_C_ABI LLVMValueKind LLVMGetValueKind(LLVMValueRef Val)
Obtain the enumerated type of a Value instance.
Definition Core.cpp:1047
LLVM_C_ABI void LLVMDumpValue(LLVMValueRef Val)
Dump a representation of a value to stderr.
Definition Core.cpp:1077
LLVM_C_ABI const char * LLVMGetValueName(LLVMValueRef Val)
Deprecated: Use LLVMGetValueName2 instead.
Definition Core.cpp:1069
LLVM_C_ABI LLVMContextRef LLVMGetValueContext(LLVMValueRef Val)
Obtain the context to which this value is associated.
Definition Core.cpp:1093
LLVM_C_ABI void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal)
Replace all uses of a value with another one.
Definition Core.cpp:1109
LLVM_C_ABI const char * LLVMGetValueName2(LLVMValueRef Val, size_t *Length)
Obtain the string name of a value.
Definition Core.cpp:1059
LLVM_C_ABI void LLVMSetValueName(LLVMValueRef Val, const char *Name)
Deprecated: Use LLVMSetValueName2 instead.
Definition Core.cpp:1073
LLVM_C_ABI LLVMValueRef LLVMIsAMDNode(LLVMValueRef Val)
Definition Core.cpp:1193
LLVM_C_ABI char * LLVMPrintDbgRecordToString(LLVMDbgRecordRef Record)
Return a string representation of the DbgRecord.
Definition Core.cpp:1097
LLVM_C_ABI LLVMBool LLVMIsUndef(LLVMValueRef Val)
Determine whether a value instance is undefined.
Definition Core.cpp:1310
LLVM_C_ABI LLVMTypeRef LLVMTypeOf(LLVMValueRef Val)
Obtain the type of a value.
Definition Core.cpp:1043
LLVM_C_ABI char * LLVMPrintValueToString(LLVMValueRef Val)
Return a string representation of the value.
Definition Core.cpp:1081
LLVM_C_ABI LLVMValueRef LLVMIsAValueAsMetadata(LLVMValueRef Val)
Definition Core.cpp:1201
#define LLVM_DECLARE_VALUE_CAST(name)
Convert value instances between types.
Definition Core.h:2232
LLVM_C_ABI LLVMBool LLVMIsConstant(LLVMValueRef Val)
Determine whether the specified value instance is constant.
Definition Core.cpp:1300
LLVM_C_ABI void LLVMSetValueName2(LLVMValueRef Val, const char *Name, size_t NameLen)
Set the string name of a value.
Definition Core.cpp:1065
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the first GlobalIFunc in a Module.
Definition Core.cpp:2810
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobalIFunc(LLVMModuleRef M, const char *Name, size_t NameLen)
Obtain a GlobalIFunc value from a Module by its name.
Definition Core.cpp:2805
LLVM_C_ABI void LLVMRemoveGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module.
Definition Core.cpp:2854
LLVM_C_ABI LLVMValueRef LLVMAddGlobalIFunc(LLVMModuleRef M, const char *Name, size_t NameLen, LLVMTypeRef Ty, unsigned AddrSpace, LLVMValueRef Resolver)
Add a global indirect function to a module under a specified name.
Definition Core.cpp:2795
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalIFunc(LLVMValueRef IFunc)
Advance a GlobalIFunc iterator to the next GlobalIFunc.
Definition Core.cpp:2826
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc)
Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
Definition Core.cpp:2834
LLVM_C_ABI LLVMValueRef LLVMGetGlobalIFuncResolver(LLVMValueRef IFunc)
Retrieves the resolver function associated with this indirect function, or NULL if it doesn't not exi...
Definition Core.cpp:2842
LLVM_C_ABI void LLVMSetGlobalIFuncResolver(LLVMValueRef IFunc, LLVMValueRef Resolver)
Sets the resolver function associated with this indirect function.
Definition Core.cpp:2846
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the last GlobalIFunc in a Module.
Definition Core.cpp:2818
LLVM_C_ABI void LLVMEraseGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module and delete it.
Definition Core.cpp:2850
LLVM_C_ABI LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca)
Obtain the type that is being allocated by the alloca instruction.
Definition Core.cpp:3363
LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall)
Set whether a call instruction is a tail call.
Definition Core.cpp:3262
LLVM_C_ABI void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Definition Core.cpp:3194
LLVM_C_ABI unsigned LLVMGetNumOperandBundles(LLVMValueRef C)
Obtain the number of operand bundles attached to this instruction.
Definition Core.cpp:3246
LLVM_C_ABI void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3228
LLVM_C_ABI void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3233
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3214
LLVM_C_ABI unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr)
Obtain the calling convention for a call instruction.
Definition Core.cpp:3177
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrDefaultDest(LLVMValueRef CallBr)
Get the default destination of a CallBr instruction.
Definition Core.cpp:3302
LLVM_C_ABI LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr)
Obtain the pointer to the function invoked by this instruction.
Definition Core.cpp:3238
LLVM_C_ABI void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the normal destination basic block.
Definition Core.cpp:3289
LLVM_C_ABI LLVMBool LLVMIsTailCall(LLVMValueRef CallInst)
Obtain whether a call instruction is a tail call.
Definition Core.cpp:3258
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3221
LLVM_C_ABI unsigned LLVMGetCallBrNumIndirectDests(LLVMValueRef CallBr)
Get the number of indirect destinations of a CallBr instruction.
Definition Core.cpp:3306
LLVM_C_ABI void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:3206
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst)
Return the normal destination basic block.
Definition Core.cpp:3276
LLVM_C_ABI unsigned LLVMGetNumArgOperands(LLVMValueRef Instr)
Obtain the argument count for a call instruction.
Definition Core.cpp:3168
LLVM_C_ABI void LLVMSetTailCallKind(LLVMValueRef CallInst, LLVMTailCallKind kind)
Set the call kind of the call instruction.
Definition Core.cpp:3270
LLVM_C_ABI LLVMOperandBundleRef LLVMGetOperandBundleAtIndex(LLVMValueRef C, unsigned Index)
Obtain the operand bundle attached to this instruction at the given index.
Definition Core.cpp:3250
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrIndirectDest(LLVMValueRef CallBr, unsigned Idx)
Get the indirect destination of a CallBr instruction at the given index.
Definition Core.cpp:3310
LLVM_C_ABI LLVMTailCallKind LLVMGetTailCallKind(LLVMValueRef CallInst)
Obtain a tail call kind of the call instruction.
Definition Core.cpp:3266
LLVM_C_ABI void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the unwind destination basic block.
Definition Core.cpp:3293
LLVM_C_ABI LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C)
Obtain the function type called by this instruction.
Definition Core.cpp:3242
LLVM_C_ABI LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst)
Return the unwind destination basic block.
Definition Core.cpp:3280
LLVM_C_ABI void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx, unsigned Align)
Definition Core.cpp:3186
LLVM_C_ABI unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C, LLVMAttributeIndex Idx)
Definition Core.cpp:3199
LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC)
Set the calling convention for a call instruction.
Definition Core.cpp:3181
LLVM_C_ABI LLVMGEPNoWrapFlags LLVMGEPGetNoWrapFlags(LLVMValueRef GEP)
Get the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3381
LLVM_C_ABI LLVMBool LLVMIsInBounds(LLVMValueRef GEP)
Check whether the given GEP operator is inbounds.
Definition Core.cpp:3369
LLVM_C_ABI void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds)
Set the given GEP instruction to be inbounds or not.
Definition Core.cpp:3373
LLVM_C_ABI LLVMTypeRef LLVMGetGEPSourceElementType(LLVMValueRef GEP)
Get the source element type of the given GEP operator.
Definition Core.cpp:3377
LLVM_C_ABI void LLVMGEPSetNoWrapFlags(LLVMValueRef GEP, LLVMGEPNoWrapFlags NoWrapFlags)
Set the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3386
LLVM_C_ABI unsigned LLVMGetNumIndices(LLVMValueRef Inst)
Obtain the number of indices.
Definition Core.cpp:3414
LLVM_C_ABI const unsigned * LLVMGetIndices(LLVMValueRef Inst)
Obtain the indices as an array.
Definition Core.cpp:3426
LLVM_C_ABI LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
Definition Core.cpp:3408
LLVM_C_ABI LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMValueRef.
Definition Core.cpp:3404
LLVM_C_ABI void LLVMAddIncoming(LLVMValueRef PhiNode, LLVMValueRef *IncomingValues, LLVMBasicBlockRef *IncomingBlocks, unsigned Count)
Add an incoming value to the end of a PHI list.
Definition Core.cpp:3393
LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode)
Obtain the number of incoming basic blocks to a PHI node.
Definition Core.cpp:3400
LLVM_C_ABI LLVMValueRef LLVMGetCondition(LLVMValueRef Branch)
Return the condition of a branch instruction.
Definition Core.cpp:3334
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i)
Return the specified successor.
Definition Core.cpp:3320
LLVM_C_ABI void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond)
Set the condition of a branch instruction.
Definition Core.cpp:3338
LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
Update the specified successor to point at the provided block.
Definition Core.cpp:3324
LLVM_C_ABI LLVMValueRef LLVMGetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i)
Obtain the case value for a successor of a switch instruction.
Definition Core.cpp:3348
LLVM_C_ABI LLVMBool LLVMIsConditional(LLVMValueRef Branch)
Return if an instruction is a conditional branch.
Definition Core.cpp:3330
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr)
Obtain the default destination basic block of a switch instruction.
Definition Core.cpp:3344
LLVM_C_ABI void LLVMSetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i, LLVMValueRef CaseValue)
Set the case value for a successor of a switch instruction.
Definition Core.cpp:3354
LLVM_C_ABI unsigned LLVMGetNumSuccessors(LLVMValueRef Term)
Return the number of successors that this terminator has.
Definition Core.cpp:3316
LLVM_C_ABI LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst)
Obtain the float predicate of an instruction.
Definition Core.cpp:3078
LLVM_C_ABI int LLVMHasMetadata(LLVMValueRef Val)
Determine whether an instruction has any metadata attached.
Definition Core.cpp:1113
LLVM_C_ABI void LLVMInstructionRemoveFromParent(LLVMValueRef Inst)
Remove an instruction.
Definition Core.cpp:3052
LLVM_C_ABI LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst)
Obtain the instruction that occurred before this one.
Definition Core.cpp:3044
LLVM_C_ABI LLVMDbgRecordRef LLVMGetPreviousDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the previous DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3129
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetExpression(LLVMDbgRecordRef Rec)
Get the debug info expression of the DbgVariableRecord.
Definition Core.cpp:3164
LLVM_C_ABI LLVMDbgRecordRef LLVMGetFirstDbgRecord(LLVMValueRef Inst)
Obtain the first debug record attached to an instruction.
Definition Core.cpp:3101
LLVM_C_ABI LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst)
Obtain the code opcode for an individual instruction.
Definition Core.cpp:3084
LLVM_C_ABI LLVMDbgRecordRef LLVMGetNextDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the next DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3121
LLVM_C_ABI LLVMDbgRecordRef LLVMGetLastDbgRecord(LLVMValueRef Inst)
Obtain the last debug record attached to an instruction.
Definition Core.cpp:3111
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetVariable(LLVMDbgRecordRef Rec)
Get the debug info variable of the DbgVariableRecord.
Definition Core.cpp:3160
LLVM_C_ABI LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst)
Determine whether an instruction is a terminator.
Definition Core.cpp:3096
LLVM_C_ABI LLVMValueRef LLVMDbgVariableRecordGetValue(LLVMDbgRecordRef Rec, unsigned OpIdx)
Get the value of the DbgVariableRecord.
Definition Core.cpp:3155
LLVM_C_ABI LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec)
Definition Core.cpp:3141
LLVM_C_ABI LLVMValueMetadataEntry * LLVMInstructionGetAllMetadataOtherThanDebugLoc(LLVMValueRef Instr, size_t *NumEntries)
Returns the metadata associated with an instruction value, but filters out all the debug locations.
Definition Core.cpp:1170
LLVM_C_ABI void LLVMDeleteInstruction(LLVMValueRef Inst)
Delete an instruction.
Definition Core.cpp:3060
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst)
Obtain the basic block to which an instruction belongs.
Definition Core.cpp:3016
LLVM_C_ABI LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec)
Get the debug location attached to the debug record.
Definition Core.cpp:3137
LLVM_C_ABI LLVMBool LLVMGetICmpSameSign(LLVMValueRef Inst)
Get whether or not an icmp instruction has the samesign flag.
Definition Core.cpp:3070
LLVM_C_ABI LLVMValueRef LLVMInstructionClone(LLVMValueRef Inst)
Create a copy of 'this' instruction that is identical in all ways except the following:
Definition Core.cpp:3090
LLVM_C_ABI void LLVMInstructionEraseFromParent(LLVMValueRef Inst)
Remove and delete an instruction.
Definition Core.cpp:3056
LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID, LLVMValueRef Node)
Set metadata associated with an instruction value.
Definition Core.cpp:1139
LLVM_C_ABI LLVMValueRef LLVMGetMetadata(LLVMValueRef Val, unsigned KindID)
Return metadata associated with an instruction value.
Definition Core.cpp:1117
LLVM_C_ABI LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst)
Obtain the predicate of an instruction.
Definition Core.cpp:3064
LLVM_C_ABI LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
Definition Core.cpp:3036
LLVM_C_ABI void LLVMSetICmpSameSign(LLVMValueRef Inst, LLVMBool SameSign)
Set the samesign flag on an icmp instruction.
Definition Core.cpp:3074
LLVM_C_ABI LLVMMetadataRef LLVMMDNodeInContext2(LLVMContextRef C, LLVMMetadataRef *MDs, size_t Count)
Create an MDNode value with the given array of operands.
Definition Core.cpp:1329
LLVM_C_ABI const char * LLVMGetMDString(LLVMValueRef V, unsigned *Length)
Obtain the underlying string from a MDString value.
Definition Core.cpp:1389
LLVM_C_ABI LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD)
Obtain a Metadata as a Value.
Definition Core.cpp:1376
LLVM_C_ABI unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V)
Obtain the number of operands from an MDNode value.
Definition Core.cpp:1399
LLVM_C_ABI LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, unsigned SLen)
Deprecated: Use LLVMMDStringInContext2 instead.
Definition Core.cpp:1334
LLVM_C_ABI LLVMMetadataRef LLVMMDStringInContext2(LLVMContextRef C, const char *Str, size_t SLen)
Create an MDString value from a given string value.
Definition Core.cpp:1324
LLVM_C_ABI LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
Deprecated: Use LLVMMDNodeInContext2 instead.
Definition Core.cpp:1345
LLVM_C_ABI void LLVMReplaceMDNodeOperandWith(LLVMValueRef V, unsigned Index, LLVMMetadataRef Replacement)
Replace an operand at a specific index in a llvm::MDNode value.
Definition Core.cpp:1467
LLVM_C_ABI LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val)
Obtain a Value as a Metadata.
Definition Core.cpp:1380
LLVM_C_ABI void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest)
Obtain the given MDNode's operands.
Definition Core.cpp:1454
LLVM_C_ABI LLVMUseRef LLVMGetOperandUse(LLVMValueRef Val, unsigned Index)
Obtain the use of an operand at a specific index in a llvm::User value.
Definition Core.cpp:1265
LLVM_C_ABI int LLVMGetNumOperands(LLVMValueRef Val)
Obtain the number of operands in a llvm::User value.
Definition Core.cpp:1274
LLVM_C_ABI void LLVMSetOperand(LLVMValueRef User, unsigned Index, LLVMValueRef Val)
Set an operand at a specific index in a llvm::User value.
Definition Core.cpp:1270
LLVM_C_ABI LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index)
Obtain an operand at a specific index in a llvm::User value.
Definition Core.cpp:1251
LLVM_C_ABI LLVMValueRef LLVMGetUser(LLVMUseRef U)
Obtain the user value for a user.
Definition Core.cpp:1231
LLVM_C_ABI LLVMValueRef LLVMGetUsedValue(LLVMUseRef U)
Obtain the value this use corresponds to.
Definition Core.cpp:1235
LLVM_C_ABI LLVMUseRef LLVMGetNextUse(LLVMUseRef U)
Obtain the next use of a value.
Definition Core.cpp:1224
LLVM_C_ABI LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val)
Obtain the first use of a value.
Definition Core.cpp:1216
#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro)
Definition Core.h:2034
LLVM_C_ABI void LLVMDisposeMessage(char *Message)
Definition Core.cpp:88
LLVM_C_ABI char * LLVMCreateMessage(const char *Message)
Definition Core.cpp:84
LLVM_C_ABI void LLVMGetVersion(unsigned *Major, unsigned *Minor, unsigned *Patch)
Return the major, minor, and patch version of LLVM.
Definition Core.cpp:73
LLVM_C_ABI void LLVMShutdown(void)
Deallocate and destroy all ManagedStatic variables.
Definition Core.cpp:67
struct LLVMOpaqueValue * LLVMValueRef
Represents an individual value in LLVM IR.
Definition Types.h:75
struct LLVMOpaqueAttributeRef * LLVMAttributeRef
Used to represent an attributes.
Definition Types.h:145
int LLVMBool
Definition Types.h:28
struct LLVMOpaqueModuleFlagEntry LLVMModuleFlagEntry
Definition Types.h:160
struct LLVMOpaqueNamedMDNode * LLVMNamedMDNodeRef
Represents an LLVM Named Metadata Node.
Definition Types.h:96
struct LLVMOpaquePassManager * LLVMPassManagerRef
Definition Types.h:127
struct LLVMOpaqueDbgRecord * LLVMDbgRecordRef
Definition Types.h:175
struct LLVMOpaqueDiagnosticInfo * LLVMDiagnosticInfoRef
Definition Types.h:150
struct LLVMOpaqueValueMetadataEntry LLVMValueMetadataEntry
Represents an entry in a Global Object's metadata attachments.
Definition Types.h:103
struct LLVMOpaqueMemoryBuffer * LLVMMemoryBufferRef
LLVM uses a polymorphic type hierarchy which C cannot represent, therefore parameters must be passed ...
Definition Types.h:48
struct LLVMOpaqueContext * LLVMContextRef
The top-level container for all LLVM global data.
Definition Types.h:53
struct LLVMOpaqueBuilder * LLVMBuilderRef
Represents an LLVM basic block builder.
Definition Types.h:110
struct LLVMOpaqueUse * LLVMUseRef
Used to get the users and usees of a Value.
Definition Types.h:133
struct LLVMOpaqueBasicBlock * LLVMBasicBlockRef
Represents a basic block of instructions in LLVM IR.
Definition Types.h:82
struct LLVMOpaqueType * LLVMTypeRef
Each value in the LLVM IR has a type, an LLVMTypeRef.
Definition Types.h:68
struct LLVMOpaqueMetadata * LLVMMetadataRef
Represents an LLVM Metadata.
Definition Types.h:89
struct LLVMOpaqueModule * LLVMModuleRef
The top-level container for all other LLVM Intermediate Representation (IR) objects.
Definition Types.h:61
struct LLVMOpaqueModuleProvider * LLVMModuleProviderRef
Interface used to provide a module to JIT or interpreter.
Definition Types.h:124
struct LLVMOpaqueOperandBundle * LLVMOperandBundleRef
Definition Types.h:138
LLVM_C_ABI LLVMValueRef LLVMAddAlias2(LLVMModuleRef M, LLVMTypeRef ValueTy, unsigned AddrSpace, LLVMValueRef Aliasee, const char *Name)
Add a GlobalAlias with the given value type, address space and aliasee.
Definition Core.cpp:2440
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the last GlobalAlias in a Module.
Definition Core.cpp:2461
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA)
Decrement a GlobalAlias iterator to the previous GlobalAlias.
Definition Core.cpp:2477
LLVM_C_ABI void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee)
Set the target value of an alias.
Definition Core.cpp:2489
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the first GlobalAlias in a Module.
Definition Core.cpp:2453
LLVM_C_ABI LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias)
Retrieve the target value of an alias.
Definition Core.cpp:2485
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobalAlias(LLVMModuleRef M, const char *Name, size_t NameLen)
Obtain a GlobalAlias value from a Module by its name.
Definition Core.cpp:2448
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA)
Advance a GlobalAlias iterator to the next GlobalAlias.
Definition Core.cpp:2469
LLVM_C_ABI LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar)
Definition Core.cpp:2375
LLVM_C_ABI LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar)
Definition Core.cpp:2391
LLVM_C_ABI LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar)
Definition Core.cpp:2383
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2351
LLVM_C_ABI void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)
Definition Core.cpp:2379
LLVM_C_ABI LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar)
Definition Core.cpp:2430
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M)
Definition Core.cpp:2335
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobalWithLength(LLVMModuleRef M, const char *Name, size_t Length)
Definition Core.cpp:2322
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M)
Definition Core.cpp:2327
LLVM_C_ABI void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)
Definition Core.cpp:2408
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2343
LLVM_C_ABI void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit)
Definition Core.cpp:2434
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name)
Definition Core.cpp:2318
LLVM_C_ABI LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)
Definition Core.cpp:2309
LLVM_C_ABI void LLVMDeleteGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2359
LLVM_C_ABI void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant)
Definition Core.cpp:2387
LLVM_C_ABI LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:2304
LLVM_C_ABI LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar)
Definition Core.cpp:2363
LLVM_C_ABI void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)
Definition Core.cpp:2370
#define N