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