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