LLVM 23.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 */
2756 "Use LLVMConstNull instead.");
2759 LLVMValueRef RHSConstant);
2761 LLVMValueRef RHSConstant);
2763 LLVMValueRef RHSConstant);
2765 LLVMValueRef RHSConstant);
2767 LLVMValueRef RHSConstant);
2769 LLVMValueRef RHSConstant);
2771 LLVMValueRef RHSConstant);
2773 LLVMValueRef *ConstantIndices,
2774 unsigned NumIndices);
2776 LLVMValueRef ConstantVal,
2777 LLVMValueRef *ConstantIndices,
2778 unsigned NumIndices);
2779/**
2780 * Creates a constant GetElementPtr expression. Similar to LLVMConstGEP2, but
2781 * allows specifying the no-wrap flags.
2782 *
2783 * @see llvm::ConstantExpr::getGetElementPtr()
2784 */
2786 LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices,
2787 unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags);
2789 LLVMTypeRef ToType);
2791 LLVMTypeRef ToType);
2793 LLVMTypeRef ToType);
2795 LLVMTypeRef ToType);
2797 LLVMTypeRef ToType);
2799 LLVMTypeRef ToType);
2801 LLVMTypeRef ToType);
2803 LLVMValueRef IndexConstant);
2805 LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant,
2806 LLVMValueRef IndexConstant);
2808 LLVMValueRef VectorBConstant,
2809 LLVMValueRef MaskConstant);
2811
2812/**
2813 * Gets the function associated with a given BlockAddress constant value.
2814 */
2816
2817/**
2818 * Gets the basic block associated with a given BlockAddress constant value.
2819 */
2822
2823/** Deprecated: Use LLVMGetInlineAsm instead. */
2825 const char *AsmString,
2826 const char *Constraints,
2827 LLVMBool HasSideEffects,
2828 LLVMBool IsAlignStack);
2829
2830/**
2831 * @}
2832 */
2833
2834/**
2835 * @defgroup LLVMCCoreValueConstantGlobals Global Values
2836 *
2837 * This group contains functions that operate on global values. Functions in
2838 * this group relate to functions in the llvm::GlobalValue class tree.
2839 *
2840 * @see llvm::GlobalValue
2841 *
2842 * @{
2843 */
2844
2850LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section);
2855 LLVMDLLStorageClass Class);
2858 LLVMUnnamedAddr UnnamedAddr);
2859
2860/**
2861 * Returns the "value type" of a global value. This differs from the formal
2862 * type of a global value which is always a pointer type.
2863 *
2864 * @see llvm::GlobalValue::getValueType()
2865 * @see llvm::Function::getFunctionType()
2866 */
2868
2869/** Deprecated: Use LLVMGetUnnamedAddress instead. */
2871/** Deprecated: Use LLVMSetUnnamedAddress instead. */
2873 LLVMBool HasUnnamedAddr);
2874
2875/**
2876 * @defgroup LLVMCCoreValueWithAlignment Values with alignment
2877 *
2878 * Functions in this group only apply to values with alignment, i.e.
2879 * global variables, load and store instructions.
2880 */
2881
2882/**
2883 * Obtain the preferred alignment of the value.
2884 * @see llvm::AllocaInst::getAlignment()
2885 * @see llvm::LoadInst::getAlignment()
2886 * @see llvm::StoreInst::getAlignment()
2887 * @see llvm::AtomicRMWInst::setAlignment()
2888 * @see llvm::AtomicCmpXchgInst::setAlignment()
2889 * @see llvm::GlobalValue::getAlignment()
2890 */
2892
2893/**
2894 * Set the preferred alignment of the value.
2895 * @see llvm::AllocaInst::setAlignment()
2896 * @see llvm::LoadInst::setAlignment()
2897 * @see llvm::StoreInst::setAlignment()
2898 * @see llvm::AtomicRMWInst::setAlignment()
2899 * @see llvm::AtomicCmpXchgInst::setAlignment()
2900 * @see llvm::GlobalValue::setAlignment()
2901 */
2902LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes);
2903
2904/**
2905 * Sets a metadata attachment, erasing the existing metadata attachment if
2906 * it already exists for the given kind.
2907 *
2908 * @see llvm::GlobalObject::setMetadata()
2909 */
2910LLVM_C_ABI void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind,
2911 LLVMMetadataRef MD);
2912
2913/**
2914 * Adds a metadata attachment.
2915 *
2916 * @see llvm::GlobalObject::addMetadata()
2917 */
2918LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind,
2919 LLVMMetadataRef MD);
2920
2921/**
2922 * Erases a metadata attachment of the given kind if it exists.
2923 *
2924 * @see llvm::GlobalObject::eraseMetadata()
2925 */
2926LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind);
2927
2928/**
2929 * Removes all metadata attachments from this value.
2930 *
2931 * @see llvm::GlobalObject::clearMetadata()
2932 */
2934
2935/**
2936 * Add debuginfo metadata to this global.
2937 *
2938 * @see llvm::GlobalVariable::addDebugInfo()
2939 */
2941 LLVMMetadataRef GVE);
2942
2943/**
2944 * Retrieves an array of metadata entries representing the metadata attached to
2945 * this value. The caller is responsible for freeing this array by calling
2946 * \c LLVMDisposeValueMetadataEntries.
2947 *
2948 * @see llvm::GlobalObject::getAllMetadata()
2949 */
2951LLVMGlobalCopyAllMetadata(LLVMValueRef Value, size_t *NumEntries);
2952
2953/**
2954 * Destroys value metadata entries.
2955 */
2956LLVM_C_ABI void
2958
2959/**
2960 * Returns the kind of a value metadata entry at a specific index.
2961 */
2962LLVM_C_ABI unsigned
2964 unsigned Index);
2965
2966/**
2967 * Returns the underlying metadata node of a value metadata entry at a
2968 * specific index.
2969 */
2971 LLVMValueMetadataEntry *Entries, unsigned Index);
2972
2973/**
2974 * @}
2975 */
2976
2977/**
2978 * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables
2979 *
2980 * This group contains functions that operate on global variable values.
2981 *
2982 * @see llvm::GlobalVariable
2983 *
2984 * @{
2985 */
2987 const char *Name);
2989 LLVMTypeRef Ty,
2990 const char *Name,
2991 unsigned AddressSpace);
2994 const char *Name,
2995 size_t Length);
3003 LLVMValueRef ConstantVal);
3006 LLVMBool IsThreadLocal);
3009 LLVMBool IsConstant);
3015 LLVMBool IsExtInit);
3016
3017/**
3018 * @}
3019 */
3020
3021/**
3022 * @defgroup LLVMCoreValueConstantGlobalAlias Global Aliases
3023 *
3024 * This group contains function that operate on global alias values.
3025 *
3026 * @see llvm::GlobalAlias
3027 *
3028 * @{
3029 */
3030
3031/**
3032 * Add a GlobalAlias with the given value type, address space and aliasee.
3033 *
3034 * @see llvm::GlobalAlias::create()
3035 */
3037 unsigned AddrSpace, LLVMValueRef Aliasee,
3038 const char *Name);
3039
3040/**
3041 * Obtain a GlobalAlias value from a Module by its name.
3042 *
3043 * The returned value corresponds to a llvm::GlobalAlias value.
3044 *
3045 * @see llvm::Module::getNamedAlias()
3046 */
3048 const char *Name,
3049 size_t NameLen);
3050
3051/**
3052 * Obtain an iterator to the first GlobalAlias in a Module.
3053 *
3054 * @see llvm::Module::alias_begin()
3055 */
3057
3058/**
3059 * Obtain an iterator to the last GlobalAlias in a Module.
3060 *
3061 * @see llvm::Module::alias_end()
3062 */
3064
3065/**
3066 * Advance a GlobalAlias iterator to the next GlobalAlias.
3067 *
3068 * Returns NULL if the iterator was already at the end and there are no more
3069 * global aliases.
3070 */
3072
3073/**
3074 * Decrement a GlobalAlias iterator to the previous GlobalAlias.
3075 *
3076 * Returns NULL if the iterator was already at the beginning and there are
3077 * no previous global aliases.
3078 */
3080
3081/**
3082 * Retrieve the target value of an alias.
3083 */
3085
3086/**
3087 * Set the target value of an alias.
3088 */
3090
3091/**
3092 * @}
3093 */
3094
3095/**
3096 * @defgroup LLVMCCoreValueFunction Function values
3097 *
3098 * Functions in this group operate on LLVMValueRef instances that
3099 * correspond to llvm::Function instances.
3100 *
3101 * @see llvm::Function
3102 *
3103 * @{
3104 */
3105
3106/**
3107 * Remove a function from its containing module and deletes it.
3108 *
3109 * @see llvm::Function::eraseFromParent()
3110 */
3112
3113/**
3114 * Check whether the given function has a personality function.
3115 *
3116 * @see llvm::Function::hasPersonalityFn()
3117 */
3119
3120/**
3121 * Obtain the personality function attached to the function.
3122 *
3123 * @see llvm::Function::getPersonalityFn()
3124 */
3126
3127/**
3128 * Set the personality function attached to the function.
3129 *
3130 * @see llvm::Function::setPersonalityFn()
3131 */
3133 LLVMValueRef PersonalityFn);
3134
3135/**
3136 * Obtain the intrinsic ID number which matches the given function name.
3137 *
3138 * @see llvm::Intrinsic::lookupIntrinsicID()
3139 */
3140LLVM_C_ABI unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen);
3141
3142/**
3143 * Obtain the ID number from a function instance.
3144 *
3145 * @see llvm::Function::getIntrinsicID()
3146 */
3148
3149/**
3150 * Get or insert the declaration of an intrinsic. For overloaded intrinsics,
3151 * parameter types must be provided to uniquely identify an overload.
3152 *
3153 * @see llvm::Intrinsic::getOrInsertDeclaration()
3154 */
3156 unsigned ID,
3157 LLVMTypeRef *ParamTypes,
3158 size_t ParamCount);
3159
3160/**
3161 * Retrieves the type of an intrinsic. For overloaded intrinsics, parameter
3162 * types must be provided to uniquely identify an overload.
3163 *
3164 * @see llvm::Intrinsic::getType()
3165 */
3167 LLVMTypeRef *ParamTypes,
3168 size_t ParamCount);
3169
3170/**
3171 * Retrieves the name of an intrinsic.
3172 *
3173 * @see llvm::Intrinsic::getName()
3174 */
3175LLVM_C_ABI const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength);
3176
3177/** Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. */
3179 LLVMTypeRef *ParamTypes,
3180 size_t ParamCount,
3181 size_t *NameLength);
3182
3183/**
3184 * Copies the name of an overloaded intrinsic identified by a given list of
3185 * parameter types.
3186 *
3187 * Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the
3188 * returned string.
3189 *
3190 * This version also supports unnamed types.
3191 *
3192 * @see llvm::Intrinsic::getName()
3193 */
3195 unsigned ID,
3196 LLVMTypeRef *ParamTypes,
3197 size_t ParamCount,
3198 size_t *NameLength);
3199
3200/**
3201 * Obtain if the intrinsic identified by the given ID is overloaded.
3202 *
3203 * @see llvm::Intrinsic::isOverloaded()
3204 */
3206
3207/**
3208 * Obtain the calling function of a function.
3209 *
3210 * The returned value corresponds to the LLVMCallConv enumeration.
3211 *
3212 * @see llvm::Function::getCallingConv()
3213 */
3215
3216/**
3217 * Set the calling convention of a function.
3218 *
3219 * @see llvm::Function::setCallingConv()
3220 *
3221 * @param Fn Function to operate on
3222 * @param CC LLVMCallConv to set calling convention to
3223 */
3224LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC);
3225
3226/**
3227 * Obtain the name of the garbage collector to use during code
3228 * generation.
3229 *
3230 * @see llvm::Function::getGC()
3231 */
3233
3234/**
3235 * Define the garbage collector to use during code generation.
3236 *
3237 * @see llvm::Function::setGC()
3238 */
3239LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name);
3240
3241/**
3242 * Gets the prefix data associated with a function. Only valid on functions, and
3243 * only if LLVMHasPrefixData returns true.
3244 * See https://llvm.org/docs/LangRef.html#prefix-data
3245 */
3247
3248/**
3249 * Check if a given function has prefix data. Only valid on functions.
3250 * See https://llvm.org/docs/LangRef.html#prefix-data
3251 */
3253
3254/**
3255 * Sets the prefix data for the function. Only valid on functions.
3256 * See https://llvm.org/docs/LangRef.html#prefix-data
3257 */
3259
3260/**
3261 * Gets the prologue data associated with a function. Only valid on functions,
3262 * and only if LLVMHasPrologueData returns true.
3263 * See https://llvm.org/docs/LangRef.html#prologue-data
3264 */
3266
3267/**
3268 * Check if a given function has prologue data. Only valid on functions.
3269 * See https://llvm.org/docs/LangRef.html#prologue-data
3270 */
3272
3273/**
3274 * Sets the prologue data for the function. Only valid on functions.
3275 * See https://llvm.org/docs/LangRef.html#prologue-data
3276 */
3278
3279/**
3280 * Add an attribute to a function.
3281 *
3282 * @see llvm::Function::addAttribute()
3283 */
3287 LLVMAttributeIndex Idx);
3289 LLVMAttributeRef *Attrs);
3292 unsigned KindID);
3294 LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
3297 unsigned KindID);
3300 const char *K, unsigned KLen);
3301
3302/**
3303 * Add a target-dependent attribute to a function
3304 * @see llvm::AttrBuilder::addAttribute()
3305 */
3307 const char *A,
3308 const char *V);
3309
3310/**
3311 * @defgroup LLVMCCoreValueFunctionParameters Function Parameters
3312 *
3313 * Functions in this group relate to arguments/parameters on functions.
3314 *
3315 * Functions in this group expect LLVMValueRef instances that correspond
3316 * to llvm::Function instances.
3317 *
3318 * @{
3319 */
3320
3321/**
3322 * Obtain the number of parameters in a function.
3323 *
3324 * @see llvm::Function::arg_size()
3325 */
3327
3328/**
3329 * Obtain the parameters in a function.
3330 *
3331 * The takes a pointer to a pre-allocated array of LLVMValueRef that is
3332 * at least LLVMCountParams() long. This array will be filled with
3333 * LLVMValueRef instances which correspond to the parameters the
3334 * function receives. Each LLVMValueRef corresponds to a llvm::Argument
3335 * instance.
3336 *
3337 * @see llvm::Function::arg_begin()
3338 */
3340
3341/**
3342 * Obtain the parameter at the specified index.
3343 *
3344 * Parameters are indexed from 0.
3345 *
3346 * @see llvm::Function::arg_begin()
3347 */
3349
3350/**
3351 * Obtain the function to which this argument belongs.
3352 *
3353 * Unlike other functions in this group, this one takes an LLVMValueRef
3354 * that corresponds to a llvm::Attribute.
3355 *
3356 * The returned LLVMValueRef is the llvm::Function to which this
3357 * argument belongs.
3358 */
3360
3361/**
3362 * Obtain the first parameter to a function.
3363 *
3364 * @see llvm::Function::arg_begin()
3365 */
3367
3368/**
3369 * Obtain the last parameter to a function.
3370 *
3371 * @see llvm::Function::arg_end()
3372 */
3374
3375/**
3376 * Obtain the next parameter to a function.
3377 *
3378 * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is
3379 * actually a wrapped iterator) and obtains the next parameter from the
3380 * underlying iterator.
3381 */
3383
3384/**
3385 * Obtain the previous parameter to a function.
3386 *
3387 * This is the opposite of LLVMGetNextParam().
3388 */
3390
3391/**
3392 * Set the alignment for a function parameter.
3393 *
3394 * @see llvm::Argument::addAttr()
3395 * @see llvm::AttrBuilder::addAlignmentAttr()
3396 */
3397LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align);
3398
3399/**
3400 * @}
3401 */
3402
3403/**
3404 * @defgroup LLVMCCoreValueGlobalIFunc IFuncs
3405 *
3406 * Functions in this group relate to indirect functions.
3407 *
3408 * Functions in this group expect LLVMValueRef instances that correspond
3409 * to llvm::GlobalIFunc instances.
3410 *
3411 * @{
3412 */
3413
3414/**
3415 * Add a global indirect function to a module under a specified name.
3416 *
3417 * @see llvm::GlobalIFunc::create()
3418 */
3420 size_t NameLen, LLVMTypeRef Ty,
3421 unsigned AddrSpace,
3422 LLVMValueRef Resolver);
3423
3424/**
3425 * Obtain a GlobalIFunc value from a Module by its name.
3426 *
3427 * The returned value corresponds to a llvm::GlobalIFunc value.
3428 *
3429 * @see llvm::Module::getNamedIFunc()
3430 */
3432 const char *Name,
3433 size_t NameLen);
3434
3435/**
3436 * Obtain an iterator to the first GlobalIFunc in a Module.
3437 *
3438 * @see llvm::Module::ifunc_begin()
3439 */
3441
3442/**
3443 * Obtain an iterator to the last GlobalIFunc in a Module.
3444 *
3445 * @see llvm::Module::ifunc_end()
3446 */
3448
3449/**
3450 * Advance a GlobalIFunc iterator to the next GlobalIFunc.
3451 *
3452 * Returns NULL if the iterator was already at the end and there are no more
3453 * global aliases.
3454 */
3456
3457/**
3458 * Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
3459 *
3460 * Returns NULL if the iterator was already at the beginning and there are
3461 * no previous global aliases.
3462 */
3464
3465/**
3466 * Retrieves the resolver function associated with this indirect function, or
3467 * NULL if it doesn't not exist.
3468 *
3469 * @see llvm::GlobalIFunc::getResolver()
3470 */
3472
3473/**
3474 * Sets the resolver function associated with this indirect function.
3475 *
3476 * @see llvm::GlobalIFunc::setResolver()
3477 */
3479 LLVMValueRef Resolver);
3480
3481/**
3482 * Remove a global indirect function from its parent module and delete it.
3483 *
3484 * @see llvm::GlobalIFunc::eraseFromParent()
3485 */
3487
3488/**
3489 * Remove a global indirect function from its parent module.
3490 *
3491 * This unlinks the global indirect function from its containing module but
3492 * keeps it alive.
3493 *
3494 * @see llvm::GlobalIFunc::removeFromParent()
3495 */
3497
3498/**
3499 * @}
3500 */
3501
3502/**
3503 * @}
3504 */
3505
3506/**
3507 * @}
3508 */
3509
3510/**
3511 * @}
3512 */
3513
3514/**
3515 * @defgroup LLVMCCoreValueMetadata Metadata
3516 *
3517 * @{
3518 */
3519
3520/**
3521 * Create an MDString value from a given string value.
3522 *
3523 * The MDString value does not take ownership of the given string, it remains
3524 * the responsibility of the caller to free it.
3525 *
3526 * @see llvm::MDString::get()
3527 */
3529 const char *Str, size_t SLen);
3530
3531/**
3532 * Create an MDNode value with the given array of operands.
3533 *
3534 * @see llvm::MDNode::get()
3535 */
3537 LLVMMetadataRef *MDs,
3538 size_t Count);
3539
3540/**
3541 * Obtain a Metadata as a Value.
3542 */
3544 LLVMMetadataRef MD);
3545
3546/**
3547 * Obtain a Value as a Metadata.
3548 */
3550
3551/**
3552 * Obtain the underlying string from a MDString value.
3553 *
3554 * @param V Instance to obtain string from.
3555 * @param Length Memory address which will hold length of returned string.
3556 * @return String data in MDString.
3557 */
3558LLVM_C_ABI const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length);
3559
3560/**
3561 * Obtain the number of operands from an MDNode value.
3562 *
3563 * @param V MDNode to get number of operands from.
3564 * @return Number of operands of the MDNode.
3565 */
3567
3568/**
3569 * Obtain the given MDNode's operands.
3570 *
3571 * The passed LLVMValueRef pointer should point to enough memory to hold all of
3572 * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as
3573 * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the
3574 * MDNode's operands.
3575 *
3576 * @param V MDNode to get the operands from.
3577 * @param Dest Destination array for operands.
3578 */
3580
3581/**
3582 * Replace an operand at a specific index in a llvm::MDNode value.
3583 *
3584 * @see llvm::MDNode::replaceOperandWith()
3585 */
3587 LLVMMetadataRef Replacement);
3588
3589/** Deprecated: Use LLVMMDStringInContext2 instead. */
3591 unsigned SLen);
3592/** Deprecated: Use LLVMMDStringInContext2 instead. */
3594 LLVMValueRef LLVMMDString(const char *Str, unsigned SLen),
3595 "Use of the global context is deprecated, use LLVMMDStringInContext2 "
3596 "instead");
3597/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3599 LLVMValueRef *Vals, unsigned Count);
3600/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3602 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count),
3603 "Use of the global context is deprecated, use LLVMMDNodeInContext2 "
3604 "instead");
3605
3606/**
3607 * @}
3608 */
3609
3610/**
3611 * @defgroup LLVMCCoreOperandBundle Operand Bundles
3612 *
3613 * Functions in this group operate on LLVMOperandBundleRef instances that
3614 * correspond to llvm::OperandBundleDef instances.
3615 *
3616 * @see llvm::OperandBundleDef
3617 *
3618 * @{
3619 */
3620
3621/**
3622 * Create a new operand bundle.
3623 *
3624 * Every invocation should be paired with LLVMDisposeOperandBundle() or memory
3625 * will be leaked.
3626 *
3627 * @param Tag Tag name of the operand bundle
3628 * @param TagLen Length of Tag
3629 * @param Args Memory address of an array of bundle operands
3630 * @param NumArgs Length of Args
3631 */
3633 size_t TagLen,
3634 LLVMValueRef *Args,
3635 unsigned NumArgs);
3636
3637/**
3638 * Destroy an operand bundle.
3639 *
3640 * This must be called for every created operand bundle or memory will be
3641 * leaked.
3642 */
3644
3645/**
3646 * Obtain the tag of an operand bundle as a string.
3647 *
3648 * @param Bundle Operand bundle to obtain tag of.
3649 * @param Len Out parameter which holds the length of the returned string.
3650 * @return The tag name of Bundle.
3651 * @see OperandBundleDef::getTag()
3652 */
3654 size_t *Len);
3655
3656/**
3657 * Obtain the number of operands for an operand bundle.
3658 *
3659 * @param Bundle Operand bundle to obtain operand count of.
3660 * @return The number of operands.
3661 * @see OperandBundleDef::input_size()
3662 */
3664
3665/**
3666 * Obtain the operand for an operand bundle at the given index.
3667 *
3668 * @param Bundle Operand bundle to obtain operand of.
3669 * @param Index An operand index, must be less than
3670 * LLVMGetNumOperandBundleArgs().
3671 * @return The operand.
3672 */
3675
3676/**
3677 * @}
3678 */
3679
3680/**
3681 * @defgroup LLVMCCoreValueBasicBlock Basic Block
3682 *
3683 * A basic block represents a single entry single exit section of code.
3684 * Basic blocks contain a list of instructions which form the body of
3685 * the block.
3686 *
3687 * Basic blocks belong to functions. They have the type of label.
3688 *
3689 * Basic blocks are themselves values. However, the C API models them as
3690 * LLVMBasicBlockRef.
3691 *
3692 * @see llvm::BasicBlock
3693 *
3694 * @{
3695 */
3696
3697/**
3698 * Convert a basic block instance to a value type.
3699 */
3701
3702/**
3703 * Determine whether an LLVMValueRef is itself a basic block.
3704 */
3706
3707/**
3708 * Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
3709 */
3711
3712/**
3713 * Obtain the string name of a basic block.
3714 */
3716
3717/**
3718 * Obtain the function to which a basic block belongs.
3719 *
3720 * @see llvm::BasicBlock::getParent()
3721 */
3723
3724/**
3725 * Obtain the terminator instruction for a basic block.
3726 *
3727 * If the basic block does not have a terminator (it is not well-formed
3728 * if it doesn't), then NULL is returned.
3729 *
3730 * The returned LLVMValueRef corresponds to an llvm::Instruction.
3731 *
3732 * @see llvm::BasicBlock::getTerminator()
3733 */
3735
3736/**
3737 * Obtain the number of basic blocks in a function.
3738 *
3739 * @param Fn Function value to operate on.
3740 */
3742
3743/**
3744 * Obtain all of the basic blocks in a function.
3745 *
3746 * This operates on a function value. The BasicBlocks parameter is a
3747 * pointer to a pre-allocated array of LLVMBasicBlockRef of at least
3748 * LLVMCountBasicBlocks() in length. This array is populated with
3749 * LLVMBasicBlockRef instances.
3750 */
3752 LLVMBasicBlockRef *BasicBlocks);
3753
3754/**
3755 * Obtain the first basic block in a function.
3756 *
3757 * The returned basic block can be used as an iterator. You will likely
3758 * eventually call into LLVMGetNextBasicBlock() with it.
3759 *
3760 * @see llvm::Function::begin()
3761 */
3763
3764/**
3765 * Obtain the last basic block in a function.
3766 *
3767 * @see llvm::Function::end()
3768 */
3770
3771/**
3772 * Advance a basic block iterator.
3773 */
3775
3776/**
3777 * Go backwards in a basic block iterator.
3778 */
3780
3781/**
3782 * Obtain the basic block that corresponds to the entry point of a
3783 * function.
3784 *
3785 * @see llvm::Function::getEntryBlock()
3786 */
3788
3789/**
3790 * Insert the given basic block after the insertion point of the given builder.
3791 *
3792 * The insertion point must be valid.
3793 *
3794 * @see llvm::Function::BasicBlockListType::insertAfter()
3795 */
3796LLVM_C_ABI void
3799
3800/**
3801 * Append the given basic block to the basic block list of the given function.
3802 *
3803 * @see llvm::Function::BasicBlockListType::push_back()
3804 */
3807
3808/**
3809 * Create a new basic block without inserting it into a function.
3810 *
3811 * @see llvm::BasicBlock::Create()
3812 */
3814 const char *Name);
3815
3816/**
3817 * Append a basic block to the end of a function.
3818 *
3819 * @see llvm::BasicBlock::Create()
3820 */
3822 LLVMValueRef Fn,
3823 const char *Name);
3824
3825/**
3826 * Append a basic block to the end of a function using the global
3827 * context.
3828 *
3829 * @see llvm::BasicBlock::Create()
3830 */
3833 "Use of the global context is deprecated, use "
3834 "LLVMAppendBasicBlockInContext instead");
3835
3836/**
3837 * Insert a basic block in a function before another basic block.
3838 *
3839 * The function to add to is determined by the function of the
3840 * passed basic block.
3841 *
3842 * @see llvm::BasicBlock::Create()
3843 */
3846 const char *Name);
3847
3848/**
3849 * Insert a basic block in a function using the global context.
3850 *
3851 * @see llvm::BasicBlock::Create()
3852 */
3855 const char *Name),
3856 "Use of the global context is deprecated, use "
3857 "LLVMInsertBasicBlockInContext instead");
3858
3859/**
3860 * Remove a basic block from a function and delete it.
3861 *
3862 * This deletes the basic block from its containing function and deletes
3863 * the basic block itself.
3864 *
3865 * @see llvm::BasicBlock::eraseFromParent()
3866 */
3868
3869/**
3870 * Remove a basic block from a function.
3871 *
3872 * This deletes the basic block from its containing function but keep
3873 * the basic block alive.
3874 *
3875 * @see llvm::BasicBlock::removeFromParent()
3876 */
3878
3879/**
3880 * Move a basic block to before another one.
3881 *
3882 * @see llvm::BasicBlock::moveBefore()
3883 */
3885 LLVMBasicBlockRef MovePos);
3886
3887/**
3888 * Move a basic block to after another one.
3889 *
3890 * @see llvm::BasicBlock::moveAfter()
3891 */
3893 LLVMBasicBlockRef MovePos);
3894
3895/**
3896 * Obtain the first instruction in a basic block.
3897 *
3898 * The returned LLVMValueRef corresponds to a llvm::Instruction
3899 * instance.
3900 */
3902
3903/**
3904 * Obtain the last instruction in a basic block.
3905 *
3906 * The returned LLVMValueRef corresponds to an LLVM:Instruction.
3907 */
3909
3910/**
3911 * @}
3912 */
3913
3914/**
3915 * @defgroup LLVMCCoreValueInstruction Instructions
3916 *
3917 * Functions in this group relate to the inspection and manipulation of
3918 * individual instructions.
3919 *
3920 * In the C++ API, an instruction is modeled by llvm::Instruction. This
3921 * class has a large number of descendents. llvm::Instruction is a
3922 * llvm::Value and in the C API, instructions are modeled by
3923 * LLVMValueRef.
3924 *
3925 * This group also contains sub-groups which operate on specific
3926 * llvm::Instruction types, e.g. llvm::CallInst.
3927 *
3928 * @{
3929 */
3930
3931/**
3932 * Determine whether an instruction has any metadata attached.
3933 */
3935
3936/**
3937 * Return metadata associated with an instruction value.
3938 */
3940
3941/**
3942 * Set metadata associated with an instruction value.
3943 */
3944LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID,
3946
3947/**
3948 * Returns the metadata associated with an instruction value, but filters out
3949 * all the debug locations.
3950 *
3951 * @see llvm::Instruction::getAllMetadataOtherThanDebugLoc()
3952 */
3955 size_t *NumEntries);
3956
3957/**
3958 * Obtain the basic block to which an instruction belongs.
3959 *
3960 * @see llvm::Instruction::getParent()
3961 */
3963
3964/**
3965 * Obtain the instruction that occurs after the one specified.
3966 *
3967 * The next instruction will be from the same basic block.
3968 *
3969 * If this is the last instruction in a basic block, NULL will be
3970 * returned.
3971 */
3973
3974/**
3975 * Obtain the instruction that occurred before this one.
3976 *
3977 * If the instruction is the first instruction in a basic block, NULL
3978 * will be returned.
3979 */
3981
3982/**
3983 * Remove an instruction.
3984 *
3985 * The instruction specified is removed from its containing building
3986 * block but is kept alive.
3987 *
3988 * @see llvm::Instruction::removeFromParent()
3989 */
3991
3992/**
3993 * Remove and delete an instruction.
3994 *
3995 * The instruction specified is removed from its containing building
3996 * block and then deleted.
3997 *
3998 * @see llvm::Instruction::eraseFromParent()
3999 */
4001
4002/**
4003 * Delete an instruction.
4004 *
4005 * The instruction specified is deleted. It must have previously been
4006 * removed from its containing building block.
4007 *
4008 * @see llvm::Value::deleteValue()
4009 */
4011
4012/**
4013 * Obtain the code opcode for an individual instruction.
4014 *
4015 * @see llvm::Instruction::getOpCode()
4016 */
4018
4019/**
4020 * Obtain the predicate of an instruction.
4021 *
4022 * This is only valid for instructions that correspond to llvm::ICmpInst.
4023 *
4024 * @see llvm::ICmpInst::getPredicate()
4025 */
4027
4028/**
4029 * Get whether or not an icmp instruction has the samesign flag.
4030 *
4031 * This is only valid for instructions that correspond to llvm::ICmpInst.
4032 *
4033 * @see llvm::ICmpInst::hasSameSign()
4034 */
4036
4037/**
4038 * Set the samesign flag on an icmp instruction.
4039 *
4040 * This is only valid for instructions that correspond to llvm::ICmpInst.
4041 *
4042 * @see llvm::ICmpInst::setSameSign()
4043 */
4045
4046/**
4047 * Obtain the float predicate of an instruction.
4048 *
4049 * This is only valid for instructions that correspond to llvm::FCmpInst.
4050 *
4051 * @see llvm::FCmpInst::getPredicate()
4052 */
4054
4055/**
4056 * Create a copy of 'this' instruction that is identical in all ways
4057 * except the following:
4058 * * The instruction has no parent
4059 * * The instruction has no name
4060 *
4061 * @see llvm::Instruction::clone()
4062 */
4064
4065/**
4066 * Determine whether an instruction is a terminator. This routine is named to
4067 * be compatible with historical functions that did this by querying the
4068 * underlying C++ type.
4069 *
4070 * @see llvm::Instruction::isTerminator()
4071 */
4073
4074/**
4075 * Obtain the first debug record attached to an instruction.
4076 *
4077 * Use LLVMGetNextDbgRecord() and LLVMGetPreviousDbgRecord() to traverse the
4078 * sequence of DbgRecords.
4079 *
4080 * Return the first DbgRecord attached to Inst or NULL if there are none.
4081 *
4082 * @see llvm::Instruction::getDbgRecordRange()
4083 */
4085
4086/**
4087 * Obtain the last debug record attached to an instruction.
4088 *
4089 * Return the last DbgRecord attached to Inst or NULL if there are none.
4090 *
4091 * @see llvm::Instruction::getDbgRecordRange()
4092 */
4094
4095/**
4096 * Obtain the next DbgRecord in the sequence or NULL if there are no more.
4097 *
4098 * @see llvm::Instruction::getDbgRecordRange()
4099 */
4101
4102/**
4103 * Obtain the previous DbgRecord in the sequence or NULL if there are no more.
4104 *
4105 * @see llvm::Instruction::getDbgRecordRange()
4106 */
4109
4110/**
4111 * Get the debug location attached to the debug record.
4112 *
4113 * @see llvm::DbgRecord::getDebugLoc()
4114 */
4116
4118
4119/**
4120 * Get the value of the DbgVariableRecord.
4121 *
4122 * @see llvm::DbgVariableRecord::getValue()
4123 */
4125 unsigned OpIdx);
4126
4127/**
4128 * Get the debug info variable of the DbgVariableRecord.
4129 *
4130 * @see llvm::DbgVariableRecord::getVariable()
4131 */
4134
4135/**
4136 * Get the debug info expression of the DbgVariableRecord.
4137 *
4138 * @see llvm::DbgVariableRecord::getExpression()
4139 */
4142
4143/**
4144 * @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations
4145 *
4146 * Functions in this group apply to instructions that refer to call
4147 * sites and invocations. These correspond to C++ types in the
4148 * llvm::CallInst class tree.
4149 *
4150 * @{
4151 */
4152
4153/**
4154 * Obtain the argument count for a call instruction.
4155 *
4156 * This expects an LLVMValueRef that corresponds to a llvm::CallInst,
4157 * llvm::InvokeInst, or llvm:FuncletPadInst.
4158 *
4159 * @see llvm::CallInst::getNumArgOperands()
4160 * @see llvm::InvokeInst::getNumArgOperands()
4161 * @see llvm::FuncletPadInst::getNumArgOperands()
4162 */
4164
4165/**
4166 * Set the calling convention for a call instruction.
4167 *
4168 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4169 * llvm::InvokeInst.
4170 *
4171 * @see llvm::CallInst::setCallingConv()
4172 * @see llvm::InvokeInst::setCallingConv()
4173 */
4174LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
4175
4176/**
4177 * Obtain the calling convention for a call instruction.
4178 *
4179 * This is the opposite of LLVMSetInstructionCallConv(). Reads its
4180 * usage.
4181 *
4182 * @see LLVMSetInstructionCallConv()
4183 */
4185
4188 unsigned Align);
4189
4193 LLVMAttributeIndex Idx);
4196 LLVMAttributeRef *Attrs);
4199 unsigned KindID);
4201 LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
4204 unsigned KindID);
4207 const char *K, unsigned KLen);
4208
4209/**
4210 * Obtain the function type called by this instruction.
4211 *
4212 * @see llvm::CallBase::getFunctionType()
4213 */
4215
4216/**
4217 * Obtain the pointer to the function invoked by this instruction.
4218 *
4219 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4220 * llvm::InvokeInst.
4221 *
4222 * @see llvm::CallInst::getCalledOperand()
4223 * @see llvm::InvokeInst::getCalledOperand()
4224 */
4226
4227/**
4228 * Obtain the number of operand bundles attached to this instruction.
4229 *
4230 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4231 *
4232 * @see llvm::CallBase::getNumOperandBundles()
4233 */
4235
4236/**
4237 * Obtain the operand bundle attached to this instruction at the given index.
4238 * Use LLVMDisposeOperandBundle to free the operand bundle.
4239 *
4240 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4241 */
4243 unsigned Index);
4244
4245/**
4246 * Obtain whether a call instruction is a tail call.
4247 *
4248 * This only works on llvm::CallInst instructions.
4249 *
4250 * @see llvm::CallInst::isTailCall()
4251 */
4253
4254/**
4255 * Set whether a call instruction is a tail call.
4256 *
4257 * This only works on llvm::CallInst instructions.
4258 *
4259 * @see llvm::CallInst::setTailCall()
4260 */
4261LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall);
4262
4263/**
4264 * Obtain a tail call kind of the call instruction.
4265 *
4266 * @see llvm::CallInst::setTailCallKind()
4267 */
4269
4270/**
4271 * Set the call kind of the call instruction.
4272 *
4273 * @see llvm::CallInst::getTailCallKind()
4274 */
4276 LLVMTailCallKind kind);
4277
4278/**
4279 * Return the normal destination basic block.
4280 *
4281 * This only works on llvm::InvokeInst instructions.
4282 *
4283 * @see llvm::InvokeInst::getNormalDest()
4284 */
4286
4287/**
4288 * Return the unwind destination basic block.
4289 *
4290 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4291 * llvm::CatchSwitchInst instructions.
4292 *
4293 * @see llvm::InvokeInst::getUnwindDest()
4294 * @see llvm::CleanupReturnInst::getUnwindDest()
4295 * @see llvm::CatchSwitchInst::getUnwindDest()
4296 */
4298
4299/**
4300 * Set the normal destination basic block.
4301 *
4302 * This only works on llvm::InvokeInst instructions.
4303 *
4304 * @see llvm::InvokeInst::setNormalDest()
4305 */
4307
4308/**
4309 * Set the unwind destination basic block.
4310 *
4311 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4312 * llvm::CatchSwitchInst instructions.
4313 *
4314 * @see llvm::InvokeInst::setUnwindDest()
4315 * @see llvm::CleanupReturnInst::setUnwindDest()
4316 * @see llvm::CatchSwitchInst::setUnwindDest()
4317 */
4319
4320/**
4321 * Get the default destination of a CallBr instruction.
4322 *
4323 * @see llvm::CallBrInst::getDefaultDest()
4324 */
4326
4327/**
4328 * Get the number of indirect destinations of a CallBr instruction.
4329 *
4330 * @see llvm::CallBrInst::getNumIndirectDests()
4331
4332 */
4334
4335/**
4336 * Get the indirect destination of a CallBr instruction at the given index.
4337 *
4338 * @see llvm::CallBrInst::getIndirectDest()
4339 */
4341 unsigned Idx);
4342
4343/**
4344 * @}
4345 */
4346
4347/**
4348 * @defgroup LLVMCCoreValueInstructionTerminator Terminators
4349 *
4350 * Functions in this group only apply to instructions for which
4351 * LLVMIsATerminatorInst returns true.
4352 *
4353 * @{
4354 */
4355
4356/**
4357 * Return the number of successors that this terminator has.
4358 *
4359 * @see llvm::Instruction::getNumSuccessors
4360 */
4362
4363/**
4364 * Return the specified successor.
4365 *
4366 * @see llvm::Instruction::getSuccessor
4367 */
4369
4370/**
4371 * Update the specified successor to point at the provided block.
4372 *
4373 * @see llvm::Instruction::setSuccessor
4374 */
4375LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i,
4377
4378/**
4379 * Return if an instruction is a conditional branch.
4380 *
4381 * Deprecated: Use LLVMIsACondBrInst instead.
4382 */
4384
4385/**
4386 * Return the condition of a branch instruction.
4387 *
4388 * This only works on llvm::CondBrInst instructions.
4389 *
4390 * @see llvm::CondBrInst::getCondition
4391 */
4393
4394/**
4395 * Set the condition of a branch instruction.
4396 *
4397 * This only works on llvm::CondBrInst instructions.
4398 *
4399 * @see llvm::CondBrInst::setCondition
4400 */
4402
4403/**
4404 * Obtain the default destination basic block of a switch instruction.
4405 *
4406 * This only works on llvm::SwitchInst instructions.
4407 *
4408 * @see llvm::SwitchInst::getDefaultDest()
4409 */
4411
4412/**
4413 * Obtain the case value for a successor of a switch instruction. i corresponds
4414 * to the successor index. The first successor is the default destination, so i
4415 * must be greater than zero.
4416 *
4417 * This only works on llvm::SwitchInst instructions.
4418 *
4419 * @see llvm::SwitchInst::CaseHandle::getCaseValue()
4420 */
4422 unsigned i);
4423
4424/**
4425 * Set the case value for a successor of a switch instruction. i corresponds to
4426 * the successor index. The first successor is the default destination, so i
4427 * must be greater than zero.
4428 *
4429 * This only works on llvm::SwitchInst instructions.
4430 *
4431 * @see llvm::SwitchInst::CaseHandle::setValue()
4432 */
4433LLVM_C_ABI void LLVMSetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i,
4434 LLVMValueRef CaseValue);
4435
4436/**
4437 * @}
4438 */
4439
4440/**
4441 * @defgroup LLVMCCoreValueInstructionAlloca Allocas
4442 *
4443 * Functions in this group only apply to instructions that map to
4444 * llvm::AllocaInst instances.
4445 *
4446 * @{
4447 */
4448
4449/**
4450 * Obtain the type that is being allocated by the alloca instruction.
4451 */
4453
4454/**
4455 * @}
4456 */
4457
4458/**
4459 * @defgroup LLVMCCoreValueInstructionGetElementPointer GEPs
4460 *
4461 * Functions in this group only apply to instructions that map to
4462 * llvm::GetElementPtrInst instances.
4463 *
4464 * @{
4465 */
4466
4467/**
4468 * Check whether the given GEP operator is inbounds.
4469 */
4471
4472/**
4473 * Set the given GEP instruction to be inbounds or not.
4474 */
4476
4477/**
4478 * Get the source element type of the given GEP operator.
4479 */
4481
4482/**
4483 * Get the no-wrap related flags for the given GEP instruction.
4484 *
4485 * @see llvm::GetElementPtrInst::getNoWrapFlags
4486 */
4488
4489/**
4490 * Set the no-wrap related flags for the given GEP instruction.
4491 *
4492 * @see llvm::GetElementPtrInst::setNoWrapFlags
4493 */
4495 LLVMGEPNoWrapFlags NoWrapFlags);
4496
4497/**
4498 * @}
4499 */
4500
4501/**
4502 * @defgroup LLVMCCoreValueInstructionPHINode PHI Nodes
4503 *
4504 * Functions in this group only apply to instructions that map to
4505 * llvm::PHINode instances.
4506 *
4507 * @{
4508 */
4509
4510/**
4511 * Add an incoming value to the end of a PHI list.
4512 */
4514 LLVMValueRef *IncomingValues,
4515 LLVMBasicBlockRef *IncomingBlocks,
4516 unsigned Count);
4517
4518/**
4519 * Obtain the number of incoming basic blocks to a PHI node.
4520 */
4521LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode);
4522
4523/**
4524 * Obtain an incoming value to a PHI node as an LLVMValueRef.
4525 */
4527 unsigned Index);
4528
4529/**
4530 * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
4531 */
4533 unsigned Index);
4534
4535/**
4536 * @}
4537 */
4538
4539/**
4540 * @defgroup LLVMCCoreValueInstructionExtractValue ExtractValue
4541 * @defgroup LLVMCCoreValueInstructionInsertValue InsertValue
4542 *
4543 * Functions in this group only apply to instructions that map to
4544 * llvm::ExtractValue and llvm::InsertValue instances.
4545 *
4546 * @{
4547 */
4548
4549/**
4550 * Obtain the number of indices.
4551 * NB: This also works on GEP operators.
4552 */
4554
4555/**
4556 * Obtain the indices as an array.
4557 */
4559
4560/**
4561 * @}
4562 */
4563
4564/**
4565 * @}
4566 */
4567
4568/**
4569 * @}
4570 */
4571
4572/**
4573 * @defgroup LLVMCCoreInstructionBuilder Instruction Builders
4574 *
4575 * An instruction builder represents a point within a basic block and is
4576 * the exclusive means of building instructions using the C interface.
4577 *
4578 * @{
4579 */
4580
4584 "Use of the global context is deprecated, use "
4585 "LLVMCreateBuilderInContext instead");
4586/**
4587 * Set the builder position before Instr but after any attached debug records,
4588 * or if Instr is null set the position to the end of Block.
4589 */
4591 LLVMBasicBlockRef Block,
4592 LLVMValueRef Instr);
4593/**
4594 * Set the builder position before Instr and any attached debug records,
4595 * or if Instr is null set the position to the end of Block.
4596 */
4598 LLVMBasicBlockRef Block,
4599 LLVMValueRef Inst);
4600/**
4601 * Set the builder position before Instr but after any attached debug records.
4602 */
4604 LLVMValueRef Instr);
4605/**
4606 * Set the builder position before Instr and any attached debug records.
4607 */
4608LLVM_C_ABI void
4610 LLVMValueRef Instr);
4612 LLVMBasicBlockRef Block);
4616 LLVMValueRef Instr);
4618 LLVMValueRef Instr,
4619 const char *Name);
4621
4622/* Metadata */
4623
4624/**
4625 * Get location information used by debugging information.
4626 *
4627 * @see llvm::IRBuilder::getCurrentDebugLocation()
4628 */
4630
4631/**
4632 * Set location information used by debugging information.
4633 *
4634 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
4635 *
4636 * @see llvm::IRBuilder::SetCurrentDebugLocation()
4637 */
4639 LLVMMetadataRef Loc);
4640
4641/**
4642 * Attempts to set the debug location for the given instruction using the
4643 * current debug location for the given builder. If the builder has no current
4644 * debug location, this function is a no-op.
4645 *
4646 * @deprecated LLVMSetInstDebugLocation is deprecated in favor of the more general
4647 * LLVMAddMetadataToInst.
4648 *
4649 * @see llvm::IRBuilder::SetInstDebugLocation()
4650 */
4652 LLVMValueRef Inst);
4653
4654/**
4655 * Adds the metadata registered with the given builder to the given instruction.
4656 *
4657 * @see llvm::IRBuilder::AddMetadataToInst()
4658 */
4660 LLVMValueRef Inst);
4661
4662/**
4663 * Get the dafult floating-point math metadata for a given builder.
4664 *
4665 * @see llvm::IRBuilder::getDefaultFPMathTag()
4666 */
4669
4670/**
4671 * Set the default floating-point math metadata for the given builder.
4672 *
4673 * To clear the metadata, pass NULL to \p FPMathTag.
4674 *
4675 * @see llvm::IRBuilder::setDefaultFPMathTag()
4676 */
4678 LLVMMetadataRef FPMathTag);
4679
4680/**
4681 * Obtain the context to which this builder is associated.
4682 *
4683 * @see llvm::IRBuilder::getContext()
4684 */
4686
4687/**
4688 * Deprecated: Passing the NULL location will crash.
4689 * Use LLVMGetCurrentDebugLocation2 instead.
4690 */
4692 LLVMValueRef L);
4693/**
4694 * Deprecated: Returning the NULL location will crash.
4695 * Use LLVMGetCurrentDebugLocation2 instead.
4696 */
4698
4699/* Terminators */
4703 LLVMValueRef *RetVals,
4704 unsigned N);
4707 LLVMBasicBlockRef Then,
4708 LLVMBasicBlockRef Else);
4710 LLVMBasicBlockRef Else,
4711 unsigned NumCases);
4713 unsigned NumDests);
4716 LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests,
4717 unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs,
4718 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4720 LLVMValueRef Fn, LLVMValueRef *Args,
4721 unsigned NumArgs,
4722 LLVMBasicBlockRef Then,
4723 LLVMBasicBlockRef Catch,
4724 const char *Name);
4727 unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
4728 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4730
4731/* Exception Handling */
4734 LLVMValueRef PersFn,
4735 unsigned NumClauses,
4736 const char *Name);
4738 LLVMValueRef CatchPad,
4741 LLVMValueRef CatchPad,
4744 LLVMValueRef ParentPad,
4745 LLVMValueRef *Args, unsigned NumArgs,
4746 const char *Name);
4748 LLVMValueRef ParentPad,
4749 LLVMValueRef *Args,
4750 unsigned NumArgs, const char *Name);
4752 LLVMValueRef ParentPad,
4753 LLVMBasicBlockRef UnwindBB,
4754 unsigned NumHandlers,
4755 const char *Name);
4756
4757/* Add a case to the switch instruction */
4759 LLVMBasicBlockRef Dest);
4760
4761/* Add a destination to the indirectbr instruction */
4763 LLVMBasicBlockRef Dest);
4764
4765/* Get the number of clauses on the landingpad instruction */
4766LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
4767
4768/* Get the value of the clause at index Idx on the landingpad instruction */
4769LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
4770
4771/* Add a catch or filter clause to the landingpad instruction */
4772LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal);
4773
4774/* Get the 'cleanup' flag in the landingpad instruction */
4776
4777/* Set the 'cleanup' flag in the landingpad instruction */
4778LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val);
4779
4780/* Add a destination to the catchswitch instruction */
4781LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch,
4782 LLVMBasicBlockRef Dest);
4783
4784/* Get the number of handlers on the catchswitch instruction */
4785LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch);
4786
4787/**
4788 * Obtain the basic blocks acting as handlers for a catchswitch instruction.
4789 *
4790 * The Handlers parameter should point to a pre-allocated array of
4791 * LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the
4792 * first LLVMGetNumHandlers() entries in the array will be populated
4793 * with LLVMBasicBlockRef instances.
4794 *
4795 * @param CatchSwitch The catchswitch instruction to operate on.
4796 * @param Handlers Memory address of an array to be filled with basic blocks.
4797 */
4798LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch,
4799 LLVMBasicBlockRef *Handlers);
4800
4801/* Funclets */
4802
4803/* Get the number of funcletpad arguments. */
4805
4806/* Set a funcletpad argument at the given index. */
4807LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i,
4808 LLVMValueRef value);
4809
4810/**
4811 * Get the parent catchswitch instruction of a catchpad instruction.
4812 *
4813 * This only works on llvm::CatchPadInst instructions.
4814 *
4815 * @see llvm::CatchPadInst::getCatchSwitch()
4816 */
4818
4819/**
4820 * Set the parent catchswitch instruction of a catchpad instruction.
4821 *
4822 * This only works on llvm::CatchPadInst instructions.
4823 *
4824 * @see llvm::CatchPadInst::setCatchSwitch()
4825 */
4827 LLVMValueRef CatchSwitch);
4828
4829/* Arithmetic */
4831 LLVMValueRef RHS, const char *Name);
4833 LLVMValueRef RHS, const char *Name);
4835 LLVMValueRef RHS, const char *Name);
4837 LLVMValueRef RHS, const char *Name);
4839 LLVMValueRef RHS, const char *Name);
4841 LLVMValueRef RHS, const char *Name);
4843 LLVMValueRef RHS, const char *Name);
4845 LLVMValueRef RHS, const char *Name);
4847 LLVMValueRef RHS, const char *Name);
4849 LLVMValueRef RHS, const char *Name);
4851 LLVMValueRef RHS, const char *Name);
4853 LLVMValueRef RHS, const char *Name);
4855 LLVMValueRef RHS, const char *Name);
4857 LLVMValueRef RHS, const char *Name);
4859 LLVMValueRef RHS, const char *Name);
4861 LLVMValueRef RHS, const char *Name);
4863 LLVMValueRef RHS, const char *Name);
4865 LLVMValueRef RHS, const char *Name);
4867 LLVMValueRef RHS, const char *Name);
4869 LLVMValueRef RHS, const char *Name);
4871 LLVMValueRef RHS, const char *Name);
4873 LLVMValueRef RHS, const char *Name);
4875 LLVMValueRef RHS, const char *Name);
4877 LLVMValueRef RHS, const char *Name);
4879 LLVMValueRef RHS, const char *Name);
4881 LLVMValueRef RHS, const char *Name);
4884 const char *Name);
4886 const char *Name);
4888 const char *Name);
4891 const char *Name),
4892 "Use LLVMBuildNeg + LLVMSetNUW instead.");
4894 const char *Name);
4896 const char *Name);
4897
4899LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW);
4901LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
4903LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact);
4904
4905/**
4906 * Gets if the instruction has the non-negative flag set.
4907 * Only valid for zext instructions.
4908 */
4910/**
4911 * Sets the non-negative flag for the instruction.
4912 * Only valid for zext instructions.
4913 */
4914LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg);
4915
4916/**
4917 * Get the flags for which fast-math-style optimizations are allowed for this
4918 * value.
4919 *
4920 * Only valid on floating point instructions.
4921 * @see LLVMCanValueUseFastMathFlags
4922 */
4924
4925/**
4926 * Sets the flags for which fast-math-style optimizations are allowed for this
4927 * value.
4928 *
4929 * Only valid on floating point instructions.
4930 * @see LLVMCanValueUseFastMathFlags
4931 */
4933 LLVMFastMathFlags FMF);
4934
4935/**
4936 * Check if a given value can potentially have fast math flags.
4937 *
4938 * Will return true for floating point arithmetic instructions, and for select,
4939 * phi, and call instructions whose type is a floating point type, or a vector
4940 * or array thereof. See https://llvm.org/docs/LangRef.html#fast-math-flags
4941 */
4943
4944/**
4945 * Gets whether the instruction has the disjoint flag set.
4946 * Only valid for or instructions.
4947 */
4949/**
4950 * Sets the disjoint flag for the instruction.
4951 * Only valid for or instructions.
4952 */
4953LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint);
4954
4955/* Memory */
4957 const char *Name);
4959 LLVMValueRef Val,
4960 const char *Name);
4961
4962/**
4963 * Creates and inserts a memset to the specified pointer and the
4964 * specified value.
4965 *
4966 * @see llvm::IRRBuilder::CreateMemSet()
4967 */
4969 LLVMValueRef Val, LLVMValueRef Len,
4970 unsigned Align);
4971/**
4972 * Creates and inserts a memcpy between the specified pointers.
4973 *
4974 * @see llvm::IRRBuilder::CreateMemCpy()
4975 */
4977 unsigned DstAlign, LLVMValueRef Src,
4978 unsigned SrcAlign, LLVMValueRef Size);
4979/**
4980 * Creates and inserts a memmove between the specified pointers.
4981 *
4982 * @see llvm::IRRBuilder::CreateMemMove()
4983 */
4985 unsigned DstAlign, LLVMValueRef Src,
4986 unsigned SrcAlign, LLVMValueRef Size);
4987
4989 const char *Name);
4991 LLVMValueRef Val,
4992 const char *Name);
4995 LLVMValueRef PointerVal,
4996 const char *Name);
4998 LLVMValueRef Ptr);
5000 LLVMValueRef Pointer,
5001 LLVMValueRef *Indices,
5002 unsigned NumIndices, const char *Name);
5004 LLVMValueRef Pointer,
5005 LLVMValueRef *Indices,
5006 unsigned NumIndices,
5007 const char *Name);
5008/**
5009 * Creates a GetElementPtr instruction. Similar to LLVMBuildGEP2, but allows
5010 * specifying the no-wrap flags.
5011 *
5012 * @see llvm::IRBuilder::CreateGEP()
5013 */
5016 LLVMValueRef *Indices, unsigned NumIndices, const char *Name,
5017 LLVMGEPNoWrapFlags NoWrapFlags);
5019 LLVMValueRef Pointer, unsigned Idx,
5020 const char *Name);
5022 const char *Name);
5023/**
5024 * Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
5025 */
5027 const char *Str,
5028 const char *Name);
5030LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst,
5031 LLVMBool IsVolatile);
5033LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
5035LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst,
5036 LLVMAtomicOrdering Ordering);
5039 LLVMAtomicRMWBinOp BinOp);
5040
5041/* Casts */
5043 LLVMTypeRef DestTy, const char *Name);
5045 LLVMTypeRef DestTy, const char *Name);
5047 LLVMTypeRef DestTy, const char *Name);
5049 LLVMTypeRef DestTy, const char *Name);
5051 LLVMTypeRef DestTy, const char *Name);
5053 LLVMTypeRef DestTy, const char *Name);
5055 LLVMTypeRef DestTy, const char *Name);
5057 LLVMTypeRef DestTy, const char *Name);
5059 LLVMTypeRef DestTy, const char *Name);
5061 LLVMTypeRef DestTy, const char *Name);
5063 LLVMTypeRef DestTy, const char *Name);
5065 LLVMTypeRef DestTy, const char *Name);
5067 LLVMTypeRef DestTy,
5068 const char *Name);
5070 LLVMTypeRef DestTy,
5071 const char *Name);
5073 LLVMTypeRef DestTy,
5074 const char *Name);
5076 LLVMValueRef Val,
5077 LLVMTypeRef DestTy,
5078 const char *Name);
5080 LLVMValueRef Val, LLVMTypeRef DestTy,
5081 const char *Name);
5083 LLVMTypeRef DestTy,
5084 const char *Name);
5086 LLVMTypeRef DestTy, LLVMBool IsSigned,
5087 const char *Name);
5089 LLVMTypeRef DestTy, const char *Name);
5090
5091/** Deprecated: This cast is always signed. Use LLVMBuildIntCast2 instead. */
5093 LLVMValueRef Val, /*Signed cast!*/
5094 LLVMTypeRef DestTy, const char *Name);
5095
5097 LLVMTypeRef DestTy,
5098 LLVMBool DestIsSigned);
5099
5100/* Comparisons */
5103 const char *Name);
5106 const char *Name);
5107
5108/* Miscellaneous instructions */
5110 const char *Name);
5112 LLVMValueRef Fn, LLVMValueRef *Args,
5113 unsigned NumArgs, const char *Name);
5116 unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles,
5117 const char *Name);
5119 LLVMValueRef Then, LLVMValueRef Else,
5120 const char *Name);
5122 LLVMTypeRef Ty, const char *Name);
5124 LLVMValueRef VecVal,
5125 LLVMValueRef Index,
5126 const char *Name);
5128 LLVMValueRef VecVal,
5129 LLVMValueRef EltVal,
5130 LLVMValueRef Index,
5131 const char *Name);
5133 LLVMValueRef V2,
5134 LLVMValueRef Mask,
5135 const char *Name);
5137 LLVMValueRef AggVal,
5138 unsigned Index, const char *Name);
5140 LLVMValueRef AggVal,
5141 LLVMValueRef EltVal,
5142 unsigned Index, const char *Name);
5144 const char *Name);
5145
5147 const char *Name);
5149 const char *Name);
5152 const char *Name);
5154 LLVMAtomicOrdering ordering,
5155 LLVMBool singleThread, const char *Name);
5157 LLVMAtomicOrdering ordering,
5158 unsigned SSID,
5159 const char *Name);
5162 LLVMValueRef PTR, LLVMValueRef Val,
5163 LLVMAtomicOrdering ordering,
5164 LLVMBool singleThread);
5167 LLVMAtomicOrdering ordering, unsigned SSID);
5170 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5174 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5175 unsigned SSID);
5176
5177/**
5178 * Get the number of elements in the mask of a ShuffleVector instruction.
5179 */
5180LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
5181
5182/**
5183 * \returns a constant that specifies that the result of a \c ShuffleVectorInst
5184 * is undefined.
5185 */
5187
5188/**
5189 * Get the mask value at position Elt in the mask of a ShuffleVector
5190 * instruction.
5191 *
5192 * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is
5193 * poison at that position.
5194 */
5195LLVM_C_ABI int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
5196
5200
5201/**
5202 * Returns whether an instruction is an atomic instruction, e.g., atomicrmw,
5203 * cmpxchg, fence, or loads and stores with atomic ordering.
5204 */
5206
5207/**
5208 * Returns the synchronization scope ID of an atomic instruction.
5209 */
5211
5212/**
5213 * Sets the synchronization scope ID of an atomic instruction.
5214 */
5216 unsigned SSID);
5217
5221 LLVMAtomicOrdering Ordering);
5225 LLVMAtomicOrdering Ordering);
5226
5227/**
5228 * @}
5229 */
5230
5231/**
5232 * @defgroup LLVMCCoreModuleProvider Module Providers
5233 *
5234 * @{
5235 */
5236
5237/**
5238 * Changes the type of M so it can be passed to FunctionPassManagers and the
5239 * JIT. They take ModuleProviders for historical reasons.
5240 */
5243
5244/**
5245 * Destroys the module M.
5246 */
5248
5249/**
5250 * @}
5251 */
5252
5253/**
5254 * @defgroup LLVMCCoreMemoryBuffers Memory Buffers
5255 *
5256 * @{
5257 */
5258
5260 const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5262 LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5264 const char *InputData, size_t InputDataLength, const char *BufferName,
5265 LLVMBool RequiresNullTerminator);
5267 const char *InputData, size_t InputDataLength, const char *BufferName);
5271
5272/**
5273 * @}
5274 */
5275
5276/**
5277 * @defgroup LLVMCCorePassManagers Pass Managers
5278 * @ingroup LLVMCCore
5279 *
5280 * @{
5281 */
5282
5283/** Constructs a new whole-module pass pipeline. This type of pipeline is
5284 suitable for link-time optimization and whole-module transformations.
5285 @see llvm::PassManager::PassManager */
5287
5288/** Constructs a new function-by-function pass pipeline over the module
5289 provider. It does not take ownership of the module provider. This type of
5290 pipeline is suitable for code generation and JIT compilation tasks.
5291 @see llvm::FunctionPassManager::FunctionPassManager */
5294
5295/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */
5298
5299/** Initializes, executes on the provided module, and finalizes all of the
5300 passes scheduled in the pass manager. Returns 1 if any of the passes
5301 modified the module, 0 otherwise.
5302 @see llvm::PassManager::run(Module&) */
5304
5305/** Initializes all of the function passes scheduled in the function pass
5306 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5307 @see llvm::FunctionPassManager::doInitialization */
5309
5310/** Executes all of the function passes scheduled in the function pass manager
5311 on the provided function. Returns 1 if any of the passes modified the
5312 function, false otherwise.
5313 @see llvm::FunctionPassManager::run(Function&) */
5315 LLVMValueRef F);
5316
5317/** Finalizes all of the function passes scheduled in the function pass
5318 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5319 @see llvm::FunctionPassManager::doFinalization */
5321
5322/** Frees the memory of a pass pipeline. For function pipelines, does not free
5323 the module provider.
5324 @see llvm::PassManagerBase::~PassManagerBase. */
5326
5327/**
5328 * @}
5329 */
5330
5331/**
5332 * @defgroup LLVMCCoreThreading Threading
5333 *
5334 * Handle the structures needed to make LLVM safe for multithreading.
5335 *
5336 * @{
5337 */
5338
5339/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5340 time define LLVM_ENABLE_THREADS. This function always returns
5341 LLVMIsMultithreaded(). */
5343
5344/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5345 time define LLVM_ENABLE_THREADS. */
5347
5348/** Check whether LLVM is executing in thread-safe mode or not.
5349 @see llvm::llvm_is_multithreaded */
5351
5352/**
5353 * @}
5354 */
5355
5356/**
5357 * @}
5358 */
5359
5360/**
5361 * @}
5362 */
5363
5365
5366#endif /* LLVM_C_CORE_H */
aarch64 promote const
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:779
LLVMValueRef LLVMGetElementAsConstant(LLVMValueRef C, unsigned idx)
Definition Core.cpp:1701
LLVMTypeRef LLVMInt64Type(void)
Definition Core.cpp:723
LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Definition Core.cpp:1748
LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef FnRef, const char *Name)
Definition Core.cpp:2956
LLVMTypeRef LLVMVoidType(void)
Definition Core.cpp:982
LLVMValueRef LLVMMDString(const char *Str, unsigned SLen)
Definition Core.cpp:1328
LLVMTypeRef LLVMBFloatType(void)
Definition Core.cpp:767
LLVMTypeRef LLVMInt32Type(void)
Definition Core.cpp:720
LLVMTypeRef LLVMHalfType(void)
Definition Core.cpp:764
LLVMTypeRef LLVMIntType(unsigned NumBits)
Definition Core.cpp:729
LLVMTypeRef LLVMX86AMXType(void)
Definition Core.cpp:785
LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Definition Core.cpp:824
LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID)
Definition Core.cpp:295
LLVMTypeRef LLVMX86FP80Type(void)
Definition Core.cpp:776
LLVMBasicBlockRef LLVMInsertBasicBlock(LLVMBasicBlockRef BBRef, const char *Name)
Definition Core.cpp:2967
LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3907
LLVMTypeRef LLVMPPCFP128Type(void)
Definition Core.cpp:782
LLVMTypeRef LLVMFloatType(void)
Definition Core.cpp:770
LLVMTypeRef LLVMLabelType(void)
Definition Core.cpp:985
LLVMValueRef LLVMConstString(const char *Str, unsigned Length, LLVMBool DontNullTerminate)
Definition Core.cpp:1691
unsigned LLVMGetMDKindID(const char *Name, unsigned SLen)
Definition Core.cpp:152
LLVMTypeRef LLVMInt8Type(void)
Definition Core.cpp:714
LLVMTypeRef LLVMDoubleType(void)
Definition Core.cpp:773
LLVMTypeRef LLVMInt1Type(void)
Definition Core.cpp:711
LLVMBuilderRef LLVMCreateBuilder(void)
Definition Core.cpp:3417
LLVMTypeRef LLVMInt128Type(void)
Definition Core.cpp:726
LLVMValueRef LLVMIsABranchInst(LLVMValueRef Val)
Definition Core.cpp:1174
LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1847
LLVMTypeRef LLVMInt16Type(void)
Definition Core.cpp:717
LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count)
Definition Core.cpp:1359
LLVMContextRef LLVMGetGlobalContext()
Definition Core.cpp:108
static cl::opt< bool > SingleThread("licm-force-thread-model-single", cl::Hidden, cl::init(false), cl::desc("Force thread model single in LICM pass"))
#define F(x, y, z)
Definition MD5.cpp:54
MachineInstr unsigned OpIdx
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:880
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:3537
LLVM_C_ABI LLVMValueRef LLVMBuildMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3801
LLVM_C_ABI LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef)
Definition Core.cpp:3529
LLVM_C_ABI LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3781
LLVM_C_ABI LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3811
LLVM_C_ABI LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4240
LLVM_C_ABI LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4368
LLVM_C_ABI LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4497
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:4198
LLVM_C_ABI LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3761
LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak)
Definition Core.cpp:4244
LLVM_C_ABI LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3881
LLVM_C_ABI LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4340
LLVM_C_ABI LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3826
LLVM_C_ABI LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4183
LLVM_C_ABI LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3786
LLVM_C_ABI void LLVMPositionBuilderBeforeInstrAndDbgRecords(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr and any attached debug records.
Definition Core.cpp:3446
LLVM_C_ABI LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4502
LLVM_C_ABI void LLVMDisposeBuilder(LLVMBuilderRef Builder)
Definition Core.cpp:3474
LLVM_C_ABI void LLVMClearInsertionPosition(LLVMBuilderRef Builder)
Definition Core.cpp:3461
LLVM_C_ABI LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)
Definition Core.cpp:3603
LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint)
Sets the disjoint flag for the instruction.
Definition Core.cpp:3984
LLVM_C_ABI LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst)
Definition Core.cpp:4580
LLVM_C_ABI LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn)
Definition Core.cpp:3633
LLVM_C_ABI void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp)
Definition Core.cpp:4279
LLVM_C_ABI LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3841
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:3589
LLVM_C_ABI LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3886
LLVM_C_ABI LLVMBool LLVMGetExact(LLVMValueRef DivOrShrInst)
Definition Core.cpp:3943
LLVM_C_ABI LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4345
LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst)
Get the number of elements in the mask of a ShuffleVector instruction.
Definition Core.cpp:4562
LLVM_C_ABI void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr)
Definition Core.cpp:3465
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3654
LLVM_C_ABI LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4305
LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers)
Obtain the basic blocks acting as handlers for a catchswitch instruction.
Definition Core.cpp:3701
LLVM_C_ABI LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4285
LLVM_C_ABI LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned i)
Definition Core.cpp:3718
LLVM_C_ABI LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3876
LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch)
Definition Core.cpp:3697
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:3561
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder)
Definition Core.cpp:3457
LLVM_C_ABI LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3831
LLVM_C_ABI LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4356
LLVM_C_ABI LLVMValueRef LLVMBuildCall2(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:4425
LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW)
Definition Core.cpp:3938
LLVM_C_ABI LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder)
Get location information used by debugging information.
Definition Core.cpp:3480
LLVM_C_ABI LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3821
LLVM_C_ABI LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)
Definition Core.cpp:4448
LLVM_C_ABI void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records.
Definition Core.cpp:3441
LLVM_C_ABI LLVMBool LLVMCanValueUseFastMathFlags(LLVMValueRef Inst)
Check if a given value can potentially have fast math flags.
Definition Core.cpp:3974
LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i, LLVMValueRef value)
Definition Core.cpp:3722
LLVM_C_ABI LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)
Definition Core.cpp:3546
LLVM_C_ABI LLVMBool LLVMGetNUW(LLVMValueRef ArithInst)
Definition Core.cpp:3923
LLVM_C_ABI LLVMOpcode LLVMGetCastOpcode(LLVMValueRef Src, LLVMBool SrcIsSigned, LLVMTypeRef DestTy, LLVMBool DestIsSigned)
Definition Core.cpp:4397
LLVM_C_ABI void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)
Definition Core.cpp:3469
LLVM_C_ABI LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3851
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3622
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Deprecated: This cast is always signed.
Definition Core.cpp:4386
LLVM_C_ABI LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder)
Deprecated: Returning the NULL location will crash.
Definition Core.cpp:3497
LLVM_C_ABI LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4460
LLVM_C_ABI LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3861
LLVM_C_ABI LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C)
Definition Core.cpp:3413
LLVM_C_ABI LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3648
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:4025
LLVM_C_ABI LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst)
Definition Core.cpp:4248
LLVM_C_ABI LLVMValueRef LLVMBuildStructGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, unsigned Idx, const char *Name)
Definition Core.cpp:4208
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:4568
LLVM_C_ABI void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)
Definition Core.cpp:3664
LLVM_C_ABI LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest)
Definition Core.cpp:3542
LLVM_C_ABI LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4466
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:3434
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:3969
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, LLVMBool IsSigned, const char *Name)
Definition Core.cpp:4379
LLVM_C_ABI LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3791
LLVM_C_ABI LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3776
LLVM_C_ABI LLVMValueRef LLVMBuildCatchPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3615
LLVM_C_ABI LLVMValueRef LLVMBuildCallWithOperandBundles(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
Definition Core.cpp:4434
LLVM_C_ABI LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad)
Definition Core.cpp:3685
LLVM_C_ABI LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4350
LLVM_C_ABI LLVMBool LLVMGetVolatile(LLVMValueRef Inst)
Definition Core.cpp:4225
LLVM_C_ABI LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4392
LLVM_C_ABI LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4330
LLVM_C_ABI LLVMValueRef LLVMBuildPtrDiff2(LLVMBuilderRef, LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4507
LLVM_C_ABI LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4362
LLVM_C_ABI LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4039
LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx)
Definition Core.cpp:3677
LLVM_C_ABI unsigned LLVMGetAtomicSyncScopeID(LLVMValueRef AtomicInst)
Returns the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4599
LLVM_C_ABI LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4455
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchgSyncScope(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, unsigned SSID)
Definition Core.cpp:4551
LLVM_C_ABI LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3891
LLVM_C_ABI LLVMBool LLVMIsAtomic(LLVMValueRef Inst)
Returns whether an instruction is an atomic instruction, e.g., atomicrmw, cmpxchg,...
Definition Core.cpp:4576
LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)
Definition Core.cpp:4229
LLVM_C_ABI void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread)
Definition Core.cpp:4589
LLVM_C_ABI LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3856
LLVM_C_ABI LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3846
LLVM_C_ABI LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4335
LLVM_C_ABI LLVMBool LLVMGetNSW(LLVMValueRef ArithInst)
Definition Core.cpp:3933
LLVM_C_ABI LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3806
LLVM_C_ABI LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal)
Definition Core.cpp:4044
LLVM_C_ABI LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3898
LLVM_C_ABI LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3796
LLVM_C_ABI LLVMValueRef LLVMBuildCatchSwitch(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMBasicBlockRef UnwindBB, unsigned NumHandlers, const char *Name)
Definition Core.cpp:3637
LLVM_C_ABI LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef PointerVal, const char *Name)
Definition Core.cpp:4048
LLVM_C_ABI LLVMValueRef LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4190
LLVM_C_ABI LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4000
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread)
Definition Core.cpp:4538
LLVM_C_ABI LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)
Definition Core.cpp:3556
LLVM_C_ABI LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef)
Definition Core.cpp:3660
LLVM_C_ABI LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4315
LLVM_C_ABI LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4295
LLVM_C_ABI LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4300
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:3503
LLVM_C_ABI void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc)
Set location information used by debugging information.
Definition Core.cpp:3484
LLVM_C_ABI LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4034
LLVM_C_ABI void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L)
Deprecated: Passing the NULL location will crash.
Definition Core.cpp:3491
LLVM_C_ABI LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4421
LLVM_C_ABI void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)
Definition Core.cpp:3669
LLVM_C_ABI LLVMBool LLVMGetNNeg(LLVMValueRef NonNegInst)
Gets if the instruction has the non-negative flag set.
Definition Core.cpp:3953
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMWSyncScope(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, unsigned SSID)
Definition Core.cpp:4527
LLVM_C_ABI LLVMValueRef LLVMBuildRet(LLVMBuilderRef, LLVMValueRef V)
Definition Core.cpp:3533
LLVM_C_ABI LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder)
Get the dafult floating-point math metadata for a given builder.
Definition Core.cpp:3523
LLVM_C_ABI LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef, LLVMValueRef AggVal, unsigned Index, const char *Name)
Definition Core.cpp:4480
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str, const char *Name)
Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
Definition Core.cpp:4220
LLVM_C_ABI LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3766
LLVM_C_ABI void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block)
Definition Core.cpp:3452
LLVM_C_ABI LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3816
LLVM_C_ABI LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3866
LLVM_C_ABI LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst)
Definition Core.cpp:4275
LLVM_C_ABI LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3915
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:4009
LLVM_C_ABI void LLVMSetAtomicSyncScopeID(LLVMValueRef AtomicInst, unsigned SSID)
Sets the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4605
LLVM_C_ABI LLVMContextRef LLVMGetBuilderContext(LLVMBuilderRef Builder)
Obtain the context to which this builder is associated.
Definition Core.cpp:3519
LLVM_C_ABI LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:3991
LLVM_C_ABI LLVMValueRef LLVMBuildFreeze(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4492
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str, const char *Name)
Definition Core.cpp:4215
LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW)
Definition Core.cpp:3928
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4611
LLVM_C_ABI LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4412
LLVM_C_ABI LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4374
LLVM_C_ABI LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3836
LLVM_C_ABI LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)
Definition Core.cpp:4473
LLVM_C_ABI LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4325
LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val)
Definition Core.cpp:3689
LLVM_C_ABI LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4405
LLVM_C_ABI void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4629
LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
Definition Core.cpp:3681
LLVM_C_ABI LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering ordering, LLVMBool singleThread, const char *Name)
Definition Core.cpp:4167
LLVM_C_ABI void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch)
Set the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3711
LLVM_C_ABI LLVMValueRef LLVMBuildFenceSyncScope(LLVMBuilderRef B, LLVMAtomicOrdering ordering, unsigned SSID, const char *Name)
Definition Core.cpp:4176
LLVM_C_ABI LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4310
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:3428
LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad)
Definition Core.cpp:3673
LLVM_C_ABI int LLVMGetUndefMaskElem(void)
Definition Core.cpp:4574
LLVM_C_ABI void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4616
LLVM_C_ABI LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad)
Get the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3707
LLVM_C_ABI LLVMFastMathFlags LLVMGetFastMathFlags(LLVMValueRef FPMathInst)
Get the flags for which fast-math-style optimizations are allowed for this value.
Definition Core.cpp:3963
LLVM_C_ABI LLVMBool LLVMGetIsDisjoint(LLVMValueRef Inst)
Gets whether the instruction has the disjoint flag set.
Definition Core.cpp:3979
LLVM_C_ABI LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)
Definition Core.cpp:3551
LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg)
Sets the non-negative flag for the instruction.
Definition Core.cpp:3958
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:4016
LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest)
Definition Core.cpp:3693
LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact)
Definition Core.cpp:3948
LLVM_C_ABI LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3902
LLVM_C_ABI LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3871
LLVM_C_ABI LLVMValueRef LLVMBuildInvoke2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)
Definition Core.cpp:3580
LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4262
LLVM_C_ABI LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4320
LLVM_C_ABI LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)
Definition Core.cpp:4053
LLVM_C_ABI void LLVMAddMetadataToInst(LLVMBuilderRef Builder, LLVMValueRef Inst)
Adds the metadata registered with the given builder to the given instruction.
Definition Core.cpp:3507
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4624
LLVM_C_ABI LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3771
LLVM_C_ABI LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)
Definition Core.cpp:4485
LLVM_C_ABI void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder, LLVMMetadataRef FPMathTag)
Set the default floating-point math metadata for the given builder.
Definition Core.cpp:3511
LLVM_C_ABI LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4290
LLVM_C_ABI LLVMValueRef LLVMBuildNot(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3919
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)
Definition Core.cpp:4516
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)
Definition Core.cpp:4676
LLVM_C_ABI size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4701
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, size_t InputDataLength, const char *BufferName)
Definition Core.cpp:4687
LLVM_C_ABI const char * LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4697
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4651
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4665
LLVM_C_ABI void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4705
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:4640
LLVM_C_ABI void LLVMDisposeModuleProvider(LLVMModuleProviderRef M)
Destroys the module M.
Definition Core.cpp:4644
LLVM_C_ABI char * LLVMPrintModuleToString(LLVMModuleRef M)
Return a string representation of the module.
Definition Core.cpp:490
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:1430
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:2490
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:1558
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:1425
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:587
LLVM_C_ABI const char * LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len)
Get inline assembly for a module.
Definition Core.cpp:512
LLVM_C_ABI LLVMBool LLVMGetInlineAsmNeedsAlignedStack(LLVMValueRef InlineAsmVal)
Get if the inline asm snippet needs an aligned stack.
Definition Core.cpp:582
LLVM_C_ABI LLVMBool LLVMGetInlineAsmHasSideEffects(LLVMValueRef InlineAsmVal)
Get if the inline asm snippet has side effects.
Definition Core.cpp:577
LLVM_C_ABI unsigned LLVMGetNamedMetadataNumOperands(LLVMModuleRef M, const char *Name)
Obtain the number of operands for named metadata in a module.
Definition Core.cpp:1461
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:572
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:593
LLVM_C_ABI LLVMInlineAsmDialect LLVMGetInlineAsmDialect(LLVMValueRef InlineAsmVal)
Get the dialect used by the inline asm snippet.
Definition Core.cpp:556
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:504
LLVM_C_ABI LLVMValueRef LLVMGetNextFunction(LLVMValueRef Fn)
Advance a Function iterator to the next Function.
Definition Core.cpp:2511
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:876
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:538
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:518
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:2478
LLVM_C_ABI const char * LLVMGetInlineAsmConstraintString(LLVMValueRef InlineAsmVal, size_t *Len)
Get the raw constraint string for an inline assembly snippet.
Definition Core.cpp:547
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetNextNamedMetadata(LLVMNamedMDNodeRef NamedMDNode)
Advance a NamedMDNode iterator to the next NamedMDNode.
Definition Core.cpp:1409
LLVM_C_ABI void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, LLVMValueRef *Dest)
Obtain the named metadata operands for a module.
Definition Core.cpp:1468
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:2472
LLVM_C_ABI LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn)
Decrement a Function iterator to the previous Function.
Definition Core.cpp:2519
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:1488
LLVM_C_ABI void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, LLVMValueRef Val)
Add an operand to named metadata.
Definition Core.cpp:1478
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:1536
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:2503
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NamedMDNode)
Decrement a NamedMDNode iterator to the previous NamedMDNode.
Definition Core.cpp:1417
LLVM_C_ABI const char * LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NamedMD, size_t *NameLen)
Retrieve the name of a NamedMDNode.
Definition Core.cpp:1435
LLVM_C_ABI LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name)
Obtain a Function value from a Module by its name.
Definition Core.cpp:2486
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:1512
LLVM_C_ABI void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm, size_t Len)
Append inline assembly to a module.
Definition Core.cpp:508
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:1401
LLVM_C_ABI void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm, size_t Len)
Set inline assembly for a module.
Definition Core.cpp:500
LLVM_C_ABI LLVMValueRef LLVMGetFirstFunction(LLVMModuleRef M)
Obtain an iterator to the first Function in a Module.
Definition Core.cpp:2495
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata(LLVMModuleRef M)
Obtain an iterator to the first NamedMDNode in a Module.
Definition Core.cpp:1393
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:2834
LLVM_C_ABI unsigned LLVMGetNumOperandBundleArgs(LLVMOperandBundleRef Bundle)
Obtain the number of operands for an operand bundle.
Definition Core.cpp:2851
LLVM_C_ABI const char * LLVMGetOperandBundleTag(LLVMOperandBundleRef Bundle, size_t *Len)
Obtain the tag of an operand bundle as a string.
Definition Core.cpp:2845
LLVM_C_ABI void LLVMDisposeOperandBundle(LLVMOperandBundleRef Bundle)
Destroy an operand bundle.
Definition Core.cpp:2841
LLVM_C_ABI LLVMValueRef LLVMGetOperandBundleArgAtIndex(LLVMOperandBundleRef Bundle, unsigned Index)
Obtain the operand for an operand bundle at the given index.
Definition Core.cpp:2855
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP)
Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
Definition Core.cpp:4719
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M)
Constructs a new function-by-function pass pipeline over the module provider.
Definition Core.cpp:4715
LLVM_C_ABI LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM)
Finalizes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4736
LLVM_C_ABI void LLVMDisposePassManager(LLVMPassManagerRef PM)
Frees the memory of a pass pipeline.
Definition Core.cpp:4740
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:4732
LLVM_C_ABI LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM)
Initializes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4728
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:4724
LLVM_C_ABI LLVMPassManagerRef LLVMCreatePassManager(void)
Constructs a new whole-module pass pipeline.
Definition Core.cpp:4711
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:4750
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:4746
LLVM_C_ABI LLVMBool LLVMIsMultithreaded(void)
Check whether LLVM is executing in thread-safe mode or not.
Definition Core.cpp:4753
LLVM_C_ABI LLVMTypeRef LLVMByteTypeInContext(LLVMContextRef C, unsigned NumBits)
Obtain a byte type from a context with specified bit width.
Definition Core.cpp:679
LLVM_C_ABI unsigned LLVMGetByteTypeWidth(LLVMTypeRef ByteTy)
Definition Core.cpp:683
LLVM_C_ABI LLVMTypeRef LLVMHalfTypeInContext(LLVMContextRef C)
Obtain a 16-bit floating point type from a context.
Definition Core.cpp:739
LLVM_C_ABI LLVMTypeRef LLVMBFloatTypeInContext(LLVMContextRef C)
Obtain a 16-bit brain floating point type from a context.
Definition Core.cpp:742
LLVM_C_ABI LLVMTypeRef LLVMPPCFP128TypeInContext(LLVMContextRef C)
Obtain a 128-bit floating point type (two 64-bits) from a context.
Definition Core.cpp:757
LLVM_C_ABI LLVMTypeRef LLVMDoubleTypeInContext(LLVMContextRef C)
Obtain a 64-bit floating point type from a context.
Definition Core.cpp:748
LLVM_C_ABI LLVMTypeRef LLVMFloatTypeInContext(LLVMContextRef C)
Obtain a 32-bit floating point type from a context.
Definition Core.cpp:745
LLVM_C_ABI LLVMTypeRef LLVMFP128TypeInContext(LLVMContextRef C)
Obtain a 128-bit floating point type (112-bit mantissa) from a context.
Definition Core.cpp:754
LLVM_C_ABI LLVMTypeRef LLVMX86FP80TypeInContext(LLVMContextRef C)
Obtain a 80-bit floating point type (X87) from a context.
Definition Core.cpp:751
LLVM_C_ABI LLVMTypeRef LLVMGetReturnType(LLVMTypeRef FunctionTy)
Obtain the Type this function Type returns.
Definition Core.cpp:802
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:791
LLVM_C_ABI LLVMBool LLVMIsFunctionVarArg(LLVMTypeRef FunctionTy)
Returns whether a function type is variadic.
Definition Core.cpp:798
LLVM_C_ABI unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy)
Obtain the number of parameters this function accepts.
Definition Core.cpp:806
LLVM_C_ABI void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest)
Obtain the types of a function's parameters.
Definition Core.cpp:810
LLVM_C_ABI LLVMTypeRef LLVMInt1TypeInContext(LLVMContextRef C)
Obtain an integer type from a context with specified bit width.
Definition Core.cpp:689
LLVM_C_ABI LLVMTypeRef LLVMInt8TypeInContext(LLVMContextRef C)
Definition Core.cpp:692
LLVM_C_ABI LLVMTypeRef LLVMInt32TypeInContext(LLVMContextRef C)
Definition Core.cpp:698
LLVM_C_ABI LLVMTypeRef LLVMIntTypeInContext(LLVMContextRef C, unsigned NumBits)
Definition Core.cpp:707
LLVM_C_ABI LLVMTypeRef LLVMInt64TypeInContext(LLVMContextRef C)
Definition Core.cpp:701
LLVM_C_ABI LLVMTypeRef LLVMInt16TypeInContext(LLVMContextRef C)
Definition Core.cpp:695
LLVM_C_ABI unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy)
Definition Core.cpp:733
LLVM_C_ABI LLVMTypeRef LLVMInt128TypeInContext(LLVMContextRef C)
Definition Core.cpp:704
LLVM_C_ABI unsigned LLVMGetTargetExtTypeNumTypeParams(LLVMTypeRef TargetExtTy)
Obtain the number of type parameters for this target extension type.
Definition Core.cpp:1005
LLVM_C_ABI LLVMTypeRef LLVMX86AMXTypeInContext(LLVMContextRef C)
Create a X86 AMX type in a context.
Definition Core.cpp:760
LLVM_C_ABI const char * LLVMGetTargetExtTypeName(LLVMTypeRef TargetExtTy)
Obtain the name for this target extension type.
Definition Core.cpp:1000
LLVM_C_ABI LLVMTypeRef LLVMVoidTypeInContext(LLVMContextRef C)
Create a void type in a context.
Definition Core.cpp:969
LLVM_C_ABI LLVMTypeRef LLVMTokenTypeInContext(LLVMContextRef C)
Create a token type in a context.
Definition Core.cpp:975
LLVM_C_ABI unsigned LLVMGetTargetExtTypeNumIntParams(LLVMTypeRef TargetExtTy)
Obtain the number of int parameters for this target extension type.
Definition Core.cpp:1016
LLVM_C_ABI LLVMTypeRef LLVMLabelTypeInContext(LLVMContextRef C)
Create a label type in a context.
Definition Core.cpp:972
LLVM_C_ABI LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C)
Create a metadata type in a context.
Definition Core.cpp:978
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:1010
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:989
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:1021
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthAddrDiscriminator(LLVMValueRef PtrAuth)
Get the address discriminator value for the associated ConstantPtrAuth constant.
Definition Core.cpp:959
LLVM_C_ABI LLVMBool LLVMPointerTypeIsOpaque(LLVMTypeRef Ty)
Determine whether a pointer is opaque.
Definition Core.cpp:907
LLVM_C_ABI LLVMTypeRef LLVMPointerTypeInContext(LLVMContextRef C, unsigned AddressSpace)
Create an opaque pointer type in a context.
Definition Core.cpp:965
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:911
LLVM_C_ABI LLVMTypeRef LLVMGetElementType(LLVMTypeRef Ty)
Obtain the element type of an array or vector type.
Definition Core.cpp:920
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:915
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthDiscriminator(LLVMValueRef PtrAuth)
Get the discriminator value for the associated ConstantPtrAuth constant.
Definition Core.cpp:955
LLVM_C_ABI uint64_t LLVMGetArrayLength2(LLVMTypeRef ArrayTy)
Obtain the length of an array type.
Definition Core.cpp:935
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthKey(LLVMValueRef PtrAuth)
Get the key value for the associated ConstantPtrAuth constant.
Definition Core.cpp:951
LLVM_C_ABI unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy)
Obtain the length of an array type.
Definition Core.cpp:931
LLVM_C_ABI LLVMValueRef LLVMGetConstantPtrAuthPointer(LLVMValueRef PtrAuth)
Get the pointer value for the associated ConstantPtrAuth constant.
Definition Core.cpp:947
LLVM_C_ABI unsigned LLVMGetPointerAddressSpace(LLVMTypeRef PointerTy)
Obtain the address space of a pointer type.
Definition Core.cpp:939
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:898
LLVM_C_ABI unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy)
Obtain the (possibly scalable) number of elements in a vector type.
Definition Core.cpp:943
LLVM_C_ABI LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount)
Create a fixed size array type that refers to a specific type.
Definition Core.cpp:894
LLVM_C_ABI void LLVMGetSubtypes(LLVMTypeRef Tp, LLVMTypeRef *Arr)
Returns type's subtypes.
Definition Core.cpp:886
LLVM_C_ABI LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace)
Create a pointer type that points to a defined type.
Definition Core.cpp:902
LLVM_C_ABI unsigned LLVMGetNumContainedTypes(LLVMTypeRef Tp)
Return the number of types in the derived type.
Definition Core.cpp:927
LLVM_C_ABI LLVMTypeRef LLVMStructTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Create a new structure type in a context.
Definition Core.cpp:818
LLVM_C_ABI void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest)
Get the elements within a structure.
Definition Core.cpp:853
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:859
LLVM_C_ABI LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy)
Determine whether a structure is packed.
Definition Core.cpp:864
LLVM_C_ABI LLVMTypeRef LLVMStructCreateNamed(LLVMContextRef C, const char *Name)
Create an empty structure in a context having a specified name.
Definition Core.cpp:830
LLVM_C_ABI void LLVMStructSetBody(LLVMTypeRef StructTy, LLVMTypeRef *ElementTypes, unsigned ElementCount, LLVMBool Packed)
Set the contents of a structure type.
Definition Core.cpp:843
LLVM_C_ABI LLVMBool LLVMIsOpaqueStruct(LLVMTypeRef StructTy)
Determine whether a structure is opaque.
Definition Core.cpp:868
LLVM_C_ABI unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy)
Get the number of elements defined inside the structure.
Definition Core.cpp:849
LLVM_C_ABI const char * LLVMGetStructName(LLVMTypeRef Ty)
Obtain the name of a structure.
Definition Core.cpp:835
LLVM_C_ABI LLVMBool LLVMIsLiteralStruct(LLVMTypeRef StructTy)
Determine whether a structure is literal.
Definition Core.cpp:872
LLVM_C_ABI void LLVMDumpType(LLVMTypeRef Val)
Dump a representation of a type to stderr.
Definition Core.cpp:661
LLVM_C_ABI LLVMBool LLVMTypeIsSized(LLVMTypeRef Ty)
Whether the type has a known size.
Definition Core.cpp:652
LLVM_C_ABI LLVMContextRef LLVMGetTypeContext(LLVMTypeRef Ty)
Obtain the context to which this type instance is associated.
Definition Core.cpp:657
LLVM_C_ABI char * LLVMPrintTypeToString(LLVMTypeRef Val)
Return a string representation of the type.
Definition Core.cpp:665
LLVM_C_ABI LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty)
Obtain the enumerated type of a Type instance.
Definition Core.cpp:602
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:3002
LLVM_C_ABI void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to after another one.
Definition Core.cpp:2984
LLVM_C_ABI LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn)
Obtain the first basic block in a function.
Definition Core.cpp:2900
LLVM_C_ABI LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C, const char *Name)
Create a new basic block without inserting it into a function.
Definition Core.cpp:2932
LLVM_C_ABI LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB)
Go backwards in a basic block iterator.
Definition Core.cpp:2924
LLVM_C_ABI LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn)
Obtain the last basic block in a function.
Definition Core.cpp:2908
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB)
Obtain the terminator instruction for a basic block.
Definition Core.cpp:2882
LLVM_C_ABI const char * LLVMGetBasicBlockName(LLVMBasicBlockRef BB)
Obtain the string name of a basic block.
Definition Core.cpp:2874
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:2945
LLVM_C_ABI void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB)
Remove a basic block from a function and delete it.
Definition Core.cpp:2972
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:2960
LLVM_C_ABI void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks)
Obtain all of the basic blocks in a function.
Definition Core.cpp:2890
LLVM_C_ABI void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to before another one.
Definition Core.cpp:2980
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB)
Obtain the function to which a basic block belongs.
Definition Core.cpp:2878
LLVM_C_ABI LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn)
Obtain the basic block that corresponds to the entry point of a function.
Definition Core.cpp:2896
LLVM_C_ABI LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB)
Obtain the first instruction in a basic block.
Definition Core.cpp:2994
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:2937
LLVM_C_ABI LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB)
Convert a basic block instance to a value type.
Definition Core.cpp:2862
LLVM_C_ABI LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val)
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
Definition Core.cpp:2870
LLVM_C_ABI void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB)
Remove a basic block from a function.
Definition Core.cpp:2976
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB)
Advance a basic block iterator.
Definition Core.cpp:2916
LLVM_C_ABI unsigned LLVMCountBasicBlocks(LLVMValueRef Fn)
Obtain the number of basic blocks in a function.
Definition Core.cpp:2886
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:2950
LLVM_C_ABI LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val)
Determine whether an LLVMValueRef is itself a basic block.
Definition Core.cpp:2866
LLVM_C_ABI LLVMValueRef LLVMConstantPtrAuth(LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc)
Create a ConstantPtrAuth constant with the given values.
Definition Core.cpp:1768
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:1697
LLVM_C_ABI LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size)
Create a ConstantVector from values.
Definition Core.cpp:1763
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:1682
LLVM_C_ABI LLVMValueRef LLVMConstDataArray(LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes)
Create a ConstantDataArray from raw values.
Definition Core.cpp:1733
LLVM_C_ABI LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
Create a ConstantArray from values.
Definition Core.cpp:1721
LLVM_C_ABI LLVMBool LLVMIsConstantString(LLVMValueRef c)
Returns true if the specified constant is an array of i8.
Definition Core.cpp:1705
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:1673
LLVM_C_ABI LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length)
Create a ConstantArray from values.
Definition Core.cpp:1727
LLVM_C_ABI const char * LLVMGetAsString(LLVMValueRef c, size_t *Length)
Get the given constant data sequential as a string.
Definition Core.cpp:1709
LLVM_C_ABI LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
Create a non-anonymous ConstantStruct from values.
Definition Core.cpp:1754
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:1715
LLVM_C_ABI LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Create an anonymous ConstantStruct with the specified values.
Definition Core.cpp:1740
LLVM_C_ABI LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1944
LLVM_C_ABI LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty)
Definition Core.cpp:1835
LLVM_C_ABI LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1856
LLVM_C_ABI LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1873
LLVM_C_ABI LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1950
LLVM_C_ABI LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty)
Definition Core.cpp:1831
LLVM_C_ABI LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1939
LLVM_C_ABI LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1884
LLVM_C_ABI LLVMValueRef LLVMConstGEPWithNoWrapFlags(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a constant GetElementPtr expression.
Definition Core.cpp:1912
LLVM_C_ABI LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal)
Definition Core.cpp:1827
LLVM_C_ABI LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1962
LLVM_C_ABI LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1861
LLVM_C_ABI LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1839
LLVM_C_ABI LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1956
LLVM_C_ABI LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1968
LLVM_C_ABI LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1890
LLVM_C_ABI LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1878
LLVM_C_ABI LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
Definition Core.cpp:1976
LLVM_C_ABI LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1924
LLVM_C_ABI LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1895
LLVM_C_ABI LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB)
Definition Core.cpp:1994
LLVM_C_ABI LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal)
Definition Core.cpp:1852
LLVM_C_ABI LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1867
LLVM_C_ABI LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1929
LLVM_C_ABI LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1934
LLVM_C_ABI LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1903
LLVM_C_ABI LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
Deprecated: Use LLVMGetInlineAsm instead.
Definition Core.cpp:1986
LLVM_C_ABI LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1843
LLVM_C_ABI LLVMValueRef LLVMGetBlockAddressFunction(LLVMValueRef BlockAddr)
Gets the function associated with a given BlockAddress constant value.
Definition Core.cpp:1998
LLVM_C_ABI LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock(LLVMValueRef BlockAddr)
Gets the basic block associated with a given BlockAddress constant value.
Definition Core.cpp:2002
LLVM_C_ABI LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global)
Definition Core.cpp:2140
LLVM_C_ABI LLVMTypeRef LLVMGlobalGetValueType(LLVMValueRef Global)
Returns the "value type" of a global value.
Definition Core.cpp:2175
LLVM_C_ABI unsigned LLVMGetAlignment(LLVMValueRef V)
Obtain the preferred alignment of the value.
Definition Core.cpp:2181
LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section)
Definition Core.cpp:2116
LLVM_C_ABI void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr)
Definition Core.cpp:2152
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:2256
LLVM_C_ABI void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage)
Definition Core.cpp:2045
LLVM_C_ABI void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr)
Deprecated: Use LLVMSetUnnamedAddress instead.
Definition Core.cpp:2169
LLVM_C_ABI LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global)
Definition Core.cpp:2008
LLVM_C_ABI unsigned LLVMValueMetadataEntriesGetKind(LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the kind of a value metadata entry at a specific index.
Definition Core.cpp:2237
LLVM_C_ABI void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class)
Definition Core.cpp:2135
LLVM_C_ABI LLVMVisibility LLVMGetVisibility(LLVMValueRef Global)
Definition Core.cpp:2120
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:2225
LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes)
Set the preferred alignment of the value.
Definition Core.cpp:2203
LLVM_C_ABI const char * LLVMGetSection(LLVMValueRef Global)
Definition Core.cpp:2110
LLVM_C_ABI void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz)
Definition Core.cpp:2125
LLVM_C_ABI LLVMLinkage LLVMGetLinkage(LLVMValueRef Global)
Definition Core.cpp:2016
LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind)
Erases a metadata attachment of the given kind if it exists.
Definition Core.cpp:2266
LLVM_C_ABI LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global)
Definition Core.cpp:2130
LLVM_C_ABI LLVMBool LLVMIsDeclaration(LLVMValueRef Global)
Definition Core.cpp:2012
LLVM_C_ABI void LLVMGlobalClearMetadata(LLVMValueRef Global)
Removes all metadata attachments from this value.
Definition Core.cpp:2270
LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Adds a metadata attachment.
Definition Core.cpp:2261
LLVM_C_ABI LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global)
Deprecated: Use LLVMGetUnnamedAddress instead.
Definition Core.cpp:2165
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:2245
LLVM_C_ABI void LLVMDisposeValueMetadataEntries(LLVMValueMetadataEntry *Entries)
Destroys value metadata entries.
Definition Core.cpp:2252
LLVM_C_ABI void LLVMGlobalAddDebugInfo(LLVMValueRef Global, LLVMMetadataRef GVE)
Add debuginfo metadata to this global.
Definition Core.cpp:2274
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:1568
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:1630
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:1573
LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for an integer constant value.
Definition Core.cpp:1642
LLVM_C_ABI unsigned long long LLVMConstByteGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for a byte constant value.
Definition Core.cpp:1646
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:1621
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:1597
LLVM_C_ABI double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo)
Obtain the double value for an floating point constant value.
Definition Core.cpp:1654
LLVM_C_ABI LLVMValueRef LLVMConstByte(LLVMTypeRef ByteTy, unsigned long long N)
Obtain a constant value for a byte type.
Definition Core.cpp:1593
LLVM_C_ABI LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N)
Obtain a constant value referring to a double floating point value.
Definition Core.cpp:1617
LLVM_C_ABI long long LLVMConstByteGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for a byte constant value.
Definition Core.cpp:1650
LLVM_C_ABI unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for an integer constant value.
Definition Core.cpp:1638
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:1283
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:1305
LLVM_C_ABI LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty)
Obtain a constant value referring to an undefined value of a type.
Definition Core.cpp:1279
LLVM_C_ABI LLVMBool LLVMIsNull(LLVMValueRef Val)
Determine whether a value instance is null.
Definition Core.cpp:1291
LLVM_C_ABI LLVMValueRef LLVMConstNull(LLVMTypeRef Ty)
Obtain a constant value referring to the null instance of a type.
Definition Core.cpp:1271
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:1275
LLVM_C_ABI LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg)
Obtain the previous parameter to a function.
Definition Core.cpp:2755
LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align)
Set the alignment for a function parameter.
Definition Core.cpp:2762
LLVM_C_ABI unsigned LLVMCountParams(LLVMValueRef Fn)
Obtain the number of parameters in a function.
Definition Core.cpp:2710
LLVM_C_ABI void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params)
Obtain the parameters in a function.
Definition Core.cpp:2716
LLVM_C_ABI LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn)
Obtain the first parameter to a function.
Definition Core.cpp:2731
LLVM_C_ABI LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn)
Obtain the last parameter to a function.
Definition Core.cpp:2739
LLVM_C_ABI LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index)
Obtain the parameter at the specified index.
Definition Core.cpp:2722
LLVM_C_ABI LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg)
Obtain the next parameter to a function.
Definition Core.cpp:2747
LLVM_C_ABI LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst)
Obtain the function to which this argument belongs.
Definition Core.cpp:2727
LLVM_C_ABI void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Add an attribute to a function.
Definition Core.cpp:2660
LLVM_C_ABI LLVMValueRef LLVMGetPrefixData(LLVMValueRef Fn)
Gets the prefix data associated with a function.
Definition Core.cpp:2628
LLVM_C_ABI LLVMValueRef LLVMGetPrologueData(LLVMValueRef Fn)
Gets the prologue data associated with a function.
Definition Core.cpp:2644
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount)
Retrieves the type of an intrinsic.
Definition Core.cpp:2571
LLVM_C_ABI unsigned LLVMGetIntrinsicID(LLVMValueRef Fn)
Obtain the ID number from a function instance.
Definition Core.cpp:2544
LLVM_C_ABI LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn)
Obtain the personality function attached to the function.
Definition Core.cpp:2535
LLVM_C_ABI unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx)
Definition Core.cpp:2665
LLVM_C_ABI LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn)
Check whether the given function has a personality function.
Definition Core.cpp:2531
LLVM_C_ABI void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2696
LLVM_C_ABI void LLVMSetPrefixData(LLVMValueRef Fn, LLVMValueRef prefixData)
Sets the prefix data for the function.
Definition Core.cpp:2638
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName(unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength)
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
Definition Core.cpp:2578
LLVM_C_ABI const char * LLVMGetGC(LLVMValueRef Fn)
Obtain the name of the garbage collector to use during code generation.
Definition Core.cpp:2615
LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name)
Define the garbage collector to use during code generation.
Definition Core.cpp:2620
LLVM_C_ABI void LLVMSetPrologueData(LLVMValueRef Fn, LLVMValueRef prologueData)
Sets the prologue data for the function.
Definition Core.cpp:2654
LLVM_C_ABI void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn)
Set the personality function attached to the function.
Definition Core.cpp:2539
LLVM_C_ABI void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:2670
LLVM_C_ABI unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn)
Obtain the calling function of a function.
Definition Core.cpp:2606
LLVM_C_ABI LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID)
Obtain if the intrinsic identified by the given ID is overloaded.
Definition Core.cpp:2601
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName2(LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength)
Copies the name of an overloaded intrinsic identified by a given list of parameter types.
Definition Core.cpp:2587
LLVM_C_ABI void LLVMDeleteFunction(LLVMValueRef Fn)
Remove a function from its containing module and deletes it.
Definition Core.cpp:2527
LLVM_C_ABI void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2691
LLVM_C_ABI LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2677
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:2597
LLVM_C_ABI const char * LLVMIntrinsicGetName(unsigned ID, size_t *NameLength)
Retrieves the name of an intrinsic.
Definition Core.cpp:2564
LLVM_C_ABI LLVMValueRef LLVMGetIntrinsicDeclaration(LLVMModuleRef Mod, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount)
Get or insert the declaration of an intrinsic.
Definition Core.cpp:2555
LLVM_C_ABI LLVMBool LLVMHasPrologueData(LLVMValueRef Fn)
Check if a given function has prologue data.
Definition Core.cpp:2649
LLVM_C_ABI LLVMBool LLVMHasPrefixData(LLVMValueRef Fn)
Check if a given function has prefix data.
Definition Core.cpp:2633
LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC)
Set the calling convention of a function.
Definition Core.cpp:2610
LLVM_C_ABI void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, const char *V)
Add a target-dependent attribute to a function.
Definition Core.cpp:2701
LLVM_C_ABI LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2684
LLVM_C_ABI LLVMValueRef LLVMIsAMDString(LLVMValueRef Val)
Definition Core.cpp:1195
LLVM_C_ABI LLVMBool LLVMIsPoison(LLVMValueRef Val)
Determine whether a value instance is poisonous.
Definition Core.cpp:1301
LLVM_C_ABI LLVMValueKind LLVMGetValueKind(LLVMValueRef Val)
Obtain the enumerated type of a Value instance.
Definition Core.cpp:1034
LLVM_C_ABI void LLVMDumpValue(LLVMValueRef Val)
Dump a representation of a value to stderr.
Definition Core.cpp:1064
LLVM_C_ABI const char * LLVMGetValueName(LLVMValueRef Val)
Deprecated: Use LLVMGetValueName2 instead.
Definition Core.cpp:1056
LLVM_C_ABI LLVMContextRef LLVMGetValueContext(LLVMValueRef Val)
Obtain the context to which this value is associated.
Definition Core.cpp:1080
LLVM_C_ABI void LLVMReplaceAllUsesWith(LLVMValueRef OldVal, LLVMValueRef NewVal)
Replace all uses of a value with another one.
Definition Core.cpp:1096
LLVM_C_ABI const char * LLVMGetValueName2(LLVMValueRef Val, size_t *Length)
Obtain the string name of a value.
Definition Core.cpp:1046
LLVM_C_ABI void LLVMSetValueName(LLVMValueRef Val, const char *Name)
Deprecated: Use LLVMSetValueName2 instead.
Definition Core.cpp:1060
LLVM_C_ABI LLVMValueRef LLVMIsAMDNode(LLVMValueRef Val)
Definition Core.cpp:1180
LLVM_C_ABI char * LLVMPrintDbgRecordToString(LLVMDbgRecordRef Record)
Return a string representation of the DbgRecord.
Definition Core.cpp:1084
LLVM_C_ABI LLVMBool LLVMIsUndef(LLVMValueRef Val)
Determine whether a value instance is undefined.
Definition Core.cpp:1297
LLVM_C_ABI LLVMTypeRef LLVMTypeOf(LLVMValueRef Val)
Obtain the type of a value.
Definition Core.cpp:1030
LLVM_C_ABI char * LLVMPrintValueToString(LLVMValueRef Val)
Return a string representation of the value.
Definition Core.cpp:1068
LLVM_C_ABI LLVMValueRef LLVMIsAValueAsMetadata(LLVMValueRef Val)
Definition Core.cpp:1188
#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:1287
LLVM_C_ABI void LLVMSetValueName2(LLVMValueRef Val, const char *Name, size_t NameLen)
Set the string name of a value.
Definition Core.cpp:1052
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the first GlobalIFunc in a Module.
Definition Core.cpp:2784
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:2779
LLVM_C_ABI void LLVMRemoveGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module.
Definition Core.cpp:2828
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:2769
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalIFunc(LLVMValueRef IFunc)
Advance a GlobalIFunc iterator to the next GlobalIFunc.
Definition Core.cpp:2800
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc)
Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
Definition Core.cpp:2808
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:2816
LLVM_C_ABI void LLVMSetGlobalIFuncResolver(LLVMValueRef IFunc, LLVMValueRef Resolver)
Sets the resolver function associated with this indirect function.
Definition Core.cpp:2820
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the last GlobalIFunc in a Module.
Definition Core.cpp:2792
LLVM_C_ABI void LLVMEraseGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module and delete it.
Definition Core.cpp:2824
LLVM_C_ABI LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca)
Obtain the type that is being allocated by the alloca instruction.
Definition Core.cpp:3337
LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall)
Set whether a call instruction is a tail call.
Definition Core.cpp:3236
LLVM_C_ABI void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Definition Core.cpp:3168
LLVM_C_ABI unsigned LLVMGetNumOperandBundles(LLVMValueRef C)
Obtain the number of operand bundles attached to this instruction.
Definition Core.cpp:3220
LLVM_C_ABI void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3202
LLVM_C_ABI void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3207
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3188
LLVM_C_ABI unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr)
Obtain the calling convention for a call instruction.
Definition Core.cpp:3151
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrDefaultDest(LLVMValueRef CallBr)
Get the default destination of a CallBr instruction.
Definition Core.cpp:3276
LLVM_C_ABI LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr)
Obtain the pointer to the function invoked by this instruction.
Definition Core.cpp:3212
LLVM_C_ABI void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the normal destination basic block.
Definition Core.cpp:3263
LLVM_C_ABI LLVMBool LLVMIsTailCall(LLVMValueRef CallInst)
Obtain whether a call instruction is a tail call.
Definition Core.cpp:3232
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3195
LLVM_C_ABI unsigned LLVMGetCallBrNumIndirectDests(LLVMValueRef CallBr)
Get the number of indirect destinations of a CallBr instruction.
Definition Core.cpp:3280
LLVM_C_ABI void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:3180
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst)
Return the normal destination basic block.
Definition Core.cpp:3250
LLVM_C_ABI unsigned LLVMGetNumArgOperands(LLVMValueRef Instr)
Obtain the argument count for a call instruction.
Definition Core.cpp:3142
LLVM_C_ABI void LLVMSetTailCallKind(LLVMValueRef CallInst, LLVMTailCallKind kind)
Set the call kind of the call instruction.
Definition Core.cpp:3244
LLVM_C_ABI LLVMOperandBundleRef LLVMGetOperandBundleAtIndex(LLVMValueRef C, unsigned Index)
Obtain the operand bundle attached to this instruction at the given index.
Definition Core.cpp:3224
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrIndirectDest(LLVMValueRef CallBr, unsigned Idx)
Get the indirect destination of a CallBr instruction at the given index.
Definition Core.cpp:3284
LLVM_C_ABI LLVMTailCallKind LLVMGetTailCallKind(LLVMValueRef CallInst)
Obtain a tail call kind of the call instruction.
Definition Core.cpp:3240
LLVM_C_ABI void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the unwind destination basic block.
Definition Core.cpp:3267
LLVM_C_ABI LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C)
Obtain the function type called by this instruction.
Definition Core.cpp:3216
LLVM_C_ABI LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst)
Return the unwind destination basic block.
Definition Core.cpp:3254
LLVM_C_ABI void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx, unsigned Align)
Definition Core.cpp:3160
LLVM_C_ABI unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C, LLVMAttributeIndex Idx)
Definition Core.cpp:3173
LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC)
Set the calling convention for a call instruction.
Definition Core.cpp:3155
LLVM_C_ABI LLVMGEPNoWrapFlags LLVMGEPGetNoWrapFlags(LLVMValueRef GEP)
Get the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3355
LLVM_C_ABI LLVMBool LLVMIsInBounds(LLVMValueRef GEP)
Check whether the given GEP operator is inbounds.
Definition Core.cpp:3343
LLVM_C_ABI void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds)
Set the given GEP instruction to be inbounds or not.
Definition Core.cpp:3347
LLVM_C_ABI LLVMTypeRef LLVMGetGEPSourceElementType(LLVMValueRef GEP)
Get the source element type of the given GEP operator.
Definition Core.cpp:3351
LLVM_C_ABI void LLVMGEPSetNoWrapFlags(LLVMValueRef GEP, LLVMGEPNoWrapFlags NoWrapFlags)
Set the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3360
LLVM_C_ABI unsigned LLVMGetNumIndices(LLVMValueRef Inst)
Obtain the number of indices.
Definition Core.cpp:3388
LLVM_C_ABI const unsigned * LLVMGetIndices(LLVMValueRef Inst)
Obtain the indices as an array.
Definition Core.cpp:3400
LLVM_C_ABI LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
Definition Core.cpp:3382
LLVM_C_ABI LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMValueRef.
Definition Core.cpp:3378
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:3367
LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode)
Obtain the number of incoming basic blocks to a PHI node.
Definition Core.cpp:3374
LLVM_C_ABI LLVMValueRef LLVMGetCondition(LLVMValueRef Branch)
Return the condition of a branch instruction.
Definition Core.cpp:3308
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i)
Return the specified successor.
Definition Core.cpp:3294
LLVM_C_ABI void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond)
Set the condition of a branch instruction.
Definition Core.cpp:3312
LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
Update the specified successor to point at the provided block.
Definition Core.cpp:3298
LLVM_C_ABI LLVMValueRef LLVMGetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i)
Obtain the case value for a successor of a switch instruction.
Definition Core.cpp:3322
LLVM_C_ABI LLVMBool LLVMIsConditional(LLVMValueRef Branch)
Return if an instruction is a conditional branch.
Definition Core.cpp:3304
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr)
Obtain the default destination basic block of a switch instruction.
Definition Core.cpp:3318
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:3328
LLVM_C_ABI unsigned LLVMGetNumSuccessors(LLVMValueRef Term)
Return the number of successors that this terminator has.
Definition Core.cpp:3290
LLVM_C_ABI LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst)
Obtain the float predicate of an instruction.
Definition Core.cpp:3052
LLVM_C_ABI int LLVMHasMetadata(LLVMValueRef Val)
Determine whether an instruction has any metadata attached.
Definition Core.cpp:1100
LLVM_C_ABI void LLVMInstructionRemoveFromParent(LLVMValueRef Inst)
Remove an instruction.
Definition Core.cpp:3026
LLVM_C_ABI LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst)
Obtain the instruction that occurred before this one.
Definition Core.cpp:3018
LLVM_C_ABI LLVMDbgRecordRef LLVMGetPreviousDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the previous DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3103
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetExpression(LLVMDbgRecordRef Rec)
Get the debug info expression of the DbgVariableRecord.
Definition Core.cpp:3138
LLVM_C_ABI LLVMDbgRecordRef LLVMGetFirstDbgRecord(LLVMValueRef Inst)
Obtain the first debug record attached to an instruction.
Definition Core.cpp:3075
LLVM_C_ABI LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst)
Obtain the code opcode for an individual instruction.
Definition Core.cpp:3058
LLVM_C_ABI LLVMDbgRecordRef LLVMGetNextDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the next DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3095
LLVM_C_ABI LLVMDbgRecordRef LLVMGetLastDbgRecord(LLVMValueRef Inst)
Obtain the last debug record attached to an instruction.
Definition Core.cpp:3085
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetVariable(LLVMDbgRecordRef Rec)
Get the debug info variable of the DbgVariableRecord.
Definition Core.cpp:3134
LLVM_C_ABI LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst)
Determine whether an instruction is a terminator.
Definition Core.cpp:3070
LLVM_C_ABI LLVMValueRef LLVMDbgVariableRecordGetValue(LLVMDbgRecordRef Rec, unsigned OpIdx)
Get the value of the DbgVariableRecord.
Definition Core.cpp:3129
LLVM_C_ABI LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec)
Definition Core.cpp:3115
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:1157
LLVM_C_ABI void LLVMDeleteInstruction(LLVMValueRef Inst)
Delete an instruction.
Definition Core.cpp:3034
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst)
Obtain the basic block to which an instruction belongs.
Definition Core.cpp:2990
LLVM_C_ABI LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec)
Get the debug location attached to the debug record.
Definition Core.cpp:3111
LLVM_C_ABI LLVMBool LLVMGetICmpSameSign(LLVMValueRef Inst)
Get whether or not an icmp instruction has the samesign flag.
Definition Core.cpp:3044
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:3064
LLVM_C_ABI void LLVMInstructionEraseFromParent(LLVMValueRef Inst)
Remove and delete an instruction.
Definition Core.cpp:3030
LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID, LLVMValueRef Node)
Set metadata associated with an instruction value.
Definition Core.cpp:1126
LLVM_C_ABI LLVMValueRef LLVMGetMetadata(LLVMValueRef Val, unsigned KindID)
Return metadata associated with an instruction value.
Definition Core.cpp:1104
LLVM_C_ABI LLVMIntPredicate LLVMGetICmpPredicate(LLVMValueRef Inst)
Obtain the predicate of an instruction.
Definition Core.cpp:3038
LLVM_C_ABI LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
Definition Core.cpp:3010
LLVM_C_ABI void LLVMSetICmpSameSign(LLVMValueRef Inst, LLVMBool SameSign)
Set the samesign flag on an icmp instruction.
Definition Core.cpp:3048
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:1316
LLVM_C_ABI const char * LLVMGetMDString(LLVMValueRef V, unsigned *Length)
Obtain the underlying string from a MDString value.
Definition Core.cpp:1376
LLVM_C_ABI LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD)
Obtain a Metadata as a Value.
Definition Core.cpp:1363
LLVM_C_ABI unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V)
Obtain the number of operands from an MDNode value.
Definition Core.cpp:1386
LLVM_C_ABI LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, unsigned SLen)
Deprecated: Use LLVMMDStringInContext2 instead.
Definition Core.cpp:1321
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:1311
LLVM_C_ABI LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
Deprecated: Use LLVMMDNodeInContext2 instead.
Definition Core.cpp:1332
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:1454
LLVM_C_ABI LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val)
Obtain a Value as a Metadata.
Definition Core.cpp:1367
LLVM_C_ABI void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest)
Obtain the given MDNode's operands.
Definition Core.cpp:1441
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:1252
LLVM_C_ABI int LLVMGetNumOperands(LLVMValueRef Val)
Obtain the number of operands in a llvm::User value.
Definition Core.cpp:1261
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:1257
LLVM_C_ABI LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index)
Obtain an operand at a specific index in a llvm::User value.
Definition Core.cpp:1238
LLVM_C_ABI LLVMValueRef LLVMGetUser(LLVMUseRef U)
Obtain the user value for a user.
Definition Core.cpp:1218
LLVM_C_ABI LLVMValueRef LLVMGetUsedValue(LLVMUseRef U)
Obtain the value this use corresponds to.
Definition Core.cpp:1222
LLVM_C_ABI LLVMUseRef LLVMGetNextUse(LLVMUseRef U)
Obtain the next use of a value.
Definition Core.cpp:1211
LLVM_C_ABI LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val)
Obtain the first use of a value.
Definition Core.cpp:1203
#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:2417
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the last GlobalAlias in a Module.
Definition Core.cpp:2438
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA)
Decrement a GlobalAlias iterator to the previous GlobalAlias.
Definition Core.cpp:2454
LLVM_C_ABI void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee)
Set the target value of an alias.
Definition Core.cpp:2466
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the first GlobalAlias in a Module.
Definition Core.cpp:2430
LLVM_C_ABI LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias)
Retrieve the target value of an alias.
Definition Core.cpp:2462
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:2425
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA)
Advance a GlobalAlias iterator to the next GlobalAlias.
Definition Core.cpp:2446
LLVM_C_ABI LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar)
Definition Core.cpp:2352
LLVM_C_ABI LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar)
Definition Core.cpp:2368
LLVM_C_ABI LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar)
Definition Core.cpp:2360
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2328
LLVM_C_ABI void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)
Definition Core.cpp:2356
LLVM_C_ABI LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar)
Definition Core.cpp:2407
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M)
Definition Core.cpp:2312
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobalWithLength(LLVMModuleRef M, const char *Name, size_t Length)
Definition Core.cpp:2299
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M)
Definition Core.cpp:2304
LLVM_C_ABI void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)
Definition Core.cpp:2385
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2320
LLVM_C_ABI void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit)
Definition Core.cpp:2411
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name)
Definition Core.cpp:2295
LLVM_C_ABI LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)
Definition Core.cpp:2286
LLVM_C_ABI void LLVMDeleteGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2336
LLVM_C_ABI void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant)
Definition Core.cpp:2364
LLVM_C_ABI LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:2281
LLVM_C_ABI LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar)
Definition Core.cpp:2340
LLVM_C_ABI void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)
Definition Core.cpp:2347
#define N