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(BranchInst) \
2085 macro(UncondBrInst) \
2086 macro(CondBrInst) \
2087 macro(IndirectBrInst) \
2088 macro(InvokeInst) \
2089 macro(ReturnInst) \
2090 macro(SwitchInst) \
2091 macro(UnreachableInst) \
2092 macro(ResumeInst) \
2093 macro(CleanupReturnInst) \
2094 macro(CatchReturnInst) \
2095 macro(CatchSwitchInst) \
2096 macro(CallBrInst) \
2097 macro(FuncletPadInst) \
2098 macro(CatchPadInst) \
2099 macro(CleanupPadInst) \
2100 macro(UnaryInstruction) \
2101 macro(AllocaInst) \
2102 macro(CastInst) \
2103 macro(AddrSpaceCastInst) \
2104 macro(BitCastInst) \
2105 macro(FPExtInst) \
2106 macro(FPToSIInst) \
2107 macro(FPToUIInst) \
2108 macro(FPTruncInst) \
2109 macro(IntToPtrInst) \
2110 macro(PtrToIntInst) \
2111 macro(SExtInst) \
2112 macro(SIToFPInst) \
2113 macro(TruncInst) \
2114 macro(UIToFPInst) \
2115 macro(ZExtInst) \
2116 macro(ExtractValueInst) \
2117 macro(LoadInst) \
2118 macro(VAArgInst) \
2119 macro(FreezeInst) \
2120 macro(AtomicCmpXchgInst) \
2121 macro(AtomicRMWInst) \
2122 macro(FenceInst)
2123
2124// clang-format on
2125
2126/**
2127 * @defgroup LLVMCCoreValueGeneral General APIs
2128 *
2129 * Functions in this section work on all LLVMValueRef instances,
2130 * regardless of their sub-type. They correspond to functions available
2131 * on llvm::Value.
2132 *
2133 * @{
2134 */
2135
2136/**
2137 * Obtain the type of a value.
2138 *
2139 * @see llvm::Value::getType()
2140 */
2142
2143/**
2144 * Obtain the enumerated type of a Value instance.
2145 *
2146 * @see llvm::Value::getValueID()
2147 */
2149
2150/**
2151 * Obtain the string name of a value.
2152 *
2153 * @see llvm::Value::getName()
2154 */
2155LLVM_C_ABI const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length);
2156
2157/**
2158 * Set the string name of a value.
2159 *
2160 * @see llvm::Value::setName()
2161 */
2162LLVM_C_ABI void LLVMSetValueName2(LLVMValueRef Val, const char *Name,
2163 size_t NameLen);
2164
2165/**
2166 * Dump a representation of a value to stderr.
2167 *
2168 * @see llvm::Value::dump()
2169 */
2171
2172/**
2173 * Return a string representation of the value. Use
2174 * LLVMDisposeMessage to free the string.
2175 *
2176 * @see llvm::Value::print()
2177 */
2179
2180/**
2181 * Obtain the context to which this value is associated.
2182 *
2183 * @see llvm::Value::getContext()
2184 */
2186
2187/**
2188 * Return a string representation of the DbgRecord. Use
2189 * LLVMDisposeMessage to free the string.
2190 *
2191 * @see llvm::DbgRecord::print()
2192 */
2194
2195/**
2196 * Replace all uses of a value with another one.
2197 *
2198 * @see llvm::Value::replaceAllUsesWith()
2199 */
2201 LLVMValueRef NewVal);
2202
2203/**
2204 * Determine whether the specified value instance is constant.
2205 */
2207
2208/**
2209 * Determine whether a value instance is undefined.
2210 */
2212
2213/**
2214 * Determine whether a value instance is poisonous.
2215 */
2217
2218/**
2219 * Convert value instances between types.
2220 *
2221 * Internally, an LLVMValueRef is "pinned" to a specific type. This
2222 * series of functions allows you to cast an instance to a specific
2223 * type.
2224 *
2225 * If the cast is not valid for the specified type, NULL is returned.
2226 *
2227 * @see llvm::dyn_cast_or_null<>
2228 */
2229#define LLVM_DECLARE_VALUE_CAST(name) \
2230 LLVM_C_ABI LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
2232
2236
2237/** Deprecated: Use LLVMGetValueName2 instead. */
2239/** Deprecated: Use LLVMSetValueName2 instead. */
2240LLVM_C_ABI void LLVMSetValueName(LLVMValueRef Val, const char *Name);
2241
2242/**
2243 * @}
2244 */
2245
2246/**
2247 * @defgroup LLVMCCoreValueUses Usage
2248 *
2249 * This module defines functions that allow you to inspect the uses of a
2250 * LLVMValueRef.
2251 *
2252 * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance.
2253 * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a
2254 * llvm::User and llvm::Value.
2255 *
2256 * @{
2257 */
2258
2259/**
2260 * Obtain the first use of a value.
2261 *
2262 * Uses are obtained in an iterator fashion. First, call this function
2263 * to obtain a reference to the first use. Then, call LLVMGetNextUse()
2264 * on that instance and all subsequently obtained instances until
2265 * LLVMGetNextUse() returns NULL.
2266 *
2267 * @see llvm::Value::use_begin()
2268 */
2270
2271/**
2272 * Obtain the next use of a value.
2273 *
2274 * This effectively advances the iterator. It returns NULL if you are on
2275 * the final use and no more are available.
2276 */
2278
2279/**
2280 * Obtain the user value for a user.
2281 *
2282 * The returned value corresponds to a llvm::User type.
2283 *
2284 * @see llvm::Use::getUser()
2285 */
2287
2288/**
2289 * Obtain the value this use corresponds to.
2290 *
2291 * @see llvm::Use::get().
2292 */
2294
2295/**
2296 * @}
2297 */
2298
2299/**
2300 * @defgroup LLVMCCoreValueUser User value
2301 *
2302 * Function in this group pertain to LLVMValueRef instances that descent
2303 * from llvm::User. This includes constants, instructions, and
2304 * operators.
2305 *
2306 * @{
2307 */
2308
2309/**
2310 * Obtain an operand at a specific index in a llvm::User value.
2311 *
2312 * @see llvm::User::getOperand()
2313 */
2315
2316/**
2317 * Obtain the use of an operand at a specific index in a llvm::User value.
2318 *
2319 * @see llvm::User::getOperandUse()
2320 */
2322
2323/**
2324 * Set an operand at a specific index in a llvm::User value.
2325 *
2326 * @see llvm::User::setOperand()
2327 */
2328LLVM_C_ABI void LLVMSetOperand(LLVMValueRef User, unsigned Index,
2329 LLVMValueRef Val);
2330
2331/**
2332 * Obtain the number of operands in a llvm::User value.
2333 *
2334 * @see llvm::User::getNumOperands()
2335 */
2337
2338/**
2339 * @}
2340 */
2341
2342/**
2343 * @defgroup LLVMCCoreValueConstant Constants
2344 *
2345 * This section contains APIs for interacting with LLVMValueRef that
2346 * correspond to llvm::Constant instances.
2347 *
2348 * These functions will work for any LLVMValueRef in the llvm::Constant
2349 * class hierarchy.
2350 *
2351 * @{
2352 */
2353
2354/**
2355 * Obtain a constant value referring to the null instance of a type.
2356 *
2357 * @see llvm::Constant::getNullValue()
2358 */
2360
2361/**
2362 * Obtain a constant value referring to the instance of a type
2363 * consisting of all ones.
2364 *
2365 * This is only valid for integer types.
2366 *
2367 * @see llvm::Constant::getAllOnesValue()
2368 */
2370
2371/**
2372 * Obtain a constant value referring to an undefined value of a type.
2373 *
2374 * @see llvm::UndefValue::get()
2375 */
2377
2378/**
2379 * Obtain a constant value referring to a poison value of a type.
2380 *
2381 * @see llvm::PoisonValue::get()
2382 */
2384
2385/**
2386 * Determine whether a value instance is null.
2387 *
2388 * @see llvm::Constant::isNullValue()
2389 */
2391
2392/**
2393 * Obtain a constant that is a constant pointer pointing to NULL for a
2394 * specified type.
2395 */
2397
2398/**
2399 * @defgroup LLVMCCoreValueConstantScalar Scalar constants
2400 *
2401 * Functions in this group model LLVMValueRef instances that correspond
2402 * to constants referring to scalar types.
2403 *
2404 * For integer types, the LLVMTypeRef parameter should correspond to a
2405 * llvm::IntegerType instance and the returned LLVMValueRef will
2406 * correspond to a llvm::ConstantInt.
2407 *
2408 * For floating point types, the LLVMTypeRef returned corresponds to a
2409 * llvm::ConstantFP.
2410 *
2411 * @{
2412 */
2413
2414/**
2415 * Obtain a constant value for an integer type.
2416 *
2417 * The returned value corresponds to a llvm::ConstantInt.
2418 *
2419 * @see llvm::ConstantInt::get()
2420 *
2421 * @param IntTy Integer type to obtain value of.
2422 * @param N The value the returned instance should refer to.
2423 * @param SignExtend Whether to sign extend the produced value.
2424 */
2425LLVM_C_ABI LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
2426 LLVMBool SignExtend);
2427
2428/**
2429 * Obtain a constant value for an integer of arbitrary precision.
2430 *
2431 * @see llvm::ConstantInt::get()
2432 */
2434 LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[]);
2435
2436/**
2437 * Obtain a constant value for an integer parsed from a string.
2438 *
2439 * A similar API, LLVMConstIntOfStringAndSize is also available. If the
2440 * string's length is available, it is preferred to call that function
2441 * instead.
2442 *
2443 * @see llvm::ConstantInt::get()
2444 */
2446 const char *Text, uint8_t Radix);
2447
2448/**
2449 * Obtain a constant value for an integer parsed from a string with
2450 * specified length.
2451 *
2452 * @see llvm::ConstantInt::get()
2453 */
2455 const char *Text,
2456 unsigned SLen,
2457 uint8_t Radix);
2458
2459/**
2460 * Obtain a constant value for a byte type.
2461 *
2462 * The returned value corresponds to a llvm::ConstantByte.
2463 *
2464 * @see llvm::ConstantByte::get()
2465 *
2466 * @param ByteTy Byte type to obtain value of.
2467 * @param N The value the returned instance should refer to.
2468 */
2469LLVM_C_ABI LLVMValueRef LLVMConstByte(LLVMTypeRef ByteTy, unsigned long long N);
2470
2471/**
2472 * Obtain a constant value for a byte of arbitrary precision.
2473 *
2474 * @see llvm::ConstantByte::get()
2475 */
2477 LLVMTypeRef ByteTy, unsigned NumWords, const uint64_t Words[]);
2478
2479/**
2480 * Obtain a constant value for a byte parsed from a string with specified
2481 * length.
2482 * @see llvm::ConstantByte::get()
2483 */
2485 const char *Text,
2486 size_t SLen,
2487 uint8_t Radix);
2488
2489/**
2490 * Obtain a constant value referring to a double floating point value.
2491 */
2493
2494/**
2495 * Obtain a constant for a floating point value parsed from a string.
2496 *
2497 * A similar API, LLVMConstRealOfStringAndSize is also available. It
2498 * should be used if the input string's length is known.
2499 */
2501 const char *Text);
2502
2503/**
2504 * Obtain a constant for a floating point value parsed from a string.
2505 */
2507 const char *Text,
2508 unsigned SLen);
2509
2510/**
2511 * Obtain a constant for a floating point value from array of 64 bit values.
2512 * The length of the array N must be ceildiv(bits, 64), where bits is the
2513 * scalar size in bits of the floating-point type.
2514 */
2515
2517
2518/**
2519 * Obtain the zero extended value for an integer constant value.
2520 *
2521 * @see llvm::ConstantInt::getZExtValue()
2522 */
2523LLVM_C_ABI unsigned long long
2525
2526/**
2527 * Obtain the sign extended value for an integer constant value.
2528 *
2529 * @see llvm::ConstantInt::getSExtValue()
2530 */
2531LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal);
2532
2533/**
2534 * Obtain the zero extended value for a byte constant value.
2535 *
2536 * @see llvm::ConstantByte::getZExtValue()
2537 */
2538LLVM_C_ABI unsigned long long
2540
2541/**
2542 * Obtain the sign extended value for a byte constant value.
2543 *
2544 * @see llvm::ConstantByte::getSExtValue()
2545 */
2547
2548/**
2549 * Obtain the double value for an floating point constant value.
2550 * losesInfo indicates if some precision was lost in the conversion.
2551 *
2552 * @see llvm::ConstantFP::getDoubleValue
2553 */
2555 LLVMBool *losesInfo);
2556
2557/**
2558 * @}
2559 */
2560
2561/**
2562 * @defgroup LLVMCCoreValueConstantComposite Composite Constants
2563 *
2564 * Functions in this group operate on composite constants.
2565 *
2566 * @{
2567 */
2568
2569/**
2570 * Create a ConstantDataSequential and initialize it with a string.
2571 *
2572 * @deprecated LLVMConstStringInContext is deprecated in favor of the API
2573 * accurate LLVMConstStringInContext2
2574 * @see llvm::ConstantDataArray::getString()
2575 */
2577 const char *Str,
2578 unsigned Length,
2579 LLVMBool DontNullTerminate);
2580
2581/**
2582 * Create a ConstantDataSequential and initialize it with a string.
2583 *
2584 * @see llvm::ConstantDataArray::getString()
2585 */
2587 const char *Str,
2588 size_t Length,
2589 LLVMBool DontNullTerminate);
2590
2591/**
2592 * Create a ConstantDataSequential with string content in the global context.
2593 *
2594 * This is the same as LLVMConstStringInContext except it operates on the
2595 * global context.
2596 *
2597 * @see LLVMConstStringInContext()
2598 * @see llvm::ConstantDataArray::getString()
2599 */
2601 LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
2602 LLVMBool DontNullTerminate),
2603 "Use of the global context is deprecated, use LLVMConstStringInContext2 "
2604 "instead");
2605
2606/**
2607 * Returns true if the specified constant is an array of i8.
2608 *
2609 * @see ConstantDataSequential::getAsString()
2610 */
2612
2613/**
2614 * Get the given constant data sequential as a string.
2615 *
2616 * @see ConstantDataSequential::getAsString()
2617 */
2618LLVM_C_ABI const char *LLVMGetAsString(LLVMValueRef c, size_t *Length);
2619
2620/**
2621 * Get the raw, underlying bytes of the given constant data sequential.
2622 *
2623 * This is the same as LLVMGetAsString except it works for all constant data
2624 * sequentials, not just i8 arrays.
2625 *
2626 * @see ConstantDataSequential::getRawDataValues()
2627 */
2629 size_t *SizeInBytes);
2630
2631/**
2632 * Create an anonymous ConstantStruct with the specified values.
2633 *
2634 * @see llvm::ConstantStruct::getAnon()
2635 */
2637 LLVMValueRef *ConstantVals,
2638 unsigned Count,
2639 LLVMBool Packed);
2640
2641/**
2642 * Create a ConstantStruct in the global Context.
2643 *
2644 * This is the same as LLVMConstStructInContext except it operates on the
2645 * global Context.
2646 *
2647 * @see LLVMConstStructInContext()
2648 */
2650 LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
2651 LLVMBool Packed),
2652 "Use of the global context is deprecated, use LLVMConstStructInContext "
2653 "instead");
2654
2655/**
2656 * Create a ConstantArray from values.
2657 *
2658 * @deprecated LLVMConstArray is deprecated in favor of the API accurate
2659 * LLVMConstArray2
2660 * @see llvm::ConstantArray::get()
2661 */
2663 LLVMValueRef *ConstantVals,
2664 unsigned Length);
2665
2666/**
2667 * Create a ConstantArray from values.
2668 *
2669 * @see llvm::ConstantArray::get()
2670 */
2672 LLVMValueRef *ConstantVals,
2673 uint64_t Length);
2674
2675/**
2676 * Create a ConstantDataArray from raw values.
2677 *
2678 * ElementTy must be one of i8, i16, i32, i64, half, bfloat, float, or double.
2679 * Data points to a contiguous buffer of raw values in the host endianness. The
2680 * element count is inferred from the element type and the data size in bytes.
2681 *
2682 * @see llvm::ConstantDataArray::getRaw()
2683 */
2685 const char *Data,
2686 size_t SizeInBytes);
2687
2688/**
2689 * Create a non-anonymous ConstantStruct from values.
2690 *
2691 * @see llvm::ConstantStruct::get()
2692 */
2694 LLVMValueRef *ConstantVals,
2695 unsigned Count);
2696
2697/**
2698 * Get element of a constant aggregate (struct, array or vector) at the
2699 * specified index. Returns null if the index is out of range, or it's not
2700 * possible to determine the element (e.g., because the constant is a
2701 * constant expression.)
2702 *
2703 * @see llvm::Constant::getAggregateElement()
2704 */
2706
2707/**
2708 * Get an element at specified index as a constant.
2709 *
2710 * @see ConstantDataSequential::getElementAsConstant()
2711 */
2714 "Use LLVMGetAggregateElement instead");
2715
2716/**
2717 * Create a ConstantVector from values.
2718 *
2719 * @see llvm::ConstantVector::get()
2720 */
2722 unsigned Size);
2723
2724/**
2725 * Create a ConstantPtrAuth constant with the given values.
2726 *
2727 * @see llvm::ConstantPtrAuth::get()
2728 */
2730 LLVMValueRef Disc,
2731 LLVMValueRef AddrDisc);
2732
2733/**
2734 * @}
2735 */
2736
2737/**
2738 * @defgroup LLVMCCoreValueConstantExpressions Constant Expressions
2739 *
2740 * Functions in this group correspond to APIs on llvm::ConstantExpr.
2741 *
2742 * @see llvm::ConstantExpr.
2743 *
2744 * @{
2745 */
2753 "Use LLVMConstNull instead.");
2756 LLVMValueRef RHSConstant);
2758 LLVMValueRef RHSConstant);
2760 LLVMValueRef RHSConstant);
2762 LLVMValueRef RHSConstant);
2764 LLVMValueRef RHSConstant);
2766 LLVMValueRef RHSConstant);
2768 LLVMValueRef RHSConstant);
2770 LLVMValueRef *ConstantIndices,
2771 unsigned NumIndices);
2773 LLVMValueRef ConstantVal,
2774 LLVMValueRef *ConstantIndices,
2775 unsigned NumIndices);
2776/**
2777 * Creates a constant GetElementPtr expression. Similar to LLVMConstGEP2, but
2778 * allows specifying the no-wrap flags.
2779 *
2780 * @see llvm::ConstantExpr::getGetElementPtr()
2781 */
2783 LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices,
2784 unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags);
2786 LLVMTypeRef ToType);
2788 LLVMTypeRef ToType);
2790 LLVMTypeRef ToType);
2792 LLVMTypeRef ToType);
2794 LLVMTypeRef ToType);
2796 LLVMTypeRef ToType);
2798 LLVMTypeRef ToType);
2800 LLVMValueRef IndexConstant);
2802 LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant,
2803 LLVMValueRef IndexConstant);
2805 LLVMValueRef VectorBConstant,
2806 LLVMValueRef MaskConstant);
2808
2809/**
2810 * Gets the function associated with a given BlockAddress constant value.
2811 */
2813
2814/**
2815 * Gets the basic block associated with a given BlockAddress constant value.
2816 */
2819
2820/** Deprecated: Use LLVMGetInlineAsm instead. */
2822 const char *AsmString,
2823 const char *Constraints,
2824 LLVMBool HasSideEffects,
2825 LLVMBool IsAlignStack);
2826
2827/**
2828 * @}
2829 */
2830
2831/**
2832 * @defgroup LLVMCCoreValueConstantGlobals Global Values
2833 *
2834 * This group contains functions that operate on global values. Functions in
2835 * this group relate to functions in the llvm::GlobalValue class tree.
2836 *
2837 * @see llvm::GlobalValue
2838 *
2839 * @{
2840 */
2841
2846LLVM_C_ABI const char *LLVMGetSection(LLVMValueRef Global);
2847LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section);
2852 LLVMDLLStorageClass Class);
2855 LLVMUnnamedAddr UnnamedAddr);
2856
2857/**
2858 * Returns the "value type" of a global value. This differs from the formal
2859 * type of a global value which is always a pointer type.
2860 *
2861 * @see llvm::GlobalValue::getValueType()
2862 * @see llvm::Function::getFunctionType()
2863 */
2865
2866/** Deprecated: Use LLVMGetUnnamedAddress instead. */
2868/** Deprecated: Use LLVMSetUnnamedAddress instead. */
2870 LLVMBool HasUnnamedAddr);
2871
2872/**
2873 * @defgroup LLVMCCoreValueWithAlignment Values with alignment
2874 *
2875 * Functions in this group only apply to values with alignment, i.e.
2876 * global variables, load and store instructions.
2877 */
2878
2879/**
2880 * Obtain the preferred alignment of the value.
2881 * @see llvm::AllocaInst::getAlignment()
2882 * @see llvm::LoadInst::getAlignment()
2883 * @see llvm::StoreInst::getAlignment()
2884 * @see llvm::AtomicRMWInst::setAlignment()
2885 * @see llvm::AtomicCmpXchgInst::setAlignment()
2886 * @see llvm::GlobalValue::getAlignment()
2887 */
2889
2890/**
2891 * Set the preferred alignment of the value.
2892 * @see llvm::AllocaInst::setAlignment()
2893 * @see llvm::LoadInst::setAlignment()
2894 * @see llvm::StoreInst::setAlignment()
2895 * @see llvm::AtomicRMWInst::setAlignment()
2896 * @see llvm::AtomicCmpXchgInst::setAlignment()
2897 * @see llvm::GlobalValue::setAlignment()
2898 */
2899LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes);
2900
2901/**
2902 * Sets a metadata attachment, erasing the existing metadata attachment if
2903 * it already exists for the given kind.
2904 *
2905 * @see llvm::GlobalObject::setMetadata()
2906 */
2907LLVM_C_ABI void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind,
2908 LLVMMetadataRef MD);
2909
2910/**
2911 * Adds a metadata attachment.
2912 *
2913 * @see llvm::GlobalObject::addMetadata()
2914 */
2915LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind,
2916 LLVMMetadataRef MD);
2917
2918/**
2919 * Erases a metadata attachment of the given kind if it exists.
2920 *
2921 * @see llvm::GlobalObject::eraseMetadata()
2922 */
2923LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind);
2924
2925/**
2926 * Removes all metadata attachments from this value.
2927 *
2928 * @see llvm::GlobalObject::clearMetadata()
2929 */
2931
2932/**
2933 * Add debuginfo metadata to this global.
2934 *
2935 * @see llvm::GlobalVariable::addDebugInfo()
2936 */
2938 LLVMMetadataRef GVE);
2939
2940/**
2941 * Retrieves an array of metadata entries representing the metadata attached to
2942 * this value. The caller is responsible for freeing this array by calling
2943 * \c LLVMDisposeValueMetadataEntries.
2944 *
2945 * @see llvm::GlobalObject::getAllMetadata()
2946 */
2948LLVMGlobalCopyAllMetadata(LLVMValueRef Value, size_t *NumEntries);
2949
2950/**
2951 * Destroys value metadata entries.
2952 */
2953LLVM_C_ABI void
2955
2956/**
2957 * Returns the kind of a value metadata entry at a specific index.
2958 */
2959LLVM_C_ABI unsigned
2961 unsigned Index);
2962
2963/**
2964 * Returns the underlying metadata node of a value metadata entry at a
2965 * specific index.
2966 */
2968 LLVMValueMetadataEntry *Entries, unsigned Index);
2969
2970/**
2971 * @}
2972 */
2973
2974/**
2975 * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables
2976 *
2977 * This group contains functions that operate on global variable values.
2978 *
2979 * @see llvm::GlobalVariable
2980 *
2981 * @{
2982 */
2984 const char *Name);
2986 LLVMTypeRef Ty,
2987 const char *Name,
2988 unsigned AddressSpace);
2991 const char *Name,
2992 size_t Length);
3000 LLVMValueRef ConstantVal);
3003 LLVMBool IsThreadLocal);
3006 LLVMBool IsConstant);
3012 LLVMBool IsExtInit);
3013
3014/**
3015 * @}
3016 */
3017
3018/**
3019 * @defgroup LLVMCoreValueConstantGlobalAlias Global Aliases
3020 *
3021 * This group contains function that operate on global alias values.
3022 *
3023 * @see llvm::GlobalAlias
3024 *
3025 * @{
3026 */
3027
3028/**
3029 * Add a GlobalAlias with the given value type, address space and aliasee.
3030 *
3031 * @see llvm::GlobalAlias::create()
3032 */
3034 unsigned AddrSpace, LLVMValueRef Aliasee,
3035 const char *Name);
3036
3037/**
3038 * Obtain a GlobalAlias value from a Module by its name.
3039 *
3040 * The returned value corresponds to a llvm::GlobalAlias value.
3041 *
3042 * @see llvm::Module::getNamedAlias()
3043 */
3045 const char *Name,
3046 size_t NameLen);
3047
3048/**
3049 * Obtain an iterator to the first GlobalAlias in a Module.
3050 *
3051 * @see llvm::Module::alias_begin()
3052 */
3054
3055/**
3056 * Obtain an iterator to the last GlobalAlias in a Module.
3057 *
3058 * @see llvm::Module::alias_end()
3059 */
3061
3062/**
3063 * Advance a GlobalAlias iterator to the next GlobalAlias.
3064 *
3065 * Returns NULL if the iterator was already at the end and there are no more
3066 * global aliases.
3067 */
3069
3070/**
3071 * Decrement a GlobalAlias iterator to the previous GlobalAlias.
3072 *
3073 * Returns NULL if the iterator was already at the beginning and there are
3074 * no previous global aliases.
3075 */
3077
3078/**
3079 * Retrieve the target value of an alias.
3080 */
3082
3083/**
3084 * Set the target value of an alias.
3085 */
3087
3088/**
3089 * @}
3090 */
3091
3092/**
3093 * @defgroup LLVMCCoreValueFunction Function values
3094 *
3095 * Functions in this group operate on LLVMValueRef instances that
3096 * correspond to llvm::Function instances.
3097 *
3098 * @see llvm::Function
3099 *
3100 * @{
3101 */
3102
3103/**
3104 * Remove a function from its containing module and deletes it.
3105 *
3106 * @see llvm::Function::eraseFromParent()
3107 */
3109
3110/**
3111 * Check whether the given function has a personality function.
3112 *
3113 * @see llvm::Function::hasPersonalityFn()
3114 */
3116
3117/**
3118 * Obtain the personality function attached to the function.
3119 *
3120 * @see llvm::Function::getPersonalityFn()
3121 */
3123
3124/**
3125 * Set the personality function attached to the function.
3126 *
3127 * @see llvm::Function::setPersonalityFn()
3128 */
3130 LLVMValueRef PersonalityFn);
3131
3132/**
3133 * Obtain the intrinsic ID number which matches the given function name.
3134 *
3135 * @see llvm::Intrinsic::lookupIntrinsicID()
3136 */
3137LLVM_C_ABI unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen);
3138
3139/**
3140 * Obtain the ID number from a function instance.
3141 *
3142 * @see llvm::Function::getIntrinsicID()
3143 */
3145
3146/**
3147 * Get or insert the declaration of an intrinsic. For overloaded intrinsics,
3148 * parameter types must be provided to uniquely identify an overload.
3149 *
3150 * @see llvm::Intrinsic::getOrInsertDeclaration()
3151 */
3153 unsigned ID,
3154 LLVMTypeRef *ParamTypes,
3155 size_t ParamCount);
3156
3157/**
3158 * Retrieves the type of an intrinsic. For overloaded intrinsics, parameter
3159 * types must be provided to uniquely identify an overload.
3160 *
3161 * @see llvm::Intrinsic::getType()
3162 */
3164 LLVMTypeRef *ParamTypes,
3165 size_t ParamCount);
3166
3167/**
3168 * Retrieves the name of an intrinsic.
3169 *
3170 * @see llvm::Intrinsic::getName()
3171 */
3172LLVM_C_ABI const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength);
3173
3174/** Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. */
3176 LLVMTypeRef *ParamTypes,
3177 size_t ParamCount,
3178 size_t *NameLength);
3179
3180/**
3181 * Copies the name of an overloaded intrinsic identified by a given list of
3182 * parameter types.
3183 *
3184 * Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the
3185 * returned string.
3186 *
3187 * This version also supports unnamed types.
3188 *
3189 * @see llvm::Intrinsic::getName()
3190 */
3192 unsigned ID,
3193 LLVMTypeRef *ParamTypes,
3194 size_t ParamCount,
3195 size_t *NameLength);
3196
3197/**
3198 * Obtain if the intrinsic identified by the given ID is overloaded.
3199 *
3200 * @see llvm::Intrinsic::isOverloaded()
3201 */
3203
3204/**
3205 * Obtain the calling function of a function.
3206 *
3207 * The returned value corresponds to the LLVMCallConv enumeration.
3208 *
3209 * @see llvm::Function::getCallingConv()
3210 */
3212
3213/**
3214 * Set the calling convention of a function.
3215 *
3216 * @see llvm::Function::setCallingConv()
3217 *
3218 * @param Fn Function to operate on
3219 * @param CC LLVMCallConv to set calling convention to
3220 */
3221LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC);
3222
3223/**
3224 * Obtain the name of the garbage collector to use during code
3225 * generation.
3226 *
3227 * @see llvm::Function::getGC()
3228 */
3229LLVM_C_ABI const char *LLVMGetGC(LLVMValueRef Fn);
3230
3231/**
3232 * Define the garbage collector to use during code generation.
3233 *
3234 * @see llvm::Function::setGC()
3235 */
3236LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name);
3237
3238/**
3239 * Gets the prefix data associated with a function. Only valid on functions, and
3240 * only if LLVMHasPrefixData returns true.
3241 * See https://llvm.org/docs/LangRef.html#prefix-data
3242 */
3244
3245/**
3246 * Check if a given function has prefix data. Only valid on functions.
3247 * See https://llvm.org/docs/LangRef.html#prefix-data
3248 */
3250
3251/**
3252 * Sets the prefix data for the function. Only valid on functions.
3253 * See https://llvm.org/docs/LangRef.html#prefix-data
3254 */
3256
3257/**
3258 * Gets the prologue data associated with a function. Only valid on functions,
3259 * and only if LLVMHasPrologueData returns true.
3260 * See https://llvm.org/docs/LangRef.html#prologue-data
3261 */
3263
3264/**
3265 * Check if a given function has prologue data. Only valid on functions.
3266 * See https://llvm.org/docs/LangRef.html#prologue-data
3267 */
3269
3270/**
3271 * Sets the prologue data for the function. Only valid on functions.
3272 * See https://llvm.org/docs/LangRef.html#prologue-data
3273 */
3275
3276/**
3277 * Add an attribute to a function.
3278 *
3279 * @see llvm::Function::addAttribute()
3280 */
3284 LLVMAttributeIndex Idx);
3286 LLVMAttributeRef *Attrs);
3289 unsigned KindID);
3291 LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
3294 unsigned KindID);
3297 const char *K, unsigned KLen);
3298
3299/**
3300 * Add a target-dependent attribute to a function
3301 * @see llvm::AttrBuilder::addAttribute()
3302 */
3304 const char *A,
3305 const char *V);
3306
3307/**
3308 * @defgroup LLVMCCoreValueFunctionParameters Function Parameters
3309 *
3310 * Functions in this group relate to arguments/parameters on functions.
3311 *
3312 * Functions in this group expect LLVMValueRef instances that correspond
3313 * to llvm::Function instances.
3314 *
3315 * @{
3316 */
3317
3318/**
3319 * Obtain the number of parameters in a function.
3320 *
3321 * @see llvm::Function::arg_size()
3322 */
3324
3325/**
3326 * Obtain the parameters in a function.
3327 *
3328 * The takes a pointer to a pre-allocated array of LLVMValueRef that is
3329 * at least LLVMCountParams() long. This array will be filled with
3330 * LLVMValueRef instances which correspond to the parameters the
3331 * function receives. Each LLVMValueRef corresponds to a llvm::Argument
3332 * instance.
3333 *
3334 * @see llvm::Function::arg_begin()
3335 */
3337
3338/**
3339 * Obtain the parameter at the specified index.
3340 *
3341 * Parameters are indexed from 0.
3342 *
3343 * @see llvm::Function::arg_begin()
3344 */
3346
3347/**
3348 * Obtain the function to which this argument belongs.
3349 *
3350 * Unlike other functions in this group, this one takes an LLVMValueRef
3351 * that corresponds to a llvm::Attribute.
3352 *
3353 * The returned LLVMValueRef is the llvm::Function to which this
3354 * argument belongs.
3355 */
3357
3358/**
3359 * Obtain the first parameter to a function.
3360 *
3361 * @see llvm::Function::arg_begin()
3362 */
3364
3365/**
3366 * Obtain the last parameter to a function.
3367 *
3368 * @see llvm::Function::arg_end()
3369 */
3371
3372/**
3373 * Obtain the next parameter to a function.
3374 *
3375 * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is
3376 * actually a wrapped iterator) and obtains the next parameter from the
3377 * underlying iterator.
3378 */
3380
3381/**
3382 * Obtain the previous parameter to a function.
3383 *
3384 * This is the opposite of LLVMGetNextParam().
3385 */
3387
3388/**
3389 * Set the alignment for a function parameter.
3390 *
3391 * @see llvm::Argument::addAttr()
3392 * @see llvm::AttrBuilder::addAlignmentAttr()
3393 */
3394LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align);
3395
3396/**
3397 * @}
3398 */
3399
3400/**
3401 * @defgroup LLVMCCoreValueGlobalIFunc IFuncs
3402 *
3403 * Functions in this group relate to indirect functions.
3404 *
3405 * Functions in this group expect LLVMValueRef instances that correspond
3406 * to llvm::GlobalIFunc instances.
3407 *
3408 * @{
3409 */
3410
3411/**
3412 * Add a global indirect function to a module under a specified name.
3413 *
3414 * @see llvm::GlobalIFunc::create()
3415 */
3417 size_t NameLen, LLVMTypeRef Ty,
3418 unsigned AddrSpace,
3419 LLVMValueRef Resolver);
3420
3421/**
3422 * Obtain a GlobalIFunc value from a Module by its name.
3423 *
3424 * The returned value corresponds to a llvm::GlobalIFunc value.
3425 *
3426 * @see llvm::Module::getNamedIFunc()
3427 */
3429 const char *Name,
3430 size_t NameLen);
3431
3432/**
3433 * Obtain an iterator to the first GlobalIFunc in a Module.
3434 *
3435 * @see llvm::Module::ifunc_begin()
3436 */
3438
3439/**
3440 * Obtain an iterator to the last GlobalIFunc in a Module.
3441 *
3442 * @see llvm::Module::ifunc_end()
3443 */
3445
3446/**
3447 * Advance a GlobalIFunc iterator to the next GlobalIFunc.
3448 *
3449 * Returns NULL if the iterator was already at the end and there are no more
3450 * global aliases.
3451 */
3453
3454/**
3455 * Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
3456 *
3457 * Returns NULL if the iterator was already at the beginning and there are
3458 * no previous global aliases.
3459 */
3461
3462/**
3463 * Retrieves the resolver function associated with this indirect function, or
3464 * NULL if it doesn't not exist.
3465 *
3466 * @see llvm::GlobalIFunc::getResolver()
3467 */
3469
3470/**
3471 * Sets the resolver function associated with this indirect function.
3472 *
3473 * @see llvm::GlobalIFunc::setResolver()
3474 */
3476 LLVMValueRef Resolver);
3477
3478/**
3479 * Remove a global indirect function from its parent module and delete it.
3480 *
3481 * @see llvm::GlobalIFunc::eraseFromParent()
3482 */
3484
3485/**
3486 * Remove a global indirect function from its parent module.
3487 *
3488 * This unlinks the global indirect function from its containing module but
3489 * keeps it alive.
3490 *
3491 * @see llvm::GlobalIFunc::removeFromParent()
3492 */
3494
3495/**
3496 * @}
3497 */
3498
3499/**
3500 * @}
3501 */
3502
3503/**
3504 * @}
3505 */
3506
3507/**
3508 * @}
3509 */
3510
3511/**
3512 * @defgroup LLVMCCoreValueMetadata Metadata
3513 *
3514 * @{
3515 */
3516
3517/**
3518 * Create an MDString value from a given string value.
3519 *
3520 * The MDString value does not take ownership of the given string, it remains
3521 * the responsibility of the caller to free it.
3522 *
3523 * @see llvm::MDString::get()
3524 */
3526 const char *Str, size_t SLen);
3527
3528/**
3529 * Create an MDNode value with the given array of operands.
3530 *
3531 * @see llvm::MDNode::get()
3532 */
3534 LLVMMetadataRef *MDs,
3535 size_t Count);
3536
3537/**
3538 * Obtain a Metadata as a Value.
3539 */
3541 LLVMMetadataRef MD);
3542
3543/**
3544 * Obtain a Value as a Metadata.
3545 */
3547
3548/**
3549 * Obtain the underlying string from a MDString value.
3550 *
3551 * @param V Instance to obtain string from.
3552 * @param Length Memory address which will hold length of returned string.
3553 * @return String data in MDString.
3554 */
3555LLVM_C_ABI const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length);
3556
3557/**
3558 * Obtain the number of operands from an MDNode value.
3559 *
3560 * @param V MDNode to get number of operands from.
3561 * @return Number of operands of the MDNode.
3562 */
3564
3565/**
3566 * Obtain the given MDNode's operands.
3567 *
3568 * The passed LLVMValueRef pointer should point to enough memory to hold all of
3569 * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as
3570 * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the
3571 * MDNode's operands.
3572 *
3573 * @param V MDNode to get the operands from.
3574 * @param Dest Destination array for operands.
3575 */
3577
3578/**
3579 * Replace an operand at a specific index in a llvm::MDNode value.
3580 *
3581 * @see llvm::MDNode::replaceOperandWith()
3582 */
3584 LLVMMetadataRef Replacement);
3585
3586/** Deprecated: Use LLVMMDStringInContext2 instead. */
3588 unsigned SLen);
3589/** Deprecated: Use LLVMMDStringInContext2 instead. */
3591 LLVMValueRef LLVMMDString(const char *Str, unsigned SLen),
3592 "Use of the global context is deprecated, use LLVMMDStringInContext2 "
3593 "instead");
3594/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3596 LLVMValueRef *Vals, unsigned Count);
3597/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3599 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count),
3600 "Use of the global context is deprecated, use LLVMMDNodeInContext2 "
3601 "instead");
3602
3603/**
3604 * @}
3605 */
3606
3607/**
3608 * @defgroup LLVMCCoreOperandBundle Operand Bundles
3609 *
3610 * Functions in this group operate on LLVMOperandBundleRef instances that
3611 * correspond to llvm::OperandBundleDef instances.
3612 *
3613 * @see llvm::OperandBundleDef
3614 *
3615 * @{
3616 */
3617
3618/**
3619 * Create a new operand bundle.
3620 *
3621 * Every invocation should be paired with LLVMDisposeOperandBundle() or memory
3622 * will be leaked.
3623 *
3624 * @param Tag Tag name of the operand bundle
3625 * @param TagLen Length of Tag
3626 * @param Args Memory address of an array of bundle operands
3627 * @param NumArgs Length of Args
3628 */
3630 size_t TagLen,
3631 LLVMValueRef *Args,
3632 unsigned NumArgs);
3633
3634/**
3635 * Destroy an operand bundle.
3636 *
3637 * This must be called for every created operand bundle or memory will be
3638 * leaked.
3639 */
3641
3642/**
3643 * Obtain the tag of an operand bundle as a string.
3644 *
3645 * @param Bundle Operand bundle to obtain tag of.
3646 * @param Len Out parameter which holds the length of the returned string.
3647 * @return The tag name of Bundle.
3648 * @see OperandBundleDef::getTag()
3649 */
3651 size_t *Len);
3652
3653/**
3654 * Obtain the number of operands for an operand bundle.
3655 *
3656 * @param Bundle Operand bundle to obtain operand count of.
3657 * @return The number of operands.
3658 * @see OperandBundleDef::input_size()
3659 */
3661
3662/**
3663 * Obtain the operand for an operand bundle at the given index.
3664 *
3665 * @param Bundle Operand bundle to obtain operand of.
3666 * @param Index An operand index, must be less than
3667 * LLVMGetNumOperandBundleArgs().
3668 * @return The operand.
3669 */
3672
3673/**
3674 * @}
3675 */
3676
3677/**
3678 * @defgroup LLVMCCoreValueBasicBlock Basic Block
3679 *
3680 * A basic block represents a single entry single exit section of code.
3681 * Basic blocks contain a list of instructions which form the body of
3682 * the block.
3683 *
3684 * Basic blocks belong to functions. They have the type of label.
3685 *
3686 * Basic blocks are themselves values. However, the C API models them as
3687 * LLVMBasicBlockRef.
3688 *
3689 * @see llvm::BasicBlock
3690 *
3691 * @{
3692 */
3693
3694/**
3695 * Convert a basic block instance to a value type.
3696 */
3698
3699/**
3700 * Determine whether an LLVMValueRef is itself a basic block.
3701 */
3703
3704/**
3705 * Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
3706 */
3708
3709/**
3710 * Obtain the string name of a basic block.
3711 */
3713
3714/**
3715 * Obtain the function to which a basic block belongs.
3716 *
3717 * @see llvm::BasicBlock::getParent()
3718 */
3720
3721/**
3722 * Obtain the terminator instruction for a basic block.
3723 *
3724 * If the basic block does not have a terminator (it is not well-formed
3725 * if it doesn't), then NULL is returned.
3726 *
3727 * The returned LLVMValueRef corresponds to an llvm::Instruction.
3728 *
3729 * @see llvm::BasicBlock::getTerminator()
3730 */
3732
3733/**
3734 * Obtain the number of basic blocks in a function.
3735 *
3736 * @param Fn Function value to operate on.
3737 */
3739
3740/**
3741 * Obtain all of the basic blocks in a function.
3742 *
3743 * This operates on a function value. The BasicBlocks parameter is a
3744 * pointer to a pre-allocated array of LLVMBasicBlockRef of at least
3745 * LLVMCountBasicBlocks() in length. This array is populated with
3746 * LLVMBasicBlockRef instances.
3747 */
3749 LLVMBasicBlockRef *BasicBlocks);
3750
3751/**
3752 * Obtain the first basic block in a function.
3753 *
3754 * The returned basic block can be used as an iterator. You will likely
3755 * eventually call into LLVMGetNextBasicBlock() with it.
3756 *
3757 * @see llvm::Function::begin()
3758 */
3760
3761/**
3762 * Obtain the last basic block in a function.
3763 *
3764 * @see llvm::Function::end()
3765 */
3767
3768/**
3769 * Advance a basic block iterator.
3770 */
3772
3773/**
3774 * Go backwards in a basic block iterator.
3775 */
3777
3778/**
3779 * Obtain the basic block that corresponds to the entry point of a
3780 * function.
3781 *
3782 * @see llvm::Function::getEntryBlock()
3783 */
3785
3786/**
3787 * Insert the given basic block after the insertion point of the given builder.
3788 *
3789 * The insertion point must be valid.
3790 *
3791 * @see llvm::Function::BasicBlockListType::insertAfter()
3792 */
3793LLVM_C_ABI void
3796
3797/**
3798 * Append the given basic block to the basic block list of the given function.
3799 *
3800 * @see llvm::Function::BasicBlockListType::push_back()
3801 */
3804
3805/**
3806 * Create a new basic block without inserting it into a function.
3807 *
3808 * @see llvm::BasicBlock::Create()
3809 */
3811 const char *Name);
3812
3813/**
3814 * Append a basic block to the end of a function.
3815 *
3816 * @see llvm::BasicBlock::Create()
3817 */
3819 LLVMValueRef Fn,
3820 const char *Name);
3821
3822/**
3823 * Append a basic block to the end of a function using the global
3824 * context.
3825 *
3826 * @see llvm::BasicBlock::Create()
3827 */
3830 "Use of the global context is deprecated, use "
3831 "LLVMAppendBasicBlockInContext instead");
3832
3833/**
3834 * Insert a basic block in a function before another basic block.
3835 *
3836 * The function to add to is determined by the function of the
3837 * passed basic block.
3838 *
3839 * @see llvm::BasicBlock::Create()
3840 */
3843 const char *Name);
3844
3845/**
3846 * Insert a basic block in a function using the global context.
3847 *
3848 * @see llvm::BasicBlock::Create()
3849 */
3852 const char *Name),
3853 "Use of the global context is deprecated, use "
3854 "LLVMInsertBasicBlockInContext instead");
3855
3856/**
3857 * Remove a basic block from a function and delete it.
3858 *
3859 * This deletes the basic block from its containing function and deletes
3860 * the basic block itself.
3861 *
3862 * @see llvm::BasicBlock::eraseFromParent()
3863 */
3865
3866/**
3867 * Remove a basic block from a function.
3868 *
3869 * This deletes the basic block from its containing function but keep
3870 * the basic block alive.
3871 *
3872 * @see llvm::BasicBlock::removeFromParent()
3873 */
3875
3876/**
3877 * Move a basic block to before another one.
3878 *
3879 * @see llvm::BasicBlock::moveBefore()
3880 */
3882 LLVMBasicBlockRef MovePos);
3883
3884/**
3885 * Move a basic block to after another one.
3886 *
3887 * @see llvm::BasicBlock::moveAfter()
3888 */
3890 LLVMBasicBlockRef MovePos);
3891
3892/**
3893 * Obtain the first instruction in a basic block.
3894 *
3895 * The returned LLVMValueRef corresponds to a llvm::Instruction
3896 * instance.
3897 */
3899
3900/**
3901 * Obtain the last instruction in a basic block.
3902 *
3903 * The returned LLVMValueRef corresponds to an LLVM:Instruction.
3904 */
3906
3907/**
3908 * @}
3909 */
3910
3911/**
3912 * @defgroup LLVMCCoreValueInstruction Instructions
3913 *
3914 * Functions in this group relate to the inspection and manipulation of
3915 * individual instructions.
3916 *
3917 * In the C++ API, an instruction is modeled by llvm::Instruction. This
3918 * class has a large number of descendents. llvm::Instruction is a
3919 * llvm::Value and in the C API, instructions are modeled by
3920 * LLVMValueRef.
3921 *
3922 * This group also contains sub-groups which operate on specific
3923 * llvm::Instruction types, e.g. llvm::CallInst.
3924 *
3925 * @{
3926 */
3927
3928/**
3929 * Determine whether an instruction has any metadata attached.
3930 */
3932
3933/**
3934 * Return metadata associated with an instruction value.
3935 */
3937
3938/**
3939 * Set metadata associated with an instruction value.
3940 */
3941LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID,
3943
3944/**
3945 * Returns the metadata associated with an instruction value, but filters out
3946 * all the debug locations.
3947 *
3948 * @see llvm::Instruction::getAllMetadataOtherThanDebugLoc()
3949 */
3952 size_t *NumEntries);
3953
3954/**
3955 * Obtain the basic block to which an instruction belongs.
3956 *
3957 * @see llvm::Instruction::getParent()
3958 */
3960
3961/**
3962 * Obtain the instruction that occurs after the one specified.
3963 *
3964 * The next instruction will be from the same basic block.
3965 *
3966 * If this is the last instruction in a basic block, NULL will be
3967 * returned.
3968 */
3970
3971/**
3972 * Obtain the instruction that occurred before this one.
3973 *
3974 * If the instruction is the first instruction in a basic block, NULL
3975 * will be returned.
3976 */
3978
3979/**
3980 * Remove an instruction.
3981 *
3982 * The instruction specified is removed from its containing building
3983 * block but is kept alive.
3984 *
3985 * @see llvm::Instruction::removeFromParent()
3986 */
3988
3989/**
3990 * Remove and delete an instruction.
3991 *
3992 * The instruction specified is removed from its containing building
3993 * block and then deleted.
3994 *
3995 * @see llvm::Instruction::eraseFromParent()
3996 */
3998
3999/**
4000 * Delete an instruction.
4001 *
4002 * The instruction specified is deleted. It must have previously been
4003 * removed from its containing building block.
4004 *
4005 * @see llvm::Value::deleteValue()
4006 */
4008
4009/**
4010 * Obtain the code opcode for an individual instruction.
4011 *
4012 * @see llvm::Instruction::getOpCode()
4013 */
4015
4016/**
4017 * Obtain the predicate of an instruction.
4018 *
4019 * This is only valid for instructions that correspond to llvm::ICmpInst.
4020 *
4021 * @see llvm::ICmpInst::getPredicate()
4022 */
4024
4025/**
4026 * Get whether or not an icmp instruction has the samesign flag.
4027 *
4028 * This is only valid for instructions that correspond to llvm::ICmpInst.
4029 *
4030 * @see llvm::ICmpInst::hasSameSign()
4031 */
4033
4034/**
4035 * Set the samesign flag on an icmp instruction.
4036 *
4037 * This is only valid for instructions that correspond to llvm::ICmpInst.
4038 *
4039 * @see llvm::ICmpInst::setSameSign()
4040 */
4042
4043/**
4044 * Obtain the float predicate of an instruction.
4045 *
4046 * This is only valid for instructions that correspond to llvm::FCmpInst.
4047 *
4048 * @see llvm::FCmpInst::getPredicate()
4049 */
4051
4052/**
4053 * Create a copy of 'this' instruction that is identical in all ways
4054 * except the following:
4055 * * The instruction has no parent
4056 * * The instruction has no name
4057 *
4058 * @see llvm::Instruction::clone()
4059 */
4061
4062/**
4063 * Determine whether an instruction is a terminator. This routine is named to
4064 * be compatible with historical functions that did this by querying the
4065 * underlying C++ type.
4066 *
4067 * @see llvm::Instruction::isTerminator()
4068 */
4070
4071/**
4072 * Obtain the first debug record attached to an instruction.
4073 *
4074 * Use LLVMGetNextDbgRecord() and LLVMGetPreviousDbgRecord() to traverse the
4075 * sequence of DbgRecords.
4076 *
4077 * Return the first DbgRecord attached to Inst or NULL if there are none.
4078 *
4079 * @see llvm::Instruction::getDbgRecordRange()
4080 */
4082
4083/**
4084 * Obtain the last debug record attached to an instruction.
4085 *
4086 * Return the last DbgRecord attached to Inst or NULL if there are none.
4087 *
4088 * @see llvm::Instruction::getDbgRecordRange()
4089 */
4091
4092/**
4093 * Obtain the next DbgRecord in the sequence or NULL if there are no more.
4094 *
4095 * @see llvm::Instruction::getDbgRecordRange()
4096 */
4098
4099/**
4100 * Obtain the previous DbgRecord in the sequence or NULL if there are no more.
4101 *
4102 * @see llvm::Instruction::getDbgRecordRange()
4103 */
4106
4107/**
4108 * Get the debug location attached to the debug record.
4109 *
4110 * @see llvm::DbgRecord::getDebugLoc()
4111 */
4113
4115
4116/**
4117 * Get the value of the DbgVariableRecord.
4118 *
4119 * @see llvm::DbgVariableRecord::getValue()
4120 */
4122 unsigned OpIdx);
4123
4124/**
4125 * Get the debug info variable of the DbgVariableRecord.
4126 *
4127 * @see llvm::DbgVariableRecord::getVariable()
4128 */
4131
4132/**
4133 * Get the debug info expression of the DbgVariableRecord.
4134 *
4135 * @see llvm::DbgVariableRecord::getExpression()
4136 */
4139
4140/**
4141 * @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations
4142 *
4143 * Functions in this group apply to instructions that refer to call
4144 * sites and invocations. These correspond to C++ types in the
4145 * llvm::CallInst class tree.
4146 *
4147 * @{
4148 */
4149
4150/**
4151 * Obtain the argument count for a call instruction.
4152 *
4153 * This expects an LLVMValueRef that corresponds to a llvm::CallInst,
4154 * llvm::InvokeInst, or llvm:FuncletPadInst.
4155 *
4156 * @see llvm::CallInst::getNumArgOperands()
4157 * @see llvm::InvokeInst::getNumArgOperands()
4158 * @see llvm::FuncletPadInst::getNumArgOperands()
4159 */
4161
4162/**
4163 * Set the calling convention for a call instruction.
4164 *
4165 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4166 * llvm::InvokeInst.
4167 *
4168 * @see llvm::CallInst::setCallingConv()
4169 * @see llvm::InvokeInst::setCallingConv()
4170 */
4171LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
4172
4173/**
4174 * Obtain the calling convention for a call instruction.
4175 *
4176 * This is the opposite of LLVMSetInstructionCallConv(). Reads its
4177 * usage.
4178 *
4179 * @see LLVMSetInstructionCallConv()
4180 */
4182
4185 unsigned Align);
4186
4190 LLVMAttributeIndex Idx);
4193 LLVMAttributeRef *Attrs);
4196 unsigned KindID);
4198 LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
4201 unsigned KindID);
4204 const char *K, unsigned KLen);
4205
4206/**
4207 * Obtain the function type called by this instruction.
4208 *
4209 * @see llvm::CallBase::getFunctionType()
4210 */
4212
4213/**
4214 * Obtain the pointer to the function invoked by this instruction.
4215 *
4216 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4217 * llvm::InvokeInst.
4218 *
4219 * @see llvm::CallInst::getCalledOperand()
4220 * @see llvm::InvokeInst::getCalledOperand()
4221 */
4223
4224/**
4225 * Obtain the number of operand bundles attached to this instruction.
4226 *
4227 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4228 *
4229 * @see llvm::CallBase::getNumOperandBundles()
4230 */
4232
4233/**
4234 * Obtain the operand bundle attached to this instruction at the given index.
4235 * Use LLVMDisposeOperandBundle to free the operand bundle.
4236 *
4237 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4238 */
4240 unsigned Index);
4241
4242/**
4243 * Obtain whether a call instruction is a tail call.
4244 *
4245 * This only works on llvm::CallInst instructions.
4246 *
4247 * @see llvm::CallInst::isTailCall()
4248 */
4250
4251/**
4252 * Set whether a call instruction is a tail call.
4253 *
4254 * This only works on llvm::CallInst instructions.
4255 *
4256 * @see llvm::CallInst::setTailCall()
4257 */
4258LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall);
4259
4260/**
4261 * Obtain a tail call kind of the call instruction.
4262 *
4263 * @see llvm::CallInst::setTailCallKind()
4264 */
4266
4267/**
4268 * Set the call kind of the call instruction.
4269 *
4270 * @see llvm::CallInst::getTailCallKind()
4271 */
4273 LLVMTailCallKind kind);
4274
4275/**
4276 * Return the normal destination basic block.
4277 *
4278 * This only works on llvm::InvokeInst instructions.
4279 *
4280 * @see llvm::InvokeInst::getNormalDest()
4281 */
4283
4284/**
4285 * Return the unwind destination basic block.
4286 *
4287 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4288 * llvm::CatchSwitchInst instructions.
4289 *
4290 * @see llvm::InvokeInst::getUnwindDest()
4291 * @see llvm::CleanupReturnInst::getUnwindDest()
4292 * @see llvm::CatchSwitchInst::getUnwindDest()
4293 */
4295
4296/**
4297 * Set the normal destination basic block.
4298 *
4299 * This only works on llvm::InvokeInst instructions.
4300 *
4301 * @see llvm::InvokeInst::setNormalDest()
4302 */
4304
4305/**
4306 * Set the unwind destination basic block.
4307 *
4308 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4309 * llvm::CatchSwitchInst instructions.
4310 *
4311 * @see llvm::InvokeInst::setUnwindDest()
4312 * @see llvm::CleanupReturnInst::setUnwindDest()
4313 * @see llvm::CatchSwitchInst::setUnwindDest()
4314 */
4316
4317/**
4318 * Get the default destination of a CallBr instruction.
4319 *
4320 * @see llvm::CallBrInst::getDefaultDest()
4321 */
4323
4324/**
4325 * Get the number of indirect destinations of a CallBr instruction.
4326 *
4327 * @see llvm::CallBrInst::getNumIndirectDests()
4328
4329 */
4331
4332/**
4333 * Get the indirect destination of a CallBr instruction at the given index.
4334 *
4335 * @see llvm::CallBrInst::getIndirectDest()
4336 */
4338 unsigned Idx);
4339
4340/**
4341 * @}
4342 */
4343
4344/**
4345 * @defgroup LLVMCCoreValueInstructionTerminator Terminators
4346 *
4347 * Functions in this group only apply to instructions for which
4348 * LLVMIsATerminatorInst returns true.
4349 *
4350 * @{
4351 */
4352
4353/**
4354 * Return the number of successors that this terminator has.
4355 *
4356 * @see llvm::Instruction::getNumSuccessors
4357 */
4359
4360/**
4361 * Return the specified successor.
4362 *
4363 * @see llvm::Instruction::getSuccessor
4364 */
4366
4367/**
4368 * Update the specified successor to point at the provided block.
4369 *
4370 * @see llvm::Instruction::setSuccessor
4371 */
4372LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i,
4374
4375/**
4376 * Return if an instruction is a conditional branch.
4377 *
4378 * Deprecated: Use LLVMIsACondBrInst instead.
4379 */
4381
4382/**
4383 * Return the condition of a branch instruction.
4384 *
4385 * This only works on llvm::CondBrInst instructions.
4386 *
4387 * @see llvm::CondBrInst::getCondition
4388 */
4390
4391/**
4392 * Set the condition of a branch instruction.
4393 *
4394 * This only works on llvm::CondBrInst instructions.
4395 *
4396 * @see llvm::CondBrInst::setCondition
4397 */
4399
4400/**
4401 * Obtain the default destination basic block of a switch instruction.
4402 *
4403 * This only works on llvm::SwitchInst instructions.
4404 *
4405 * @see llvm::SwitchInst::getDefaultDest()
4406 */
4408
4409/**
4410 * Obtain the case value for a successor of a switch instruction. i corresponds
4411 * to the successor index. The first successor is the default destination, so i
4412 * must be greater than zero.
4413 *
4414 * This only works on llvm::SwitchInst instructions.
4415 *
4416 * @see llvm::SwitchInst::CaseHandle::getCaseValue()
4417 */
4419 unsigned i);
4420
4421/**
4422 * Set the case value for a successor of a switch instruction. i corresponds to
4423 * the successor index. The first successor is the default destination, so i
4424 * must be greater than zero.
4425 *
4426 * This only works on llvm::SwitchInst instructions.
4427 *
4428 * @see llvm::SwitchInst::CaseHandle::setValue()
4429 */
4430LLVM_C_ABI void LLVMSetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i,
4431 LLVMValueRef CaseValue);
4432
4433/**
4434 * @}
4435 */
4436
4437/**
4438 * @defgroup LLVMCCoreValueInstructionAlloca Allocas
4439 *
4440 * Functions in this group only apply to instructions that map to
4441 * llvm::AllocaInst instances.
4442 *
4443 * @{
4444 */
4445
4446/**
4447 * Obtain the type that is being allocated by the alloca instruction.
4448 */
4450
4451/**
4452 * @}
4453 */
4454
4455/**
4456 * @defgroup LLVMCCoreValueInstructionGetElementPointer GEPs
4457 *
4458 * Functions in this group only apply to instructions that map to
4459 * llvm::GetElementPtrInst instances.
4460 *
4461 * @{
4462 */
4463
4464/**
4465 * Check whether the given GEP operator is inbounds.
4466 */
4468
4469/**
4470 * Set the given GEP instruction to be inbounds or not.
4471 */
4473
4474/**
4475 * Get the source element type of the given GEP operator.
4476 */
4478
4479/**
4480 * Get the no-wrap related flags for the given GEP instruction.
4481 *
4482 * @see llvm::GetElementPtrInst::getNoWrapFlags
4483 */
4485
4486/**
4487 * Set the no-wrap related flags for the given GEP instruction.
4488 *
4489 * @see llvm::GetElementPtrInst::setNoWrapFlags
4490 */
4492 LLVMGEPNoWrapFlags NoWrapFlags);
4493
4494/**
4495 * @}
4496 */
4497
4498/**
4499 * @defgroup LLVMCCoreValueInstructionPHINode PHI Nodes
4500 *
4501 * Functions in this group only apply to instructions that map to
4502 * llvm::PHINode instances.
4503 *
4504 * @{
4505 */
4506
4507/**
4508 * Add an incoming value to the end of a PHI list.
4509 */
4511 LLVMValueRef *IncomingValues,
4512 LLVMBasicBlockRef *IncomingBlocks,
4513 unsigned Count);
4514
4515/**
4516 * Obtain the number of incoming basic blocks to a PHI node.
4517 */
4518LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode);
4519
4520/**
4521 * Obtain an incoming value to a PHI node as an LLVMValueRef.
4522 */
4524 unsigned Index);
4525
4526/**
4527 * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
4528 */
4530 unsigned Index);
4531
4532/**
4533 * @}
4534 */
4535
4536/**
4537 * @defgroup LLVMCCoreValueInstructionExtractValue ExtractValue
4538 * @defgroup LLVMCCoreValueInstructionInsertValue InsertValue
4539 *
4540 * Functions in this group only apply to instructions that map to
4541 * llvm::ExtractValue and llvm::InsertValue instances.
4542 *
4543 * @{
4544 */
4545
4546/**
4547 * Obtain the number of indices.
4548 * NB: This also works on GEP operators.
4549 */
4551
4552/**
4553 * Obtain the indices as an array.
4554 */
4555LLVM_C_ABI const unsigned *LLVMGetIndices(LLVMValueRef Inst);
4556
4557/**
4558 * @}
4559 */
4560
4561/**
4562 * @}
4563 */
4564
4565/**
4566 * @}
4567 */
4568
4569/**
4570 * @defgroup LLVMCCoreInstructionBuilder Instruction Builders
4571 *
4572 * An instruction builder represents a point within a basic block and is
4573 * the exclusive means of building instructions using the C interface.
4574 *
4575 * @{
4576 */
4577
4581 "Use of the global context is deprecated, use "
4582 "LLVMCreateBuilderInContext instead");
4583/**
4584 * Set the builder position before Instr but after any attached debug records,
4585 * or if Instr is null set the position to the end of Block.
4586 */
4588 LLVMBasicBlockRef Block,
4589 LLVMValueRef Instr);
4590/**
4591 * Set the builder position before Instr and any attached debug records,
4592 * or if Instr is null set the position to the end of Block.
4593 */
4595 LLVMBasicBlockRef Block,
4596 LLVMValueRef Inst);
4597/**
4598 * Set the builder position before Instr but after any attached debug records.
4599 */
4601 LLVMValueRef Instr);
4602/**
4603 * Set the builder position before Instr and any attached debug records.
4604 */
4605LLVM_C_ABI void
4607 LLVMValueRef Instr);
4609 LLVMBasicBlockRef Block);
4613 LLVMValueRef Instr);
4615 LLVMValueRef Instr,
4616 const char *Name);
4618
4619/* Metadata */
4620
4621/**
4622 * Get location information used by debugging information.
4623 *
4624 * @see llvm::IRBuilder::getCurrentDebugLocation()
4625 */
4627
4628/**
4629 * Set location information used by debugging information.
4630 *
4631 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
4632 *
4633 * @see llvm::IRBuilder::SetCurrentDebugLocation()
4634 */
4636 LLVMMetadataRef Loc);
4637
4638/**
4639 * Attempts to set the debug location for the given instruction using the
4640 * current debug location for the given builder. If the builder has no current
4641 * debug location, this function is a no-op.
4642 *
4643 * @deprecated LLVMSetInstDebugLocation is deprecated in favor of the more general
4644 * LLVMAddMetadataToInst.
4645 *
4646 * @see llvm::IRBuilder::SetInstDebugLocation()
4647 */
4649 LLVMValueRef Inst);
4650
4651/**
4652 * Adds the metadata registered with the given builder to the given instruction.
4653 *
4654 * @see llvm::IRBuilder::AddMetadataToInst()
4655 */
4657 LLVMValueRef Inst);
4658
4659/**
4660 * Get the dafult floating-point math metadata for a given builder.
4661 *
4662 * @see llvm::IRBuilder::getDefaultFPMathTag()
4663 */
4666
4667/**
4668 * Set the default floating-point math metadata for the given builder.
4669 *
4670 * To clear the metadata, pass NULL to \p FPMathTag.
4671 *
4672 * @see llvm::IRBuilder::setDefaultFPMathTag()
4673 */
4675 LLVMMetadataRef FPMathTag);
4676
4677/**
4678 * Obtain the context to which this builder is associated.
4679 *
4680 * @see llvm::IRBuilder::getContext()
4681 */
4683
4684/**
4685 * Deprecated: Passing the NULL location will crash.
4686 * Use LLVMGetCurrentDebugLocation2 instead.
4687 */
4689 LLVMValueRef L);
4690/**
4691 * Deprecated: Returning the NULL location will crash.
4692 * Use LLVMGetCurrentDebugLocation2 instead.
4693 */
4695
4696/* Terminators */
4700 LLVMValueRef *RetVals,
4701 unsigned N);
4704 LLVMBasicBlockRef Then,
4705 LLVMBasicBlockRef Else);
4707 LLVMBasicBlockRef Else,
4708 unsigned NumCases);
4710 unsigned NumDests);
4713 LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests,
4714 unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs,
4715 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4717 LLVMValueRef Fn, LLVMValueRef *Args,
4718 unsigned NumArgs,
4719 LLVMBasicBlockRef Then,
4720 LLVMBasicBlockRef Catch,
4721 const char *Name);
4724 unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
4725 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4727
4728/* Exception Handling */
4731 LLVMValueRef PersFn,
4732 unsigned NumClauses,
4733 const char *Name);
4735 LLVMValueRef CatchPad,
4738 LLVMValueRef CatchPad,
4741 LLVMValueRef ParentPad,
4742 LLVMValueRef *Args, unsigned NumArgs,
4743 const char *Name);
4745 LLVMValueRef ParentPad,
4746 LLVMValueRef *Args,
4747 unsigned NumArgs, const char *Name);
4749 LLVMValueRef ParentPad,
4750 LLVMBasicBlockRef UnwindBB,
4751 unsigned NumHandlers,
4752 const char *Name);
4753
4754/* Add a case to the switch instruction */
4756 LLVMBasicBlockRef Dest);
4757
4758/* Add a destination to the indirectbr instruction */
4760 LLVMBasicBlockRef Dest);
4761
4762/* Get the number of clauses on the landingpad instruction */
4763LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
4764
4765/* Get the value of the clause at index Idx on the landingpad instruction */
4766LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
4767
4768/* Add a catch or filter clause to the landingpad instruction */
4769LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal);
4770
4771/* Get the 'cleanup' flag in the landingpad instruction */
4773
4774/* Set the 'cleanup' flag in the landingpad instruction */
4775LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val);
4776
4777/* Add a destination to the catchswitch instruction */
4778LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch,
4779 LLVMBasicBlockRef Dest);
4780
4781/* Get the number of handlers on the catchswitch instruction */
4782LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch);
4783
4784/**
4785 * Obtain the basic blocks acting as handlers for a catchswitch instruction.
4786 *
4787 * The Handlers parameter should point to a pre-allocated array of
4788 * LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the
4789 * first LLVMGetNumHandlers() entries in the array will be populated
4790 * with LLVMBasicBlockRef instances.
4791 *
4792 * @param CatchSwitch The catchswitch instruction to operate on.
4793 * @param Handlers Memory address of an array to be filled with basic blocks.
4794 */
4795LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch,
4796 LLVMBasicBlockRef *Handlers);
4797
4798/* Funclets */
4799
4800/* Get the number of funcletpad arguments. */
4802
4803/* Set a funcletpad argument at the given index. */
4804LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i,
4805 LLVMValueRef value);
4806
4807/**
4808 * Get the parent catchswitch instruction of a catchpad instruction.
4809 *
4810 * This only works on llvm::CatchPadInst instructions.
4811 *
4812 * @see llvm::CatchPadInst::getCatchSwitch()
4813 */
4815
4816/**
4817 * Set the parent catchswitch instruction of a catchpad instruction.
4818 *
4819 * This only works on llvm::CatchPadInst instructions.
4820 *
4821 * @see llvm::CatchPadInst::setCatchSwitch()
4822 */
4824 LLVMValueRef CatchSwitch);
4825
4826/* Arithmetic */
4828 LLVMValueRef RHS, const char *Name);
4830 LLVMValueRef RHS, const char *Name);
4832 LLVMValueRef RHS, const char *Name);
4834 LLVMValueRef RHS, const char *Name);
4836 LLVMValueRef RHS, const char *Name);
4838 LLVMValueRef RHS, const char *Name);
4840 LLVMValueRef RHS, const char *Name);
4842 LLVMValueRef RHS, const char *Name);
4844 LLVMValueRef RHS, const char *Name);
4846 LLVMValueRef RHS, const char *Name);
4848 LLVMValueRef RHS, const char *Name);
4850 LLVMValueRef RHS, const char *Name);
4852 LLVMValueRef RHS, const char *Name);
4854 LLVMValueRef RHS, const char *Name);
4856 LLVMValueRef RHS, const char *Name);
4858 LLVMValueRef RHS, const char *Name);
4860 LLVMValueRef RHS, const char *Name);
4862 LLVMValueRef RHS, const char *Name);
4864 LLVMValueRef RHS, const char *Name);
4866 LLVMValueRef RHS, const char *Name);
4868 LLVMValueRef RHS, const char *Name);
4870 LLVMValueRef RHS, const char *Name);
4872 LLVMValueRef RHS, const char *Name);
4874 LLVMValueRef RHS, const char *Name);
4876 LLVMValueRef RHS, const char *Name);
4878 LLVMValueRef RHS, const char *Name);
4881 const char *Name);
4883 const char *Name);
4885 const char *Name);
4888 const char *Name),
4889 "Use LLVMBuildNeg + LLVMSetNUW instead.");
4891 const char *Name);
4893 const char *Name);
4894
4896LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW);
4898LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
4900LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact);
4901
4902/**
4903 * Gets if the instruction has the non-negative flag set.
4904 * Only valid for zext instructions.
4905 */
4907/**
4908 * Sets the non-negative flag for the instruction.
4909 * Only valid for zext instructions.
4910 */
4911LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg);
4912
4913/**
4914 * Get the flags for which fast-math-style optimizations are allowed for this
4915 * value.
4916 *
4917 * Only valid on floating point instructions.
4918 * @see LLVMCanValueUseFastMathFlags
4919 */
4921
4922/**
4923 * Sets the flags for which fast-math-style optimizations are allowed for this
4924 * value.
4925 *
4926 * Only valid on floating point instructions.
4927 * @see LLVMCanValueUseFastMathFlags
4928 */
4930 LLVMFastMathFlags FMF);
4931
4932/**
4933 * Check if a given value can potentially have fast math flags.
4934 *
4935 * Will return true for floating point arithmetic instructions, and for select,
4936 * phi, and call instructions whose type is a floating point type, or a vector
4937 * or array thereof. See https://llvm.org/docs/LangRef.html#fast-math-flags
4938 */
4940
4941/**
4942 * Gets whether the instruction has the disjoint flag set.
4943 * Only valid for or instructions.
4944 */
4946/**
4947 * Sets the disjoint flag for the instruction.
4948 * Only valid for or instructions.
4949 */
4950LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint);
4951
4952/* Memory */
4954 const char *Name);
4956 LLVMValueRef Val,
4957 const char *Name);
4958
4959/**
4960 * Creates and inserts a memset to the specified pointer and the
4961 * specified value.
4962 *
4963 * @see llvm::IRRBuilder::CreateMemSet()
4964 */
4966 LLVMValueRef Val, LLVMValueRef Len,
4967 unsigned Align);
4968/**
4969 * Creates and inserts a memcpy between the specified pointers.
4970 *
4971 * @see llvm::IRRBuilder::CreateMemCpy()
4972 */
4974 unsigned DstAlign, LLVMValueRef Src,
4975 unsigned SrcAlign, LLVMValueRef Size);
4976/**
4977 * Creates and inserts a memmove between the specified pointers.
4978 *
4979 * @see llvm::IRRBuilder::CreateMemMove()
4980 */
4982 unsigned DstAlign, LLVMValueRef Src,
4983 unsigned SrcAlign, LLVMValueRef Size);
4984
4986 const char *Name);
4988 LLVMValueRef Val,
4989 const char *Name);
4992 LLVMValueRef PointerVal,
4993 const char *Name);
4995 LLVMValueRef Ptr);
4997 LLVMValueRef Pointer,
4998 LLVMValueRef *Indices,
4999 unsigned NumIndices, const char *Name);
5001 LLVMValueRef Pointer,
5002 LLVMValueRef *Indices,
5003 unsigned NumIndices,
5004 const char *Name);
5005/**
5006 * Creates a GetElementPtr instruction. Similar to LLVMBuildGEP2, but allows
5007 * specifying the no-wrap flags.
5008 *
5009 * @see llvm::IRBuilder::CreateGEP()
5010 */
5013 LLVMValueRef *Indices, unsigned NumIndices, const char *Name,
5014 LLVMGEPNoWrapFlags NoWrapFlags);
5016 LLVMValueRef Pointer, unsigned Idx,
5017 const char *Name);
5019 const char *Name);
5020/**
5021 * Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
5022 */
5024 const char *Str,
5025 const char *Name);
5027LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst,
5028 LLVMBool IsVolatile);
5030LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
5032LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst,
5033 LLVMAtomicOrdering Ordering);
5036 LLVMAtomicRMWBinOp BinOp);
5037
5038/* Casts */
5040 LLVMTypeRef DestTy, const char *Name);
5042 LLVMTypeRef DestTy, const char *Name);
5044 LLVMTypeRef DestTy, const char *Name);
5046 LLVMTypeRef DestTy, const char *Name);
5048 LLVMTypeRef DestTy, const char *Name);
5050 LLVMTypeRef DestTy, const char *Name);
5052 LLVMTypeRef DestTy, const char *Name);
5054 LLVMTypeRef DestTy, const char *Name);
5056 LLVMTypeRef DestTy, const char *Name);
5058 LLVMTypeRef DestTy, const char *Name);
5060 LLVMTypeRef DestTy, const char *Name);
5062 LLVMTypeRef DestTy, const char *Name);
5064 LLVMTypeRef DestTy,
5065 const char *Name);
5067 LLVMTypeRef DestTy,
5068 const char *Name);
5070 LLVMTypeRef DestTy,
5071 const char *Name);
5073 LLVMValueRef Val,
5074 LLVMTypeRef DestTy,
5075 const char *Name);
5077 LLVMValueRef Val, LLVMTypeRef DestTy,
5078 const char *Name);
5080 LLVMTypeRef DestTy,
5081 const char *Name);
5083 LLVMTypeRef DestTy, LLVMBool IsSigned,
5084 const char *Name);
5086 LLVMTypeRef DestTy, const char *Name);
5087
5088/** Deprecated: This cast is always signed. Use LLVMBuildIntCast2 instead. */
5090 LLVMValueRef Val, /*Signed cast!*/
5091 LLVMTypeRef DestTy, const char *Name);
5092
5094 LLVMTypeRef DestTy,
5095 LLVMBool DestIsSigned);
5096
5097/* Comparisons */
5100 const char *Name);
5103 const char *Name);
5104
5105/* Miscellaneous instructions */
5107 const char *Name);
5109 LLVMValueRef Fn, LLVMValueRef *Args,
5110 unsigned NumArgs, const char *Name);
5113 unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles,
5114 const char *Name);
5116 LLVMValueRef Then, LLVMValueRef Else,
5117 const char *Name);
5119 LLVMTypeRef Ty, const char *Name);
5121 LLVMValueRef VecVal,
5122 LLVMValueRef Index,
5123 const char *Name);
5125 LLVMValueRef VecVal,
5126 LLVMValueRef EltVal,
5127 LLVMValueRef Index,
5128 const char *Name);
5130 LLVMValueRef V2,
5131 LLVMValueRef Mask,
5132 const char *Name);
5134 LLVMValueRef AggVal,
5135 unsigned Index, const char *Name);
5137 LLVMValueRef AggVal,
5138 LLVMValueRef EltVal,
5139 unsigned Index, const char *Name);
5141 const char *Name);
5142
5144 const char *Name);
5146 const char *Name);
5149 const char *Name);
5151 LLVMAtomicOrdering ordering,
5152 LLVMBool singleThread, const char *Name);
5154 LLVMAtomicOrdering ordering,
5155 unsigned SSID,
5156 const char *Name);
5159 LLVMValueRef PTR, LLVMValueRef Val,
5160 LLVMAtomicOrdering ordering,
5161 LLVMBool singleThread);
5164 LLVMAtomicOrdering ordering, unsigned SSID);
5167 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5171 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5172 unsigned SSID);
5173
5174/**
5175 * Get the number of elements in the mask of a ShuffleVector instruction.
5176 */
5177LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
5178
5179/**
5180 * \returns a constant that specifies that the result of a \c ShuffleVectorInst
5181 * is undefined.
5182 */
5184
5185/**
5186 * Get the mask value at position Elt in the mask of a ShuffleVector
5187 * instruction.
5188 *
5189 * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is
5190 * poison at that position.
5191 */
5192LLVM_C_ABI int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
5193
5197
5198/**
5199 * Returns whether an instruction is an atomic instruction, e.g., atomicrmw,
5200 * cmpxchg, fence, or loads and stores with atomic ordering.
5201 */
5203
5204/**
5205 * Returns the synchronization scope ID of an atomic instruction.
5206 */
5208
5209/**
5210 * Sets the synchronization scope ID of an atomic instruction.
5211 */
5213 unsigned SSID);
5214
5218 LLVMAtomicOrdering Ordering);
5222 LLVMAtomicOrdering Ordering);
5223
5224/**
5225 * @}
5226 */
5227
5228/**
5229 * @defgroup LLVMCCoreModuleProvider Module Providers
5230 *
5231 * @{
5232 */
5233
5234/**
5235 * Changes the type of M so it can be passed to FunctionPassManagers and the
5236 * JIT. They take ModuleProviders for historical reasons.
5237 */
5240
5241/**
5242 * Destroys the module M.
5243 */
5245
5246/**
5247 * @}
5248 */
5249
5250/**
5251 * @defgroup LLVMCCoreMemoryBuffers Memory Buffers
5252 *
5253 * @{
5254 */
5255
5257 const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5259 LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5261 const char *InputData, size_t InputDataLength, const char *BufferName,
5262 LLVMBool RequiresNullTerminator);
5264 const char *InputData, size_t InputDataLength, const char *BufferName);
5268
5269/**
5270 * @}
5271 */
5272
5273/**
5274 * @defgroup LLVMCCorePassManagers Pass Managers
5275 * @ingroup LLVMCCore
5276 *
5277 * @{
5278 */
5279
5280/** Constructs a new whole-module pass pipeline. This type of pipeline is
5281 suitable for link-time optimization and whole-module transformations.
5282 @see llvm::PassManager::PassManager */
5284
5285/** Constructs a new function-by-function pass pipeline over the module
5286 provider. It does not take ownership of the module provider. This type of
5287 pipeline is suitable for code generation and JIT compilation tasks.
5288 @see llvm::FunctionPassManager::FunctionPassManager */
5291
5292/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */
5295
5296/** Initializes, executes on the provided module, and finalizes all of the
5297 passes scheduled in the pass manager. Returns 1 if any of the passes
5298 modified the module, 0 otherwise.
5299 @see llvm::PassManager::run(Module&) */
5301
5302/** Initializes all of the function passes scheduled in the function pass
5303 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5304 @see llvm::FunctionPassManager::doInitialization */
5306
5307/** Executes all of the function passes scheduled in the function pass manager
5308 on the provided function. Returns 1 if any of the passes modified the
5309 function, false otherwise.
5310 @see llvm::FunctionPassManager::run(Function&) */
5312 LLVMValueRef F);
5313
5314/** Finalizes all of the function passes scheduled in the function pass
5315 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5316 @see llvm::FunctionPassManager::doFinalization */
5318
5319/** Frees the memory of a pass pipeline. For function pipelines, does not free
5320 the module provider.
5321 @see llvm::PassManagerBase::~PassManagerBase. */
5323
5324/**
5325 * @}
5326 */
5327
5328/**
5329 * @defgroup LLVMCCoreThreading Threading
5330 *
5331 * Handle the structures needed to make LLVM safe for multithreading.
5332 *
5333 * @{
5334 */
5335
5336/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5337 time define LLVM_ENABLE_THREADS. This function always returns
5338 LLVMIsMultithreaded(). */
5340
5341/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5342 time define LLVM_ENABLE_THREADS. */
5344
5345/** Check whether LLVM is executing in thread-safe mode or not.
5346 @see llvm::llvm_is_multithreaded */
5348
5349/**
5350 * @}
5351 */
5352
5353/**
5354 * @}
5355 */
5356
5357/**
5358 * @}
5359 */
5360
5362
5363#endif /* LLVM_C_CORE_H */
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:1695
LLVMTypeRef LLVMInt64Type(void)
Definition Core.cpp:723
LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Definition Core.cpp:1742
LLVMBasicBlockRef LLVMAppendBasicBlock(LLVMValueRef FnRef, const char *Name)
Definition Core.cpp:2950
LLVMTypeRef LLVMVoidType(void)
Definition Core.cpp:982
LLVMValueRef LLVMMDString(const char *Str, unsigned SLen)
Definition Core.cpp:1322
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:2961
LLVMValueRef LLVMBuildNUWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3901
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:1685
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:3411
LLVMTypeRef LLVMInt128Type(void)
Definition Core.cpp:726
LLVMValueRef LLVMConstNUWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1841
LLVMTypeRef LLVMInt16Type(void)
Definition Core.cpp:717
LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count)
Definition Core.cpp:1353
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:3531
LLVM_C_ABI LLVMValueRef LLVMBuildMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3795
LLVM_C_ABI LLVMValueRef LLVMBuildRetVoid(LLVMBuilderRef)
Definition Core.cpp:3523
LLVM_C_ABI LLVMValueRef LLVMBuildSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3775
LLVM_C_ABI LLVMValueRef LLVMBuildNUWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3805
LLVM_C_ABI LLVMBool LLVMGetWeak(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4234
LLVM_C_ABI LLVMValueRef LLVMBuildCast(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4362
LLVM_C_ABI LLVMValueRef LLVMBuildIsNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4491
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:4192
LLVM_C_ABI LLVMValueRef LLVMBuildAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3755
LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak)
Definition Core.cpp:4238
LLVM_C_ABI LLVMValueRef LLVMBuildOr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3875
LLVM_C_ABI LLVMValueRef LLVMBuildBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4334
LLVM_C_ABI LLVMValueRef LLVMBuildExactUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3820
LLVM_C_ABI LLVMValueRef LLVMBuildGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4177
LLVM_C_ABI LLVMValueRef LLVMBuildNSWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3780
LLVM_C_ABI void LLVMPositionBuilderBeforeInstrAndDbgRecords(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr and any attached debug records.
Definition Core.cpp:3440
LLVM_C_ABI LLVMValueRef LLVMBuildIsNotNull(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4496
LLVM_C_ABI void LLVMDisposeBuilder(LLVMBuilderRef Builder)
Definition Core.cpp:3468
LLVM_C_ABI void LLVMClearInsertionPosition(LLVMBuilderRef Builder)
Definition Core.cpp:3455
LLVM_C_ABI LLVMValueRef LLVMBuildLandingPad(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef PersFn, unsigned NumClauses, const char *Name)
Definition Core.cpp:3597
LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint)
Sets the disjoint flag for the instruction.
Definition Core.cpp:3978
LLVM_C_ABI LLVMBool LLVMIsAtomicSingleThread(LLVMValueRef AtomicInst)
Definition Core.cpp:4574
LLVM_C_ABI LLVMValueRef LLVMBuildResume(LLVMBuilderRef B, LLVMValueRef Exn)
Definition Core.cpp:3627
LLVM_C_ABI void LLVMSetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst, LLVMAtomicRMWBinOp BinOp)
Definition Core.cpp:4273
LLVM_C_ABI LLVMValueRef LLVMBuildFDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3835
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:3583
LLVM_C_ABI LLVMValueRef LLVMBuildXor(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3880
LLVM_C_ABI LLVMBool LLVMGetExact(LLVMValueRef DivOrShrInst)
Definition Core.cpp:3937
LLVM_C_ABI LLVMValueRef LLVMBuildAddrSpaceCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4339
LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst)
Get the number of elements in the mask of a ShuffleVector instruction.
Definition Core.cpp:4556
LLVM_C_ABI void LLVMInsertIntoBuilder(LLVMBuilderRef Builder, LLVMValueRef Instr)
Definition Core.cpp:3459
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3648
LLVM_C_ABI LLVMValueRef LLVMBuildFPToSI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4299
LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch, LLVMBasicBlockRef *Handlers)
Obtain the basic blocks acting as handlers for a catchswitch instruction.
Definition Core.cpp:3695
LLVM_C_ABI LLVMValueRef LLVMBuildTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4279
LLVM_C_ABI LLVMValueRef LLVMGetArgOperand(LLVMValueRef Funclet, unsigned i)
Definition Core.cpp:3712
LLVM_C_ABI LLVMValueRef LLVMBuildAnd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3870
LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch)
Definition Core.cpp:3691
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:3555
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInsertBlock(LLVMBuilderRef Builder)
Definition Core.cpp:3451
LLVM_C_ABI LLVMValueRef LLVMBuildSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3825
LLVM_C_ABI LLVMValueRef LLVMBuildSExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4350
LLVM_C_ABI LLVMValueRef LLVMBuildCall2(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:4419
LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW)
Definition Core.cpp:3932
LLVM_C_ABI LLVMMetadataRef LLVMGetCurrentDebugLocation2(LLVMBuilderRef Builder)
Get location information used by debugging information.
Definition Core.cpp:3474
LLVM_C_ABI LLVMValueRef LLVMBuildUDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3815
LLVM_C_ABI LLVMValueRef LLVMBuildSelect(LLVMBuilderRef, LLVMValueRef If, LLVMValueRef Then, LLVMValueRef Else, const char *Name)
Definition Core.cpp:4442
LLVM_C_ABI void LLVMPositionBuilderBefore(LLVMBuilderRef Builder, LLVMValueRef Instr)
Set the builder position before Instr but after any attached debug records.
Definition Core.cpp:3435
LLVM_C_ABI LLVMBool LLVMCanValueUseFastMathFlags(LLVMValueRef Inst)
Check if a given value can potentially have fast math flags.
Definition Core.cpp:3968
LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i, LLVMValueRef value)
Definition Core.cpp:3716
LLVM_C_ABI LLVMValueRef LLVMBuildCondBr(LLVMBuilderRef, LLVMValueRef If, LLVMBasicBlockRef Then, LLVMBasicBlockRef Else)
Definition Core.cpp:3540
LLVM_C_ABI LLVMBool LLVMGetNUW(LLVMValueRef ArithInst)
Definition Core.cpp:3917
LLVM_C_ABI LLVMOpcode LLVMGetCastOpcode(LLVMValueRef Src, LLVMBool SrcIsSigned, LLVMTypeRef DestTy, LLVMBool DestIsSigned)
Definition Core.cpp:4391
LLVM_C_ABI void LLVMInsertIntoBuilderWithName(LLVMBuilderRef Builder, LLVMValueRef Instr, const char *Name)
Definition Core.cpp:3463
LLVM_C_ABI LLVMValueRef LLVMBuildSRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3845
LLVM_C_ABI LLVMValueRef LLVMBuildCleanupPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3616
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Deprecated: This cast is always signed.
Definition Core.cpp:4380
LLVM_C_ABI LLVMValueRef LLVMGetCurrentDebugLocation(LLVMBuilderRef Builder)
Deprecated: Returning the NULL location will crash.
Definition Core.cpp:3491
LLVM_C_ABI LLVMValueRef LLVMBuildExtractElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4454
LLVM_C_ABI LLVMValueRef LLVMBuildShl(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3855
LLVM_C_ABI LLVMBuilderRef LLVMCreateBuilderInContext(LLVMContextRef C)
Definition Core.cpp:3407
LLVM_C_ABI LLVMValueRef LLVMBuildCatchRet(LLVMBuilderRef B, LLVMValueRef CatchPad, LLVMBasicBlockRef BB)
Definition Core.cpp:3642
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:4019
LLVM_C_ABI LLVMAtomicOrdering LLVMGetOrdering(LLVMValueRef MemoryAccessInst)
Definition Core.cpp:4242
LLVM_C_ABI LLVMValueRef LLVMBuildStructGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, unsigned Idx, const char *Name)
Definition Core.cpp:4202
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:4562
LLVM_C_ABI void LLVMAddCase(LLVMValueRef Switch, LLVMValueRef OnVal, LLVMBasicBlockRef Dest)
Definition Core.cpp:3658
LLVM_C_ABI LLVMValueRef LLVMBuildBr(LLVMBuilderRef, LLVMBasicBlockRef Dest)
Definition Core.cpp:3536
LLVM_C_ABI LLVMValueRef LLVMBuildInsertElement(LLVMBuilderRef, LLVMValueRef VecVal, LLVMValueRef EltVal, LLVMValueRef Index, const char *Name)
Definition Core.cpp:4460
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:3428
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:3963
LLVM_C_ABI LLVMValueRef LLVMBuildIntCast2(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, LLVMBool IsSigned, const char *Name)
Definition Core.cpp:4373
LLVM_C_ABI LLVMValueRef LLVMBuildNUWSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3785
LLVM_C_ABI LLVMValueRef LLVMBuildFAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3770
LLVM_C_ABI LLVMValueRef LLVMBuildCatchPad(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMValueRef *Args, unsigned NumArgs, const char *Name)
Definition Core.cpp:3609
LLVM_C_ABI LLVMValueRef LLVMBuildCallWithOperandBundles(LLVMBuilderRef, LLVMTypeRef, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name)
Definition Core.cpp:4428
LLVM_C_ABI LLVMBool LLVMIsCleanup(LLVMValueRef LandingPad)
Definition Core.cpp:3679
LLVM_C_ABI LLVMValueRef LLVMBuildZExtOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4344
LLVM_C_ABI LLVMBool LLVMGetVolatile(LLVMValueRef Inst)
Definition Core.cpp:4219
LLVM_C_ABI LLVMValueRef LLVMBuildFPCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4386
LLVM_C_ABI LLVMValueRef LLVMBuildPtrToInt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4324
LLVM_C_ABI LLVMValueRef LLVMBuildPtrDiff2(LLVMBuilderRef, LLVMTypeRef ElemTy, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4501
LLVM_C_ABI LLVMValueRef LLVMBuildTruncOrBitCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4356
LLVM_C_ABI LLVMValueRef LLVMBuildArrayAlloca(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4033
LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx)
Definition Core.cpp:3671
LLVM_C_ABI unsigned LLVMGetAtomicSyncScopeID(LLVMValueRef AtomicInst)
Returns the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4593
LLVM_C_ABI LLVMValueRef LLVMBuildVAArg(LLVMBuilderRef, LLVMValueRef List, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4449
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchgSyncScope(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, unsigned SSID)
Definition Core.cpp:4545
LLVM_C_ABI LLVMValueRef LLVMBuildBinOp(LLVMBuilderRef B, LLVMOpcode Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3885
LLVM_C_ABI LLVMBool LLVMIsAtomic(LLVMValueRef Inst)
Returns whether an instruction is an atomic instruction, e.g., atomicrmw, cmpxchg,...
Definition Core.cpp:4570
LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst, LLVMBool IsVolatile)
Definition Core.cpp:4223
LLVM_C_ABI void LLVMSetAtomicSingleThread(LLVMValueRef AtomicInst, LLVMBool SingleThread)
Definition Core.cpp:4583
LLVM_C_ABI LLVMValueRef LLVMBuildFRem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3850
LLVM_C_ABI LLVMValueRef LLVMBuildURem(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3840
LLVM_C_ABI LLVMValueRef LLVMBuildIntToPtr(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4329
LLVM_C_ABI LLVMBool LLVMGetNSW(LLVMValueRef ArithInst)
Definition Core.cpp:3927
LLVM_C_ABI LLVMValueRef LLVMBuildNSWMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3800
LLVM_C_ABI LLVMValueRef LLVMBuildFree(LLVMBuilderRef, LLVMValueRef PointerVal)
Definition Core.cpp:4038
LLVM_C_ABI LLVMValueRef LLVMBuildNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3892
LLVM_C_ABI LLVMValueRef LLVMBuildFSub(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3790
LLVM_C_ABI LLVMValueRef LLVMBuildCatchSwitch(LLVMBuilderRef B, LLVMValueRef ParentPad, LLVMBasicBlockRef UnwindBB, unsigned NumHandlers, const char *Name)
Definition Core.cpp:3631
LLVM_C_ABI LLVMValueRef LLVMBuildLoad2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef PointerVal, const char *Name)
Definition Core.cpp:4042
LLVM_C_ABI LLVMValueRef LLVMBuildInBoundsGEP2(LLVMBuilderRef B, LLVMTypeRef Ty, LLVMValueRef Pointer, LLVMValueRef *Indices, unsigned NumIndices, const char *Name)
Definition Core.cpp:4184
LLVM_C_ABI LLVMValueRef LLVMBuildArrayMalloc(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Val, const char *Name)
Definition Core.cpp:3994
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Ptr, LLVMValueRef Cmp, LLVMValueRef New, LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering, LLVMBool SingleThread)
Definition Core.cpp:4532
LLVM_C_ABI LLVMValueRef LLVMBuildIndirectBr(LLVMBuilderRef B, LLVMValueRef Addr, unsigned NumDests)
Definition Core.cpp:3550
LLVM_C_ABI LLVMValueRef LLVMBuildUnreachable(LLVMBuilderRef)
Definition Core.cpp:3654
LLVM_C_ABI LLVMValueRef LLVMBuildSIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4309
LLVM_C_ABI LLVMValueRef LLVMBuildSExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4289
LLVM_C_ABI LLVMValueRef LLVMBuildFPToUI(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4294
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:3497
LLVM_C_ABI void LLVMSetCurrentDebugLocation2(LLVMBuilderRef Builder, LLVMMetadataRef Loc)
Set location information used by debugging information.
Definition Core.cpp:3478
LLVM_C_ABI LLVMValueRef LLVMBuildAlloca(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4028
LLVM_C_ABI void LLVMSetCurrentDebugLocation(LLVMBuilderRef Builder, LLVMValueRef L)
Deprecated: Passing the NULL location will crash.
Definition Core.cpp:3485
LLVM_C_ABI LLVMValueRef LLVMBuildPhi(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:4415
LLVM_C_ABI void LLVMAddDestination(LLVMValueRef IndirectBr, LLVMBasicBlockRef Dest)
Definition Core.cpp:3663
LLVM_C_ABI LLVMBool LLVMGetNNeg(LLVMValueRef NonNegInst)
Gets if the instruction has the non-negative flag set.
Definition Core.cpp:3947
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMWSyncScope(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, unsigned SSID)
Definition Core.cpp:4521
LLVM_C_ABI LLVMValueRef LLVMBuildRet(LLVMBuilderRef, LLVMValueRef V)
Definition Core.cpp:3527
LLVM_C_ABI LLVMMetadataRef LLVMBuilderGetDefaultFPMathTag(LLVMBuilderRef Builder)
Get the dafult floating-point math metadata for a given builder.
Definition Core.cpp:3517
LLVM_C_ABI LLVMValueRef LLVMBuildExtractValue(LLVMBuilderRef, LLVMValueRef AggVal, unsigned Index, const char *Name)
Definition Core.cpp:4474
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalStringPtr(LLVMBuilderRef B, const char *Str, const char *Name)
Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
Definition Core.cpp:4214
LLVM_C_ABI LLVMValueRef LLVMBuildNSWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3760
LLVM_C_ABI void LLVMPositionBuilderAtEnd(LLVMBuilderRef Builder, LLVMBasicBlockRef Block)
Definition Core.cpp:3446
LLVM_C_ABI LLVMValueRef LLVMBuildFMul(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3810
LLVM_C_ABI LLVMValueRef LLVMBuildLShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3860
LLVM_C_ABI LLVMAtomicRMWBinOp LLVMGetAtomicRMWBinOp(LLVMValueRef AtomicRMWInst)
Definition Core.cpp:4269
LLVM_C_ABI LLVMValueRef LLVMBuildFNeg(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3909
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:4003
LLVM_C_ABI void LLVMSetAtomicSyncScopeID(LLVMValueRef AtomicInst, unsigned SSID)
Sets the synchronization scope ID of an atomic instruction.
Definition Core.cpp:4599
LLVM_C_ABI LLVMContextRef LLVMGetBuilderContext(LLVMBuilderRef Builder)
Obtain the context to which this builder is associated.
Definition Core.cpp:3513
LLVM_C_ABI LLVMValueRef LLVMBuildMalloc(LLVMBuilderRef, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:3985
LLVM_C_ABI LLVMValueRef LLVMBuildFreeze(LLVMBuilderRef, LLVMValueRef Val, const char *Name)
Definition Core.cpp:4486
LLVM_C_ABI LLVMValueRef LLVMBuildGlobalString(LLVMBuilderRef B, const char *Str, const char *Name)
Definition Core.cpp:4209
LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW)
Definition Core.cpp:3922
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4605
LLVM_C_ABI LLVMValueRef LLVMBuildFCmp(LLVMBuilderRef, LLVMRealPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4406
LLVM_C_ABI LLVMValueRef LLVMBuildPointerCast(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4368
LLVM_C_ABI LLVMValueRef LLVMBuildExactSDiv(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3830
LLVM_C_ABI LLVMValueRef LLVMBuildShuffleVector(LLVMBuilderRef, LLVMValueRef V1, LLVMValueRef V2, LLVMValueRef Mask, const char *Name)
Definition Core.cpp:4467
LLVM_C_ABI LLVMValueRef LLVMBuildFPExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4319
LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val)
Definition Core.cpp:3683
LLVM_C_ABI LLVMValueRef LLVMBuildICmp(LLVMBuilderRef, LLVMIntPredicate Op, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:4399
LLVM_C_ABI void LLVMSetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4623
LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal)
Definition Core.cpp:3675
LLVM_C_ABI LLVMValueRef LLVMBuildFence(LLVMBuilderRef B, LLVMAtomicOrdering ordering, LLVMBool singleThread, const char *Name)
Definition Core.cpp:4161
LLVM_C_ABI void LLVMSetParentCatchSwitch(LLVMValueRef CatchPad, LLVMValueRef CatchSwitch)
Set the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3705
LLVM_C_ABI LLVMValueRef LLVMBuildFenceSyncScope(LLVMBuilderRef B, LLVMAtomicOrdering ordering, unsigned SSID, const char *Name)
Definition Core.cpp:4170
LLVM_C_ABI LLVMValueRef LLVMBuildUIToFP(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4304
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:3422
LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad)
Definition Core.cpp:3667
LLVM_C_ABI int LLVMGetUndefMaskElem(void)
Definition Core.cpp:4568
LLVM_C_ABI void LLVMSetCmpXchgSuccessOrdering(LLVMValueRef CmpXchgInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4610
LLVM_C_ABI LLVMValueRef LLVMGetParentCatchSwitch(LLVMValueRef CatchPad)
Get the parent catchswitch instruction of a catchpad instruction.
Definition Core.cpp:3701
LLVM_C_ABI LLVMFastMathFlags LLVMGetFastMathFlags(LLVMValueRef FPMathInst)
Get the flags for which fast-math-style optimizations are allowed for this value.
Definition Core.cpp:3957
LLVM_C_ABI LLVMBool LLVMGetIsDisjoint(LLVMValueRef Inst)
Gets whether the instruction has the disjoint flag set.
Definition Core.cpp:3973
LLVM_C_ABI LLVMValueRef LLVMBuildSwitch(LLVMBuilderRef, LLVMValueRef V, LLVMBasicBlockRef Else, unsigned NumCases)
Definition Core.cpp:3545
LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg)
Sets the non-negative flag for the instruction.
Definition Core.cpp:3952
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:4010
LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch, LLVMBasicBlockRef Dest)
Definition Core.cpp:3687
LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact)
Definition Core.cpp:3942
LLVM_C_ABI LLVMValueRef LLVMBuildNSWNeg(LLVMBuilderRef B, LLVMValueRef V, const char *Name)
Definition Core.cpp:3896
LLVM_C_ABI LLVMValueRef LLVMBuildAShr(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3865
LLVM_C_ABI LLVMValueRef LLVMBuildInvoke2(LLVMBuilderRef, LLVMTypeRef Ty, LLVMValueRef Fn, LLVMValueRef *Args, unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch, const char *Name)
Definition Core.cpp:3574
LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst, LLVMAtomicOrdering Ordering)
Definition Core.cpp:4256
LLVM_C_ABI LLVMValueRef LLVMBuildFPTrunc(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4314
LLVM_C_ABI LLVMValueRef LLVMBuildStore(LLVMBuilderRef, LLVMValueRef Val, LLVMValueRef Ptr)
Definition Core.cpp:4047
LLVM_C_ABI void LLVMAddMetadataToInst(LLVMBuilderRef Builder, LLVMValueRef Inst)
Adds the metadata registered with the given builder to the given instruction.
Definition Core.cpp:3501
LLVM_C_ABI LLVMAtomicOrdering LLVMGetCmpXchgFailureOrdering(LLVMValueRef CmpXchgInst)
Definition Core.cpp:4618
LLVM_C_ABI LLVMValueRef LLVMBuildNUWAdd(LLVMBuilderRef, LLVMValueRef LHS, LLVMValueRef RHS, const char *Name)
Definition Core.cpp:3765
LLVM_C_ABI LLVMValueRef LLVMBuildInsertValue(LLVMBuilderRef, LLVMValueRef AggVal, LLVMValueRef EltVal, unsigned Index, const char *Name)
Definition Core.cpp:4479
LLVM_C_ABI void LLVMBuilderSetDefaultFPMathTag(LLVMBuilderRef Builder, LLVMMetadataRef FPMathTag)
Set the default floating-point math metadata for the given builder.
Definition Core.cpp:3505
LLVM_C_ABI LLVMValueRef LLVMBuildZExt(LLVMBuilderRef, LLVMValueRef Val, LLVMTypeRef DestTy, const char *Name)
Definition Core.cpp:4284
LLVM_C_ABI LLVMValueRef LLVMBuildNot(LLVMBuilderRef, LLVMValueRef V, const char *Name)
Definition Core.cpp:3913
LLVM_C_ABI LLVMValueRef LLVMBuildAtomicRMW(LLVMBuilderRef B, LLVMAtomicRMWBinOp op, LLVMValueRef PTR, LLVMValueRef Val, LLVMAtomicOrdering ordering, LLVMBool singleThread)
Definition Core.cpp:4510
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRange(const char *InputData, size_t InputDataLength, const char *BufferName, LLVMBool RequiresNullTerminator)
Definition Core.cpp:4670
LLVM_C_ABI size_t LLVMGetBufferSize(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4695
LLVM_C_ABI LLVMMemoryBufferRef LLVMCreateMemoryBufferWithMemoryRangeCopy(const char *InputData, size_t InputDataLength, const char *BufferName)
Definition Core.cpp:4681
LLVM_C_ABI const char * LLVMGetBufferStart(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4691
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithContentsOfFile(const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4645
LLVM_C_ABI LLVMBool LLVMCreateMemoryBufferWithSTDIN(LLVMMemoryBufferRef *OutMemBuf, char **OutMessage)
Definition Core.cpp:4659
LLVM_C_ABI void LLVMDisposeMemoryBuffer(LLVMMemoryBufferRef MemBuf)
Definition Core.cpp:4699
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:4634
LLVM_C_ABI void LLVMDisposeModuleProvider(LLVMModuleProviderRef M)
Destroys the module M.
Definition Core.cpp:4638
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:1424
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:2484
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:1552
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:1419
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:1455
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:2505
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:2472
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:1403
LLVM_C_ABI void LLVMGetNamedMetadataOperands(LLVMModuleRef M, const char *Name, LLVMValueRef *Dest)
Obtain the named metadata operands for a module.
Definition Core.cpp:1462
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:2466
LLVM_C_ABI LLVMValueRef LLVMGetPreviousFunction(LLVMValueRef Fn)
Decrement a Function iterator to the previous Function.
Definition Core.cpp:2513
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:1482
LLVM_C_ABI void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Name, LLVMValueRef Val)
Add an operand to named metadata.
Definition Core.cpp:1472
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:1530
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:2497
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetPreviousNamedMetadata(LLVMNamedMDNodeRef NamedMDNode)
Decrement a NamedMDNode iterator to the previous NamedMDNode.
Definition Core.cpp:1411
LLVM_C_ABI const char * LLVMGetNamedMetadataName(LLVMNamedMDNodeRef NamedMD, size_t *NameLen)
Retrieve the name of a NamedMDNode.
Definition Core.cpp:1429
LLVM_C_ABI LLVMValueRef LLVMGetNamedFunction(LLVMModuleRef M, const char *Name)
Obtain a Function value from a Module by its name.
Definition Core.cpp:2480
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:1506
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:1395
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:2489
LLVM_C_ABI LLVMNamedMDNodeRef LLVMGetFirstNamedMetadata(LLVMModuleRef M)
Obtain an iterator to the first NamedMDNode in a Module.
Definition Core.cpp:1387
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:2828
LLVM_C_ABI unsigned LLVMGetNumOperandBundleArgs(LLVMOperandBundleRef Bundle)
Obtain the number of operands for an operand bundle.
Definition Core.cpp:2845
LLVM_C_ABI const char * LLVMGetOperandBundleTag(LLVMOperandBundleRef Bundle, size_t *Len)
Obtain the tag of an operand bundle as a string.
Definition Core.cpp:2839
LLVM_C_ABI void LLVMDisposeOperandBundle(LLVMOperandBundleRef Bundle)
Destroy an operand bundle.
Definition Core.cpp:2835
LLVM_C_ABI LLVMValueRef LLVMGetOperandBundleArgAtIndex(LLVMOperandBundleRef Bundle, unsigned Index)
Obtain the operand for an operand bundle at the given index.
Definition Core.cpp:2849
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManager(LLVMModuleProviderRef MP)
Deprecated: Use LLVMCreateFunctionPassManagerForModule instead.
Definition Core.cpp:4713
LLVM_C_ABI LLVMPassManagerRef LLVMCreateFunctionPassManagerForModule(LLVMModuleRef M)
Constructs a new function-by-function pass pipeline over the module provider.
Definition Core.cpp:4709
LLVM_C_ABI LLVMBool LLVMFinalizeFunctionPassManager(LLVMPassManagerRef FPM)
Finalizes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4730
LLVM_C_ABI void LLVMDisposePassManager(LLVMPassManagerRef PM)
Frees the memory of a pass pipeline.
Definition Core.cpp:4734
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:4726
LLVM_C_ABI LLVMBool LLVMInitializeFunctionPassManager(LLVMPassManagerRef FPM)
Initializes all of the function passes scheduled in the function pass manager.
Definition Core.cpp:4722
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:4718
LLVM_C_ABI LLVMPassManagerRef LLVMCreatePassManager(void)
Constructs a new whole-module pass pipeline.
Definition Core.cpp:4705
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:4744
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:4740
LLVM_C_ABI LLVMBool LLVMIsMultithreaded(void)
Check whether LLVM is executing in thread-safe mode or not.
Definition Core.cpp:4747
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:2996
LLVM_C_ABI void LLVMMoveBasicBlockAfter(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to after another one.
Definition Core.cpp:2978
LLVM_C_ABI LLVMBasicBlockRef LLVMGetFirstBasicBlock(LLVMValueRef Fn)
Obtain the first basic block in a function.
Definition Core.cpp:2894
LLVM_C_ABI LLVMBasicBlockRef LLVMCreateBasicBlockInContext(LLVMContextRef C, const char *Name)
Create a new basic block without inserting it into a function.
Definition Core.cpp:2926
LLVM_C_ABI LLVMBasicBlockRef LLVMGetPreviousBasicBlock(LLVMBasicBlockRef BB)
Go backwards in a basic block iterator.
Definition Core.cpp:2918
LLVM_C_ABI LLVMBasicBlockRef LLVMGetLastBasicBlock(LLVMValueRef Fn)
Obtain the last basic block in a function.
Definition Core.cpp:2902
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockTerminator(LLVMBasicBlockRef BB)
Obtain the terminator instruction for a basic block.
Definition Core.cpp:2876
LLVM_C_ABI const char * LLVMGetBasicBlockName(LLVMBasicBlockRef BB)
Obtain the string name of a basic block.
Definition Core.cpp:2868
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:2939
LLVM_C_ABI void LLVMDeleteBasicBlock(LLVMBasicBlockRef BB)
Remove a basic block from a function and delete it.
Definition Core.cpp:2966
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:2954
LLVM_C_ABI void LLVMGetBasicBlocks(LLVMValueRef Fn, LLVMBasicBlockRef *BasicBlocks)
Obtain all of the basic blocks in a function.
Definition Core.cpp:2884
LLVM_C_ABI void LLVMMoveBasicBlockBefore(LLVMBasicBlockRef BB, LLVMBasicBlockRef MovePos)
Move a basic block to before another one.
Definition Core.cpp:2974
LLVM_C_ABI LLVMValueRef LLVMGetBasicBlockParent(LLVMBasicBlockRef BB)
Obtain the function to which a basic block belongs.
Definition Core.cpp:2872
LLVM_C_ABI LLVMBasicBlockRef LLVMGetEntryBasicBlock(LLVMValueRef Fn)
Obtain the basic block that corresponds to the entry point of a function.
Definition Core.cpp:2890
LLVM_C_ABI LLVMValueRef LLVMGetFirstInstruction(LLVMBasicBlockRef BB)
Obtain the first instruction in a basic block.
Definition Core.cpp:2988
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:2931
LLVM_C_ABI LLVMValueRef LLVMBasicBlockAsValue(LLVMBasicBlockRef BB)
Convert a basic block instance to a value type.
Definition Core.cpp:2856
LLVM_C_ABI LLVMBasicBlockRef LLVMValueAsBasicBlock(LLVMValueRef Val)
Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
Definition Core.cpp:2864
LLVM_C_ABI void LLVMRemoveBasicBlockFromParent(LLVMBasicBlockRef BB)
Remove a basic block from a function.
Definition Core.cpp:2970
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNextBasicBlock(LLVMBasicBlockRef BB)
Advance a basic block iterator.
Definition Core.cpp:2910
LLVM_C_ABI unsigned LLVMCountBasicBlocks(LLVMValueRef Fn)
Obtain the number of basic blocks in a function.
Definition Core.cpp:2880
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:2944
LLVM_C_ABI LLVMBool LLVMValueIsBasicBlock(LLVMValueRef Val)
Determine whether an LLVMValueRef is itself a basic block.
Definition Core.cpp:2860
LLVM_C_ABI LLVMValueRef LLVMConstantPtrAuth(LLVMValueRef Ptr, LLVMValueRef Key, LLVMValueRef Disc, LLVMValueRef AddrDisc)
Create a ConstantPtrAuth constant with the given values.
Definition Core.cpp:1762
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:1691
LLVM_C_ABI LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size)
Create a ConstantVector from values.
Definition Core.cpp:1757
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:1676
LLVM_C_ABI LLVMValueRef LLVMConstDataArray(LLVMTypeRef ElementTy, const char *Data, size_t SizeInBytes)
Create a ConstantDataArray from raw values.
Definition Core.cpp:1727
LLVM_C_ABI LLVMValueRef LLVMConstArray(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, unsigned Length)
Create a ConstantArray from values.
Definition Core.cpp:1715
LLVM_C_ABI LLVMBool LLVMIsConstantString(LLVMValueRef c)
Returns true if the specified constant is an array of i8.
Definition Core.cpp:1699
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:1667
LLVM_C_ABI LLVMValueRef LLVMConstArray2(LLVMTypeRef ElementTy, LLVMValueRef *ConstantVals, uint64_t Length)
Create a ConstantArray from values.
Definition Core.cpp:1721
LLVM_C_ABI const char * LLVMGetAsString(LLVMValueRef c, size_t *Length)
Get the given constant data sequential as a string.
Definition Core.cpp:1703
LLVM_C_ABI LLVMValueRef LLVMConstNamedStruct(LLVMTypeRef StructTy, LLVMValueRef *ConstantVals, unsigned Count)
Create a non-anonymous ConstantStruct from values.
Definition Core.cpp:1748
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:1709
LLVM_C_ABI LLVMValueRef LLVMConstStructInContext(LLVMContextRef C, LLVMValueRef *ConstantVals, unsigned Count, LLVMBool Packed)
Create an anonymous ConstantStruct with the specified values.
Definition Core.cpp:1734
LLVM_C_ABI LLVMValueRef LLVMConstAddrSpaceCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1938
LLVM_C_ABI LLVMValueRef LLVMSizeOf(LLVMTypeRef Ty)
Definition Core.cpp:1829
LLVM_C_ABI LLVMValueRef LLVMConstAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1850
LLVM_C_ABI LLVMValueRef LLVMConstSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1867
LLVM_C_ABI LLVMValueRef LLVMConstTruncOrBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1944
LLVM_C_ABI LLVMValueRef LLVMAlignOf(LLVMTypeRef Ty)
Definition Core.cpp:1825
LLVM_C_ABI LLVMValueRef LLVMConstBitCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1933
LLVM_C_ABI LLVMValueRef LLVMConstNUWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1878
LLVM_C_ABI LLVMValueRef LLVMConstGEPWithNoWrapFlags(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags)
Creates a constant GetElementPtr expression.
Definition Core.cpp:1906
LLVM_C_ABI LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal)
Definition Core.cpp:1821
LLVM_C_ABI LLVMValueRef LLVMConstExtractElement(LLVMValueRef VectorConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1956
LLVM_C_ABI LLVMValueRef LLVMConstNSWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1855
LLVM_C_ABI LLVMValueRef LLVMConstNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1833
LLVM_C_ABI LLVMValueRef LLVMConstPointerCast(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1950
LLVM_C_ABI LLVMValueRef LLVMConstInsertElement(LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant, LLVMValueRef IndexConstant)
Definition Core.cpp:1962
LLVM_C_ABI LLVMValueRef LLVMConstXor(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1884
LLVM_C_ABI LLVMValueRef LLVMConstNSWSub(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1872
LLVM_C_ABI LLVMValueRef LLVMConstShuffleVector(LLVMValueRef VectorAConstant, LLVMValueRef VectorBConstant, LLVMValueRef MaskConstant)
Definition Core.cpp:1970
LLVM_C_ABI LLVMValueRef LLVMConstTrunc(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1918
LLVM_C_ABI LLVMValueRef LLVMConstGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1889
LLVM_C_ABI LLVMValueRef LLVMBlockAddress(LLVMValueRef F, LLVMBasicBlockRef BB)
Definition Core.cpp:1988
LLVM_C_ABI LLVMValueRef LLVMConstNot(LLVMValueRef ConstantVal)
Definition Core.cpp:1846
LLVM_C_ABI LLVMValueRef LLVMConstNUWAdd(LLVMValueRef LHSConstant, LLVMValueRef RHSConstant)
Definition Core.cpp:1861
LLVM_C_ABI LLVMValueRef LLVMConstPtrToInt(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1923
LLVM_C_ABI LLVMValueRef LLVMConstIntToPtr(LLVMValueRef ConstantVal, LLVMTypeRef ToType)
Definition Core.cpp:1928
LLVM_C_ABI LLVMValueRef LLVMConstInBoundsGEP2(LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices, unsigned NumIndices)
Definition Core.cpp:1897
LLVM_C_ABI LLVMValueRef LLVMConstInlineAsm(LLVMTypeRef Ty, const char *AsmString, const char *Constraints, LLVMBool HasSideEffects, LLVMBool IsAlignStack)
Deprecated: Use LLVMGetInlineAsm instead.
Definition Core.cpp:1980
LLVM_C_ABI LLVMValueRef LLVMConstNSWNeg(LLVMValueRef ConstantVal)
Definition Core.cpp:1837
LLVM_C_ABI LLVMValueRef LLVMGetBlockAddressFunction(LLVMValueRef BlockAddr)
Gets the function associated with a given BlockAddress constant value.
Definition Core.cpp:1992
LLVM_C_ABI LLVMBasicBlockRef LLVMGetBlockAddressBasicBlock(LLVMValueRef BlockAddr)
Gets the basic block associated with a given BlockAddress constant value.
Definition Core.cpp:1996
LLVM_C_ABI LLVMUnnamedAddr LLVMGetUnnamedAddress(LLVMValueRef Global)
Definition Core.cpp:2134
LLVM_C_ABI LLVMTypeRef LLVMGlobalGetValueType(LLVMValueRef Global)
Returns the "value type" of a global value.
Definition Core.cpp:2169
LLVM_C_ABI unsigned LLVMGetAlignment(LLVMValueRef V)
Obtain the preferred alignment of the value.
Definition Core.cpp:2175
LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section)
Definition Core.cpp:2110
LLVM_C_ABI void LLVMSetUnnamedAddress(LLVMValueRef Global, LLVMUnnamedAddr UnnamedAddr)
Definition Core.cpp:2146
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:2250
LLVM_C_ABI void LLVMSetLinkage(LLVMValueRef Global, LLVMLinkage Linkage)
Definition Core.cpp:2039
LLVM_C_ABI void LLVMSetUnnamedAddr(LLVMValueRef Global, LLVMBool HasUnnamedAddr)
Deprecated: Use LLVMSetUnnamedAddress instead.
Definition Core.cpp:2163
LLVM_C_ABI LLVMModuleRef LLVMGetGlobalParent(LLVMValueRef Global)
Definition Core.cpp:2002
LLVM_C_ABI unsigned LLVMValueMetadataEntriesGetKind(LLVMValueMetadataEntry *Entries, unsigned Index)
Returns the kind of a value metadata entry at a specific index.
Definition Core.cpp:2231
LLVM_C_ABI void LLVMSetDLLStorageClass(LLVMValueRef Global, LLVMDLLStorageClass Class)
Definition Core.cpp:2129
LLVM_C_ABI LLVMVisibility LLVMGetVisibility(LLVMValueRef Global)
Definition Core.cpp:2114
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:2219
LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes)
Set the preferred alignment of the value.
Definition Core.cpp:2197
LLVM_C_ABI const char * LLVMGetSection(LLVMValueRef Global)
Definition Core.cpp:2104
LLVM_C_ABI void LLVMSetVisibility(LLVMValueRef Global, LLVMVisibility Viz)
Definition Core.cpp:2119
LLVM_C_ABI LLVMLinkage LLVMGetLinkage(LLVMValueRef Global)
Definition Core.cpp:2010
LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind)
Erases a metadata attachment of the given kind if it exists.
Definition Core.cpp:2260
LLVM_C_ABI LLVMDLLStorageClass LLVMGetDLLStorageClass(LLVMValueRef Global)
Definition Core.cpp:2124
LLVM_C_ABI LLVMBool LLVMIsDeclaration(LLVMValueRef Global)
Definition Core.cpp:2006
LLVM_C_ABI void LLVMGlobalClearMetadata(LLVMValueRef Global)
Removes all metadata attachments from this value.
Definition Core.cpp:2264
LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind, LLVMMetadataRef MD)
Adds a metadata attachment.
Definition Core.cpp:2255
LLVM_C_ABI LLVMBool LLVMHasUnnamedAddr(LLVMValueRef Global)
Deprecated: Use LLVMGetUnnamedAddress instead.
Definition Core.cpp:2159
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:2239
LLVM_C_ABI void LLVMDisposeValueMetadataEntries(LLVMValueMetadataEntry *Entries)
Destroys value metadata entries.
Definition Core.cpp:2246
LLVM_C_ABI void LLVMGlobalAddDebugInfo(LLVMValueRef Global, LLVMMetadataRef GVE)
Add debuginfo metadata to this global.
Definition Core.cpp:2268
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:1562
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:1624
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:1567
LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for an integer constant value.
Definition Core.cpp:1636
LLVM_C_ABI unsigned long long LLVMConstByteGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for a byte constant value.
Definition Core.cpp:1640
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:1615
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:1591
LLVM_C_ABI double LLVMConstRealGetDouble(LLVMValueRef ConstantVal, LLVMBool *losesInfo)
Obtain the double value for an floating point constant value.
Definition Core.cpp:1648
LLVM_C_ABI LLVMValueRef LLVMConstByte(LLVMTypeRef ByteTy, unsigned long long N)
Obtain a constant value for a byte type.
Definition Core.cpp:1587
LLVM_C_ABI LLVMValueRef LLVMConstReal(LLVMTypeRef RealTy, double N)
Obtain a constant value referring to a double floating point value.
Definition Core.cpp:1611
LLVM_C_ABI long long LLVMConstByteGetSExtValue(LLVMValueRef ConstantVal)
Obtain the sign extended value for a byte constant value.
Definition Core.cpp:1644
LLVM_C_ABI unsigned long long LLVMConstIntGetZExtValue(LLVMValueRef ConstantVal)
Obtain the zero extended value for an integer constant value.
Definition Core.cpp:1632
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:1277
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:1299
LLVM_C_ABI LLVMValueRef LLVMGetUndef(LLVMTypeRef Ty)
Obtain a constant value referring to an undefined value of a type.
Definition Core.cpp:1273
LLVM_C_ABI LLVMBool LLVMIsNull(LLVMValueRef Val)
Determine whether a value instance is null.
Definition Core.cpp:1285
LLVM_C_ABI LLVMValueRef LLVMConstNull(LLVMTypeRef Ty)
Obtain a constant value referring to the null instance of a type.
Definition Core.cpp:1265
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:1269
LLVM_C_ABI LLVMValueRef LLVMGetPreviousParam(LLVMValueRef Arg)
Obtain the previous parameter to a function.
Definition Core.cpp:2749
LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align)
Set the alignment for a function parameter.
Definition Core.cpp:2756
LLVM_C_ABI unsigned LLVMCountParams(LLVMValueRef Fn)
Obtain the number of parameters in a function.
Definition Core.cpp:2704
LLVM_C_ABI void LLVMGetParams(LLVMValueRef Fn, LLVMValueRef *Params)
Obtain the parameters in a function.
Definition Core.cpp:2710
LLVM_C_ABI LLVMValueRef LLVMGetFirstParam(LLVMValueRef Fn)
Obtain the first parameter to a function.
Definition Core.cpp:2725
LLVM_C_ABI LLVMValueRef LLVMGetLastParam(LLVMValueRef Fn)
Obtain the last parameter to a function.
Definition Core.cpp:2733
LLVM_C_ABI LLVMValueRef LLVMGetParam(LLVMValueRef Fn, unsigned Index)
Obtain the parameter at the specified index.
Definition Core.cpp:2716
LLVM_C_ABI LLVMValueRef LLVMGetNextParam(LLVMValueRef Arg)
Obtain the next parameter to a function.
Definition Core.cpp:2741
LLVM_C_ABI LLVMValueRef LLVMGetParamParent(LLVMValueRef Inst)
Obtain the function to which this argument belongs.
Definition Core.cpp:2721
LLVM_C_ABI void LLVMAddAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Add an attribute to a function.
Definition Core.cpp:2654
LLVM_C_ABI LLVMValueRef LLVMGetPrefixData(LLVMValueRef Fn)
Gets the prefix data associated with a function.
Definition Core.cpp:2622
LLVM_C_ABI LLVMValueRef LLVMGetPrologueData(LLVMValueRef Fn)
Gets the prologue data associated with a function.
Definition Core.cpp:2638
LLVM_C_ABI LLVMTypeRef LLVMIntrinsicGetType(LLVMContextRef Ctx, unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount)
Retrieves the type of an intrinsic.
Definition Core.cpp:2565
LLVM_C_ABI unsigned LLVMGetIntrinsicID(LLVMValueRef Fn)
Obtain the ID number from a function instance.
Definition Core.cpp:2538
LLVM_C_ABI LLVMValueRef LLVMGetPersonalityFn(LLVMValueRef Fn)
Obtain the personality function attached to the function.
Definition Core.cpp:2529
LLVM_C_ABI unsigned LLVMGetAttributeCountAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx)
Definition Core.cpp:2659
LLVM_C_ABI LLVMBool LLVMHasPersonalityFn(LLVMValueRef Fn)
Check whether the given function has a personality function.
Definition Core.cpp:2525
LLVM_C_ABI void LLVMRemoveStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2690
LLVM_C_ABI void LLVMSetPrefixData(LLVMValueRef Fn, LLVMValueRef prefixData)
Sets the prefix data for the function.
Definition Core.cpp:2632
LLVM_C_ABI char * LLVMIntrinsicCopyOverloadedName(unsigned ID, LLVMTypeRef *ParamTypes, size_t ParamCount, size_t *NameLength)
Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead.
Definition Core.cpp:2572
LLVM_C_ABI const char * LLVMGetGC(LLVMValueRef Fn)
Obtain the name of the garbage collector to use during code generation.
Definition Core.cpp:2609
LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name)
Define the garbage collector to use during code generation.
Definition Core.cpp:2614
LLVM_C_ABI void LLVMSetPrologueData(LLVMValueRef Fn, LLVMValueRef prologueData)
Sets the prologue data for the function.
Definition Core.cpp:2648
LLVM_C_ABI void LLVMSetPersonalityFn(LLVMValueRef Fn, LLVMValueRef PersonalityFn)
Set the personality function attached to the function.
Definition Core.cpp:2533
LLVM_C_ABI void LLVMGetAttributesAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:2664
LLVM_C_ABI unsigned LLVMGetFunctionCallConv(LLVMValueRef Fn)
Obtain the calling function of a function.
Definition Core.cpp:2600
LLVM_C_ABI LLVMBool LLVMIntrinsicIsOverloaded(unsigned ID)
Obtain if the intrinsic identified by the given ID is overloaded.
Definition Core.cpp:2595
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:2581
LLVM_C_ABI void LLVMDeleteFunction(LLVMValueRef Fn)
Remove a function from its containing module and deletes it.
Definition Core.cpp:2521
LLVM_C_ABI void LLVMRemoveEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2685
LLVM_C_ABI LLVMAttributeRef LLVMGetEnumAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:2671
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:2591
LLVM_C_ABI const char * LLVMIntrinsicGetName(unsigned ID, size_t *NameLength)
Retrieves the name of an intrinsic.
Definition Core.cpp:2558
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:2549
LLVM_C_ABI LLVMBool LLVMHasPrologueData(LLVMValueRef Fn)
Check if a given function has prologue data.
Definition Core.cpp:2643
LLVM_C_ABI LLVMBool LLVMHasPrefixData(LLVMValueRef Fn)
Check if a given function has prefix data.
Definition Core.cpp:2627
LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC)
Set the calling convention of a function.
Definition Core.cpp:2604
LLVM_C_ABI void LLVMAddTargetDependentFunctionAttr(LLVMValueRef Fn, const char *A, const char *V)
Add a target-dependent attribute to a function.
Definition Core.cpp:2695
LLVM_C_ABI LLVMAttributeRef LLVMGetStringAttributeAtIndex(LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:2678
LLVM_C_ABI LLVMValueRef LLVMIsAMDString(LLVMValueRef Val)
Definition Core.cpp:1189
LLVM_C_ABI LLVMBool LLVMIsPoison(LLVMValueRef Val)
Determine whether a value instance is poisonous.
Definition Core.cpp:1295
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:1174
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:1291
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:1182
#define LLVM_DECLARE_VALUE_CAST(name)
Convert value instances between types.
Definition Core.h:2229
LLVM_C_ABI LLVMBool LLVMIsConstant(LLVMValueRef Val)
Determine whether the specified value instance is constant.
Definition Core.cpp:1281
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:2778
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:2773
LLVM_C_ABI void LLVMRemoveGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module.
Definition Core.cpp:2822
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:2763
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalIFunc(LLVMValueRef IFunc)
Advance a GlobalIFunc iterator to the next GlobalIFunc.
Definition Core.cpp:2794
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalIFunc(LLVMValueRef IFunc)
Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
Definition Core.cpp:2802
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:2810
LLVM_C_ABI void LLVMSetGlobalIFuncResolver(LLVMValueRef IFunc, LLVMValueRef Resolver)
Sets the resolver function associated with this indirect function.
Definition Core.cpp:2814
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalIFunc(LLVMModuleRef M)
Obtain an iterator to the last GlobalIFunc in a Module.
Definition Core.cpp:2786
LLVM_C_ABI void LLVMEraseGlobalIFunc(LLVMValueRef IFunc)
Remove a global indirect function from its parent module and delete it.
Definition Core.cpp:2818
LLVM_C_ABI LLVMTypeRef LLVMGetAllocatedType(LLVMValueRef Alloca)
Obtain the type that is being allocated by the alloca instruction.
Definition Core.cpp:3331
LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall)
Set whether a call instruction is a tail call.
Definition Core.cpp:3230
LLVM_C_ABI void LLVMAddCallSiteAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef A)
Definition Core.cpp:3162
LLVM_C_ABI unsigned LLVMGetNumOperandBundles(LLVMValueRef C)
Obtain the number of operand bundles attached to this instruction.
Definition Core.cpp:3214
LLVM_C_ABI void LLVMRemoveCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3196
LLVM_C_ABI void LLVMRemoveCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3201
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteEnumAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, unsigned KindID)
Definition Core.cpp:3182
LLVM_C_ABI unsigned LLVMGetInstructionCallConv(LLVMValueRef Instr)
Obtain the calling convention for a call instruction.
Definition Core.cpp:3145
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrDefaultDest(LLVMValueRef CallBr)
Get the default destination of a CallBr instruction.
Definition Core.cpp:3270
LLVM_C_ABI LLVMValueRef LLVMGetCalledValue(LLVMValueRef Instr)
Obtain the pointer to the function invoked by this instruction.
Definition Core.cpp:3206
LLVM_C_ABI void LLVMSetNormalDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the normal destination basic block.
Definition Core.cpp:3257
LLVM_C_ABI LLVMBool LLVMIsTailCall(LLVMValueRef CallInst)
Obtain whether a call instruction is a tail call.
Definition Core.cpp:3226
LLVM_C_ABI LLVMAttributeRef LLVMGetCallSiteStringAttribute(LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen)
Definition Core.cpp:3189
LLVM_C_ABI unsigned LLVMGetCallBrNumIndirectDests(LLVMValueRef CallBr)
Get the number of indirect destinations of a CallBr instruction.
Definition Core.cpp:3274
LLVM_C_ABI void LLVMGetCallSiteAttributes(LLVMValueRef C, LLVMAttributeIndex Idx, LLVMAttributeRef *Attrs)
Definition Core.cpp:3174
LLVM_C_ABI LLVMBasicBlockRef LLVMGetNormalDest(LLVMValueRef InvokeInst)
Return the normal destination basic block.
Definition Core.cpp:3244
LLVM_C_ABI unsigned LLVMGetNumArgOperands(LLVMValueRef Instr)
Obtain the argument count for a call instruction.
Definition Core.cpp:3136
LLVM_C_ABI void LLVMSetTailCallKind(LLVMValueRef CallInst, LLVMTailCallKind kind)
Set the call kind of the call instruction.
Definition Core.cpp:3238
LLVM_C_ABI LLVMOperandBundleRef LLVMGetOperandBundleAtIndex(LLVMValueRef C, unsigned Index)
Obtain the operand bundle attached to this instruction at the given index.
Definition Core.cpp:3218
LLVM_C_ABI LLVMBasicBlockRef LLVMGetCallBrIndirectDest(LLVMValueRef CallBr, unsigned Idx)
Get the indirect destination of a CallBr instruction at the given index.
Definition Core.cpp:3278
LLVM_C_ABI LLVMTailCallKind LLVMGetTailCallKind(LLVMValueRef CallInst)
Obtain a tail call kind of the call instruction.
Definition Core.cpp:3234
LLVM_C_ABI void LLVMSetUnwindDest(LLVMValueRef InvokeInst, LLVMBasicBlockRef B)
Set the unwind destination basic block.
Definition Core.cpp:3261
LLVM_C_ABI LLVMTypeRef LLVMGetCalledFunctionType(LLVMValueRef C)
Obtain the function type called by this instruction.
Definition Core.cpp:3210
LLVM_C_ABI LLVMBasicBlockRef LLVMGetUnwindDest(LLVMValueRef InvokeInst)
Return the unwind destination basic block.
Definition Core.cpp:3248
LLVM_C_ABI void LLVMSetInstrParamAlignment(LLVMValueRef Instr, LLVMAttributeIndex Idx, unsigned Align)
Definition Core.cpp:3154
LLVM_C_ABI unsigned LLVMGetCallSiteAttributeCount(LLVMValueRef C, LLVMAttributeIndex Idx)
Definition Core.cpp:3167
LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC)
Set the calling convention for a call instruction.
Definition Core.cpp:3149
LLVM_C_ABI LLVMGEPNoWrapFlags LLVMGEPGetNoWrapFlags(LLVMValueRef GEP)
Get the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3349
LLVM_C_ABI LLVMBool LLVMIsInBounds(LLVMValueRef GEP)
Check whether the given GEP operator is inbounds.
Definition Core.cpp:3337
LLVM_C_ABI void LLVMSetIsInBounds(LLVMValueRef GEP, LLVMBool InBounds)
Set the given GEP instruction to be inbounds or not.
Definition Core.cpp:3341
LLVM_C_ABI LLVMTypeRef LLVMGetGEPSourceElementType(LLVMValueRef GEP)
Get the source element type of the given GEP operator.
Definition Core.cpp:3345
LLVM_C_ABI void LLVMGEPSetNoWrapFlags(LLVMValueRef GEP, LLVMGEPNoWrapFlags NoWrapFlags)
Set the no-wrap related flags for the given GEP instruction.
Definition Core.cpp:3354
LLVM_C_ABI unsigned LLVMGetNumIndices(LLVMValueRef Inst)
Obtain the number of indices.
Definition Core.cpp:3382
LLVM_C_ABI const unsigned * LLVMGetIndices(LLVMValueRef Inst)
Obtain the indices as an array.
Definition Core.cpp:3394
LLVM_C_ABI LLVMBasicBlockRef LLVMGetIncomingBlock(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
Definition Core.cpp:3376
LLVM_C_ABI LLVMValueRef LLVMGetIncomingValue(LLVMValueRef PhiNode, unsigned Index)
Obtain an incoming value to a PHI node as an LLVMValueRef.
Definition Core.cpp:3372
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:3361
LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode)
Obtain the number of incoming basic blocks to a PHI node.
Definition Core.cpp:3368
LLVM_C_ABI LLVMValueRef LLVMGetCondition(LLVMValueRef Branch)
Return the condition of a branch instruction.
Definition Core.cpp:3302
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSuccessor(LLVMValueRef Term, unsigned i)
Return the specified successor.
Definition Core.cpp:3288
LLVM_C_ABI void LLVMSetCondition(LLVMValueRef Branch, LLVMValueRef Cond)
Set the condition of a branch instruction.
Definition Core.cpp:3306
LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i, LLVMBasicBlockRef block)
Update the specified successor to point at the provided block.
Definition Core.cpp:3292
LLVM_C_ABI LLVMValueRef LLVMGetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i)
Obtain the case value for a successor of a switch instruction.
Definition Core.cpp:3316
LLVM_C_ABI LLVMBool LLVMIsConditional(LLVMValueRef Branch)
Return if an instruction is a conditional branch.
Definition Core.cpp:3298
LLVM_C_ABI LLVMBasicBlockRef LLVMGetSwitchDefaultDest(LLVMValueRef SwitchInstr)
Obtain the default destination basic block of a switch instruction.
Definition Core.cpp:3312
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:3322
LLVM_C_ABI unsigned LLVMGetNumSuccessors(LLVMValueRef Term)
Return the number of successors that this terminator has.
Definition Core.cpp:3284
LLVM_C_ABI LLVMRealPredicate LLVMGetFCmpPredicate(LLVMValueRef Inst)
Obtain the float predicate of an instruction.
Definition Core.cpp:3046
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:3020
LLVM_C_ABI LLVMValueRef LLVMGetPreviousInstruction(LLVMValueRef Inst)
Obtain the instruction that occurred before this one.
Definition Core.cpp:3012
LLVM_C_ABI LLVMDbgRecordRef LLVMGetPreviousDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the previous DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3097
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetExpression(LLVMDbgRecordRef Rec)
Get the debug info expression of the DbgVariableRecord.
Definition Core.cpp:3132
LLVM_C_ABI LLVMDbgRecordRef LLVMGetFirstDbgRecord(LLVMValueRef Inst)
Obtain the first debug record attached to an instruction.
Definition Core.cpp:3069
LLVM_C_ABI LLVMOpcode LLVMGetInstructionOpcode(LLVMValueRef Inst)
Obtain the code opcode for an individual instruction.
Definition Core.cpp:3052
LLVM_C_ABI LLVMDbgRecordRef LLVMGetNextDbgRecord(LLVMDbgRecordRef DbgRecord)
Obtain the next DbgRecord in the sequence or NULL if there are no more.
Definition Core.cpp:3089
LLVM_C_ABI LLVMDbgRecordRef LLVMGetLastDbgRecord(LLVMValueRef Inst)
Obtain the last debug record attached to an instruction.
Definition Core.cpp:3079
LLVM_C_ABI LLVMMetadataRef LLVMDbgVariableRecordGetVariable(LLVMDbgRecordRef Rec)
Get the debug info variable of the DbgVariableRecord.
Definition Core.cpp:3128
LLVM_C_ABI LLVMValueRef LLVMIsATerminatorInst(LLVMValueRef Inst)
Determine whether an instruction is a terminator.
Definition Core.cpp:3064
LLVM_C_ABI LLVMValueRef LLVMDbgVariableRecordGetValue(LLVMDbgRecordRef Rec, unsigned OpIdx)
Get the value of the DbgVariableRecord.
Definition Core.cpp:3123
LLVM_C_ABI LLVMDbgRecordKind LLVMDbgRecordGetKind(LLVMDbgRecordRef Rec)
Definition Core.cpp:3109
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:3028
LLVM_C_ABI LLVMBasicBlockRef LLVMGetInstructionParent(LLVMValueRef Inst)
Obtain the basic block to which an instruction belongs.
Definition Core.cpp:2984
LLVM_C_ABI LLVMMetadataRef LLVMDbgRecordGetDebugLoc(LLVMDbgRecordRef Rec)
Get the debug location attached to the debug record.
Definition Core.cpp:3105
LLVM_C_ABI LLVMBool LLVMGetICmpSameSign(LLVMValueRef Inst)
Get whether or not an icmp instruction has the samesign flag.
Definition Core.cpp:3038
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:3058
LLVM_C_ABI void LLVMInstructionEraseFromParent(LLVMValueRef Inst)
Remove and delete an instruction.
Definition Core.cpp:3024
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:3032
LLVM_C_ABI LLVMValueRef LLVMGetNextInstruction(LLVMValueRef Inst)
Obtain the instruction that occurs after the one specified.
Definition Core.cpp:3004
LLVM_C_ABI void LLVMSetICmpSameSign(LLVMValueRef Inst, LLVMBool SameSign)
Set the samesign flag on an icmp instruction.
Definition Core.cpp:3042
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:1310
LLVM_C_ABI const char * LLVMGetMDString(LLVMValueRef V, unsigned *Length)
Obtain the underlying string from a MDString value.
Definition Core.cpp:1370
LLVM_C_ABI LLVMValueRef LLVMMetadataAsValue(LLVMContextRef C, LLVMMetadataRef MD)
Obtain a Metadata as a Value.
Definition Core.cpp:1357
LLVM_C_ABI unsigned LLVMGetMDNodeNumOperands(LLVMValueRef V)
Obtain the number of operands from an MDNode value.
Definition Core.cpp:1380
LLVM_C_ABI LLVMValueRef LLVMMDStringInContext(LLVMContextRef C, const char *Str, unsigned SLen)
Deprecated: Use LLVMMDStringInContext2 instead.
Definition Core.cpp:1315
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:1305
LLVM_C_ABI LLVMValueRef LLVMMDNodeInContext(LLVMContextRef C, LLVMValueRef *Vals, unsigned Count)
Deprecated: Use LLVMMDNodeInContext2 instead.
Definition Core.cpp:1326
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:1448
LLVM_C_ABI LLVMMetadataRef LLVMValueAsMetadata(LLVMValueRef Val)
Obtain a Value as a Metadata.
Definition Core.cpp:1361
LLVM_C_ABI void LLVMGetMDNodeOperands(LLVMValueRef V, LLVMValueRef *Dest)
Obtain the given MDNode's operands.
Definition Core.cpp:1435
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:1246
LLVM_C_ABI int LLVMGetNumOperands(LLVMValueRef Val)
Obtain the number of operands in a llvm::User value.
Definition Core.cpp:1255
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:1251
LLVM_C_ABI LLVMValueRef LLVMGetOperand(LLVMValueRef Val, unsigned Index)
Obtain an operand at a specific index in a llvm::User value.
Definition Core.cpp:1232
LLVM_C_ABI LLVMValueRef LLVMGetUser(LLVMUseRef U)
Obtain the user value for a user.
Definition Core.cpp:1212
LLVM_C_ABI LLVMValueRef LLVMGetUsedValue(LLVMUseRef U)
Obtain the value this use corresponds to.
Definition Core.cpp:1216
LLVM_C_ABI LLVMUseRef LLVMGetNextUse(LLVMUseRef U)
Obtain the next use of a value.
Definition Core.cpp:1205
LLVM_C_ABI LLVMUseRef LLVMGetFirstUse(LLVMValueRef Val)
Obtain the first use of a value.
Definition Core.cpp:1197
#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:2411
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the last GlobalAlias in a Module.
Definition Core.cpp:2432
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobalAlias(LLVMValueRef GA)
Decrement a GlobalAlias iterator to the previous GlobalAlias.
Definition Core.cpp:2448
LLVM_C_ABI void LLVMAliasSetAliasee(LLVMValueRef Alias, LLVMValueRef Aliasee)
Set the target value of an alias.
Definition Core.cpp:2460
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobalAlias(LLVMModuleRef M)
Obtain an iterator to the first GlobalAlias in a Module.
Definition Core.cpp:2424
LLVM_C_ABI LLVMValueRef LLVMAliasGetAliasee(LLVMValueRef Alias)
Retrieve the target value of an alias.
Definition Core.cpp:2456
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:2419
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobalAlias(LLVMValueRef GA)
Advance a GlobalAlias iterator to the next GlobalAlias.
Definition Core.cpp:2440
LLVM_C_ABI LLVMBool LLVMIsThreadLocal(LLVMValueRef GlobalVar)
Definition Core.cpp:2346
LLVM_C_ABI LLVMThreadLocalMode LLVMGetThreadLocalMode(LLVMValueRef GlobalVar)
Definition Core.cpp:2362
LLVM_C_ABI LLVMBool LLVMIsGlobalConstant(LLVMValueRef GlobalVar)
Definition Core.cpp:2354
LLVM_C_ABI LLVMValueRef LLVMGetPreviousGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2322
LLVM_C_ABI void LLVMSetThreadLocal(LLVMValueRef GlobalVar, LLVMBool IsThreadLocal)
Definition Core.cpp:2350
LLVM_C_ABI LLVMBool LLVMIsExternallyInitialized(LLVMValueRef GlobalVar)
Definition Core.cpp:2401
LLVM_C_ABI LLVMValueRef LLVMGetLastGlobal(LLVMModuleRef M)
Definition Core.cpp:2306
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobalWithLength(LLVMModuleRef M, const char *Name, size_t Length)
Definition Core.cpp:2293
LLVM_C_ABI LLVMValueRef LLVMGetFirstGlobal(LLVMModuleRef M)
Definition Core.cpp:2298
LLVM_C_ABI void LLVMSetThreadLocalMode(LLVMValueRef GlobalVar, LLVMThreadLocalMode Mode)
Definition Core.cpp:2379
LLVM_C_ABI LLVMValueRef LLVMGetNextGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2314
LLVM_C_ABI void LLVMSetExternallyInitialized(LLVMValueRef GlobalVar, LLVMBool IsExtInit)
Definition Core.cpp:2405
LLVM_C_ABI LLVMValueRef LLVMGetNamedGlobal(LLVMModuleRef M, const char *Name)
Definition Core.cpp:2289
LLVM_C_ABI LLVMValueRef LLVMAddGlobalInAddressSpace(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name, unsigned AddressSpace)
Definition Core.cpp:2280
LLVM_C_ABI void LLVMDeleteGlobal(LLVMValueRef GlobalVar)
Definition Core.cpp:2330
LLVM_C_ABI void LLVMSetGlobalConstant(LLVMValueRef GlobalVar, LLVMBool IsConstant)
Definition Core.cpp:2358
LLVM_C_ABI LLVMValueRef LLVMAddGlobal(LLVMModuleRef M, LLVMTypeRef Ty, const char *Name)
Definition Core.cpp:2275
LLVM_C_ABI LLVMValueRef LLVMGetInitializer(LLVMValueRef GlobalVar)
Definition Core.cpp:2334
LLVM_C_ABI void LLVMSetInitializer(LLVMValueRef GlobalVar, LLVMValueRef ConstantVal)
Definition Core.cpp:2341
#define N