LLVM 23.0.0git
Core.h
Go to the documentation of this file.
1/*===-- llvm-c/Core.h - Core Library C Interface ------------------*- C -*-===*\
2|* *|
3|* Part of the LLVM Project, under the Apache License v2.0 with LLVM *|
4|* Exceptions. *|
5|* See https://llvm.org/LICENSE.txt for license information. *|
6|* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception *|
7|* *|
8|*===----------------------------------------------------------------------===*|
9|* *|
10|* This header declares the C interface to libLLVMCore.a, which implements *|
11|* the LLVM intermediate representation. *|
12|* *|
13\*===----------------------------------------------------------------------===*/
14
15#ifndef LLVM_C_CORE_H
16#define LLVM_C_CORE_H
17
18#include "llvm-c/Deprecated.h"
20#include "llvm-c/ExternC.h"
21#include "llvm-c/Visibility.h"
22
23#include "llvm-c/Types.h"
24
26
27/**
28 * @defgroup LLVMC LLVM-C: C interface to LLVM
29 *
30 * This module exposes parts of the LLVM library as a C API.
31 *
32 * @{
33 */
34
35/**
36 * @defgroup LLVMCTransforms Transforms
37 */
38
39/**
40 * @defgroup LLVMCCore Core
41 *
42 * This modules provide an interface to libLLVMCore, which implements
43 * the LLVM intermediate representation as well as other related types
44 * and utilities.
45 *
46 * Many exotic languages can interoperate with C code but have a harder time
47 * with C++ due to name mangling. So in addition to C, this interface enables
48 * tools written in such languages.
49 *
50 * @{
51 */
52
53/**
54 * @defgroup LLVMCCoreTypes Types and Enumerations
55 *
56 * @{
57 */
58
59/// External users depend on the following values being stable. It is not safe
60/// to reorder them.
61typedef enum {
62 /* Terminator Instructions */
64 /* removed 2 due to API changes */
70 /* removed 6 due to API changes */
73
74 /* Standard Unary Operators */
76
77 /* Standard Binary Operators */
80 LLVMSub = 10,
82 LLVMMul = 12,
90
91 /* Logical Operators */
92 LLVMShl = 20,
95 LLVMAnd = 23,
96 LLVMOr = 24,
97 LLVMXor = 25,
98
99 /* Memory Operators */
104
105 /* Cast Operators */
120
121 /* Other Operators */
136
137 /* Atomic operators */
141
142 /* Exception Handling Operators */
150} LLVMOpcode;
151
152typedef enum {
153 LLVMVoidTypeKind = 0, /**< type with no size */
154 LLVMHalfTypeKind = 1, /**< 16 bit floating point type */
155 LLVMFloatTypeKind = 2, /**< 32 bit floating point type */
156 LLVMDoubleTypeKind = 3, /**< 64 bit floating point type */
157 LLVMX86_FP80TypeKind = 4, /**< 80 bit floating point type (X87) */
158 LLVMFP128TypeKind = 5, /**< 128 bit floating point type (112-bit mantissa)*/
159 LLVMPPC_FP128TypeKind = 6, /**< 128 bit floating point type (two 64-bits) */
160 LLVMLabelTypeKind = 7, /**< Labels */
161 LLVMIntegerTypeKind = 8, /**< Arbitrary bit width integers */
162 LLVMFunctionTypeKind = 9, /**< Functions */
163 LLVMStructTypeKind = 10, /**< Structures */
164 LLVMArrayTypeKind = 11, /**< Arrays */
165 LLVMPointerTypeKind = 12, /**< Pointers */
166 LLVMVectorTypeKind = 13, /**< Fixed width SIMD vector type */
167 LLVMMetadataTypeKind = 14, /**< Metadata */
168 /* 15 previously used by LLVMX86_MMXTypeKind */
169 LLVMTokenTypeKind = 16, /**< Tokens */
170 LLVMScalableVectorTypeKind = 17, /**< Scalable SIMD vector type */
171 LLVMBFloatTypeKind = 18, /**< 16 bit brain floating point type */
172 LLVMX86_AMXTypeKind = 19, /**< X86 AMX */
173 LLVMTargetExtTypeKind = 20, /**< Target extension type */
175
176typedef enum {
177 LLVMExternalLinkage, /**< Externally visible function */
179 LLVMLinkOnceAnyLinkage, /**< Keep one copy of function when linking (inline)*/
180 LLVMLinkOnceODRLinkage, /**< Same, but only replaced by something
181 equivalent. */
183 LLVMWeakAnyLinkage, /**< Keep one copy of function when linking (weak) */
184 LLVMWeakODRLinkage, /**< Same, but only replaced by something
185 equivalent. */
186 LLVMAppendingLinkage, /**< Special purpose, only applies to global arrays */
187 LLVMInternalLinkage, /**< Rename collisions when linking (static
188 functions) */
189 LLVMPrivateLinkage, /**< Like Internal, but omit from symbol table */
190 LLVMDLLImportLinkage, /**< Obsolete */
191 LLVMDLLExportLinkage, /**< Obsolete */
192 LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */
193 LLVMGhostLinkage, /**< Obsolete */
194 LLVMCommonLinkage, /**< Tentative definitions */
195 LLVMLinkerPrivateLinkage, /**< Like Private, but linker removes. */
196 LLVMLinkerPrivateWeakLinkage /**< Like LinkerPrivate, but is weak. */
198
199typedef enum {
200 LLVMDefaultVisibility, /**< The GV is visible */
201 LLVMHiddenVisibility, /**< The GV is hidden */
202 LLVMProtectedVisibility /**< The GV is protected */
204
205typedef enum {
206 LLVMNoUnnamedAddr, /**< Address of the GV is significant. */
207 LLVMLocalUnnamedAddr, /**< Address of the GV is locally insignificant. */
208 LLVMGlobalUnnamedAddr /**< Address of the GV is globally insignificant. */
210
211typedef enum {
213 LLVMDLLImportStorageClass = 1, /**< Function to be imported from DLL. */
214 LLVMDLLExportStorageClass = 2 /**< Function to be accessible from DLL. */
216
260
295
296typedef enum {
297 LLVMIntEQ = 32, /**< equal */
298 LLVMIntNE, /**< not equal */
299 LLVMIntUGT, /**< unsigned greater than */
300 LLVMIntUGE, /**< unsigned greater or equal */
301 LLVMIntULT, /**< unsigned less than */
302 LLVMIntULE, /**< unsigned less or equal */
303 LLVMIntSGT, /**< signed greater than */
304 LLVMIntSGE, /**< signed greater or equal */
305 LLVMIntSLT, /**< signed less than */
306 LLVMIntSLE /**< signed less or equal */
308
309typedef enum {
310 LLVMRealPredicateFalse, /**< Always false (always folded) */
311 LLVMRealOEQ, /**< True if ordered and equal */
312 LLVMRealOGT, /**< True if ordered and greater than */
313 LLVMRealOGE, /**< True if ordered and greater than or equal */
314 LLVMRealOLT, /**< True if ordered and less than */
315 LLVMRealOLE, /**< True if ordered and less than or equal */
316 LLVMRealONE, /**< True if ordered and operands are unequal */
317 LLVMRealORD, /**< True if ordered (no nans) */
318 LLVMRealUNO, /**< True if unordered: isnan(X) | isnan(Y) */
319 LLVMRealUEQ, /**< True if unordered or equal */
320 LLVMRealUGT, /**< True if unordered or greater than */
321 LLVMRealUGE, /**< True if unordered, greater than, or equal */
322 LLVMRealULT, /**< True if unordered or less than */
323 LLVMRealULE, /**< True if unordered, less than, or equal */
324 LLVMRealUNE, /**< True if unordered or not equal */
325 LLVMRealPredicateTrue /**< Always true (always folded) */
327
335
336typedef enum {
337 LLVMAtomicOrderingNotAtomic = 0, /**< A load or store which is not atomic */
338 LLVMAtomicOrderingUnordered = 1, /**< Lowest level of atomicity, guarantees
339 somewhat sane results, lock free. */
340 LLVMAtomicOrderingMonotonic = 2, /**< guarantees that if you take all the
341 operations affecting a specific address,
342 a consistent ordering exists */
343 LLVMAtomicOrderingAcquire = 4, /**< Acquire provides a barrier of the sort
344 necessary to acquire a lock to access other
345 memory with normal loads and stores. */
346 LLVMAtomicOrderingRelease = 5, /**< Release is similar to Acquire, but with
347 a barrier of the sort necessary to release
348 a lock. */
349 LLVMAtomicOrderingAcquireRelease = 6, /**< provides both an Acquire and a
350 Release barrier (for fences and
351 operations which both read and write
352 memory). */
353 LLVMAtomicOrderingSequentiallyConsistent = 7 /**< provides Acquire semantics
354 for loads and Release
355 semantics for stores.
356 Additionally, it guarantees
357 that a total ordering exists
358 between all
359 SequentiallyConsistent
360 operations. */
362
363typedef enum {
364 LLVMAtomicRMWBinOpXchg, /**< Set the new value and return the one old */
365 LLVMAtomicRMWBinOpAdd, /**< Add a value and return the old one */
366 LLVMAtomicRMWBinOpSub, /**< Subtract a value and return the old one */
367 LLVMAtomicRMWBinOpAnd, /**< And a value and return the old one */
368 LLVMAtomicRMWBinOpNand, /**< Not-And a value and return the old one */
369 LLVMAtomicRMWBinOpOr, /**< OR a value and return the old one */
370 LLVMAtomicRMWBinOpXor, /**< Xor a value and return the old one */
371 LLVMAtomicRMWBinOpMax, /**< Sets the value if it's greater than the
372 original using a signed comparison and return
373 the old one */
374 LLVMAtomicRMWBinOpMin, /**< Sets the value if it's Smaller than the
375 original using a signed comparison and return
376 the old one */
377 LLVMAtomicRMWBinOpUMax, /**< Sets the value if it's greater than the
378 original using an unsigned comparison and return
379 the old one */
380 LLVMAtomicRMWBinOpUMin, /**< Sets the value if it's greater than the
381 original using an unsigned comparison and return
382 the old one */
383 LLVMAtomicRMWBinOpFAdd, /**< Add a floating point value and return the
384 old one */
385 LLVMAtomicRMWBinOpFSub, /**< Subtract a floating point value and return the
386 old one */
387 LLVMAtomicRMWBinOpFMax, /**< Sets the value if it's greater than the
388 original using an floating point comparison and
389 return the old one */
390 LLVMAtomicRMWBinOpFMin, /**< Sets the value if it's smaller than the
391 original using an floating point comparison and
392 return the old one */
393 LLVMAtomicRMWBinOpUIncWrap, /**< Increments the value, wrapping back to zero
394 when incremented above input value */
395 LLVMAtomicRMWBinOpUDecWrap, /**< Decrements the value, wrapping back to
396 the input value when decremented below zero */
397 LLVMAtomicRMWBinOpUSubCond, /**<Subtracts the value only if no unsigned
398 overflow */
399 LLVMAtomicRMWBinOpUSubSat, /**<Subtracts the value, clamping to zero */
400 LLVMAtomicRMWBinOpFMaximum, /**< Sets the value if it's greater than the
401 original using an floating point comparison and
402 return the old one */
403 LLVMAtomicRMWBinOpFMinimum, /**< Sets the value if it's smaller than the
404 original using an floating point comparison and
405 return the old one */
407
414
419
420typedef enum {
421 /**
422 * Emits an error if two values disagree, otherwise the resulting value is
423 * that of the operands.
424 *
425 * @see Module::ModFlagBehavior::Error
426 */
428 /**
429 * Emits a warning if two values disagree. The result value will be the
430 * operand for the flag from the first module being linked.
431 *
432 * @see Module::ModFlagBehavior::Warning
433 */
435 /**
436 * Adds a requirement that another module flag be present and have a
437 * specified value after linking is performed. The value must be a metadata
438 * pair, where the first element of the pair is the ID of the module flag
439 * to be restricted, and the second element of the pair is the value the
440 * module flag should be restricted to. This behavior can be used to
441 * restrict the allowable results (via triggering of an error) of linking
442 * IDs with the **Override** behavior.
443 *
444 * @see Module::ModFlagBehavior::Require
445 */
447 /**
448 * Uses the specified value, regardless of the behavior or value of the
449 * other module. If both modules specify **Override**, but the values
450 * differ, an error will be emitted.
451 *
452 * @see Module::ModFlagBehavior::Override
453 */
455 /**
456 * Appends the two values, which are required to be metadata nodes.
457 *
458 * @see Module::ModFlagBehavior::Append
459 */
461 /**
462 * Appends the two values, which are required to be metadata
463 * nodes. However, duplicate entries in the second list are dropped
464 * during the append operation.
465 *
466 * @see Module::ModFlagBehavior::AppendUnique
467 */
470
471/**
472 * Attribute index are either LLVMAttributeReturnIndex,
473 * LLVMAttributeFunctionIndex or a parameter number from 1 to N.
474 */
475enum {
477 // ISO C restricts enumerator values to range of 'int'
478 // (4294967295 is too large)
479 // LLVMAttributeFunctionIndex = ~0U,
481};
482
483typedef unsigned LLVMAttributeIndex;
484
485/**
486 * Tail call kind for LLVMSetTailCallKind and LLVMGetTailCallKind.
487 *
488 * Note that 'musttail' implies 'tail'.
489 *
490 * @see CallInst::TailCallKind
491 */
498
499enum {
512};
513
514/**
515 * Flags to indicate what fast-math-style optimizations are allowed
516 * on operations.
517 *
518 * See https://llvm.org/docs/LangRef.html#fast-math-flags
519 */
520typedef unsigned LLVMFastMathFlags;
521
522enum {
524 LLVMGEPFlagNUSW = (1 << 1),
525 LLVMGEPFlagNUW = (1 << 2),
526};
527
528/**
529 * Flags that constrain the allowed wrap semantics of a getelementptr
530 * instruction.
531 *
532 * See https://llvm.org/docs/LangRef.html#getelementptr-instruction
533 */
534typedef unsigned LLVMGEPNoWrapFlags;
535
542
543/**
544 * @}
545 */
546
547/** Deallocate and destroy all ManagedStatic variables.
548 @see llvm::llvm_shutdown
549 @see ManagedStatic */
550LLVM_C_ABI void LLVMShutdown(void);
551
552/*===-- Version query -----------------------------------------------------===*/
553
554/**
555 * Return the major, minor, and patch version of LLVM
556 *
557 * The version components are returned via the function's three output
558 * parameters or skipped if a NULL pointer was supplied.
559 */
560LLVM_C_ABI void LLVMGetVersion(unsigned *Major, unsigned *Minor,
561 unsigned *Patch);
562
563/*===-- Error handling ----------------------------------------------------===*/
564
565LLVM_C_ABI char *LLVMCreateMessage(const char *Message);
566LLVM_C_ABI void LLVMDisposeMessage(char *Message);
567
568/**
569 * @defgroup LLVMCCoreContext Contexts
570 *
571 * Contexts are execution states for the core LLVM IR system.
572 *
573 * Most types are tied to a context instance. Multiple contexts can
574 * exist simultaneously. A single context is not thread safe. However,
575 * different contexts can execute on different threads simultaneously.
576 *
577 * @{
578 */
579
581typedef void (*LLVMYieldCallback)(LLVMContextRef, void *);
582
583/**
584 * Create a new context.
585 *
586 * Every call to this function should be paired with a call to
587 * LLVMContextDispose() or the context will leak memory.
588 */
590
591/**
592 * Obtain the global context instance.
593 */
596 "Use of the global context is deprecated, create "
597 "one using LLVMContextCreate instead");
598
599/**
600 * Set the diagnostic handler for this context.
601 */
603 LLVMDiagnosticHandler Handler,
604 void *DiagnosticContext);
605
606/**
607 * Get the diagnostic handler of this context.
608 */
611
612/**
613 * Get the diagnostic context of this context.
614 */
616
617/**
618 * Set the yield callback function for this context.
619 *
620 * @see LLVMContext::setYieldCallback()
621 */
623 LLVMYieldCallback Callback,
624 void *OpaqueHandle);
625
626/**
627 * Retrieve whether the given context is set to discard all value names.
628 *
629 * @see LLVMContext::shouldDiscardValueNames()
630 */
632
633/**
634 * Set whether the given context discards all value names.
635 *
636 * If true, only the names of GlobalValue objects will be available in the IR.
637 * This can be used to save memory and runtime, especially in release mode.
638 *
639 * @see LLVMContext::setDiscardValueNames()
640 */
642 LLVMBool Discard);
643
644/**
645 * Destroy a context instance.
646 *
647 * This should be called for every call to LLVMContextCreate() or memory
648 * will be leaked.
649 */
651
652/**
653 * Return a string representation of the DiagnosticInfo. Use
654 * LLVMDisposeMessage to free the string.
655 *
656 * @see DiagnosticInfo::print()
657 */
659
660/**
661 * Return an enum LLVMDiagnosticSeverity.
662 *
663 * @see DiagnosticInfo::getSeverity()
664 */
667
668LLVM_C_ABI unsigned LLVMGetMDKindIDInContext(LLVMContextRef C, const char *Name,
669 unsigned SLen);
671 unsigned LLVMGetMDKindID(const char *Name, unsigned SLen),
672 "Use of the global context is deprecated, use LLVMGetMDKindIDInContext "
673 "instead");
674
675/**
676 * Maps a synchronization scope name to a ID unique within this context.
677 */
678LLVM_C_ABI unsigned LLVMGetSyncScopeID(LLVMContextRef C, const char *Name,
679 size_t SLen);
680
681/**
682 * Return an unique id given the name of a enum attribute,
683 * or 0 if no attribute by that name exists.
684 *
685 * See http://llvm.org/docs/LangRef.html#parameter-attributes
686 * and http://llvm.org/docs/LangRef.html#function-attributes
687 * for the list of available attributes.
688 *
689 * NB: Attribute names and/or id are subject to change without
690 * going through the C API deprecation cycle.
691 */
692LLVM_C_ABI unsigned LLVMGetEnumAttributeKindForName(const char *Name,
693 size_t SLen);
695
696/**
697 * Create an enum attribute.
698 */
700 unsigned KindID,
701 uint64_t Val);
702
703/**
704 * Get the unique id corresponding to the enum attribute
705 * passed as argument.
706 */
708
709/**
710 * Get the enum attribute's value. 0 is returned if none exists.
711 */
713
714/**
715 * Create a type attribute
716 */
718 unsigned KindID,
719 LLVMTypeRef type_ref);
720
721/**
722 * Get the type attribute's value.
723 */
725
726/**
727 * Create a ConstantRange attribute.
728 *
729 * LowerWords and UpperWords need to be NumBits divided by 64 rounded up
730 * elements long.
731 */
733 LLVMContextRef C, unsigned KindID, unsigned NumBits,
734 const uint64_t LowerWords[], const uint64_t UpperWords[]);
735
736/**
737 * Represent different denormal handling kinds for use with
738 * LLVMCreateDenormalFPEnvAttribute.
739 */
746
747/**
748 * Create a DenormalFPEnv attribute.
749 *
750 * \p DefaultModeOutput is the assumed denormal handling for the outputs of most
751 * floating-point types.
752 *
753 * \p DefaultModeInput is the assumed denormal handling for the inputs of most
754 * floating-point types.
755 *
756 * \p FloatModeOutput is the assumed denormal handling for the outputs of
757 * float. This should always be the same as as DefaultModeOutput for most
758 * targets.
759 *
760 * \p FloatModeInput is the assumed denormal handling for the inputs of
761 * float. This should always be the same as as DefaultModeInput for most
762 * targets.
763 *
764 */
766 LLVMContextRef C, LLVMDenormalModeKind DefaultModeOutput,
767 LLVMDenormalModeKind DefaultModeInput, LLVMDenormalModeKind FloatModeOutput,
768 LLVMDenormalModeKind FloatModeInput);
769
770/**
771 * Create a string attribute.
772 */
774 const char *K,
775 unsigned KLength,
776 const char *V,
777 unsigned VLength);
778
779/**
780 * Get the string attribute's kind.
781 */
783 unsigned *Length);
784
785/**
786 * Get the string attribute's value.
787 */
789 unsigned *Length);
790
791/**
792 * Check for the different types of attributes.
793 */
797
798/**
799 * Obtain a Type from a context by its registered name.
800 */
802
803/**
804 * @}
805 */
806
807/**
808 * @defgroup LLVMCCoreModule Modules
809 *
810 * Modules represent the top-level structure in an LLVM program. An LLVM
811 * module is effectively a translation unit or a collection of
812 * translation units merged together.
813 *
814 * @{
815 */
816
817/**
818 * Create a new, empty module in the global context.
819 *
820 * This is equivalent to calling LLVMModuleCreateWithNameInContext with
821 * LLVMGetGlobalContext() as the context parameter.
822 *
823 * Every invocation should be paired with LLVMDisposeModule() or memory
824 * will be leaked.
825 */
827 LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID),
828 "Use of the global context is deprecated, use "
829 "LLVMModuleCreateWithNameInContext instead");
830
831/**
832 * Create a new, empty module in a specific context.
833 *
834 * Every invocation should be paired with LLVMDisposeModule() or memory
835 * will be leaked.
836 */
839/**
840 * Return an exact copy of the specified module.
841 */
843
844/**
845 * Destroy a module instance.
846 *
847 * This must be called for every created module or memory will be
848 * leaked.
849 */
851
852/**
853 * Soon to be deprecated.
854 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
855 *
856 * Returns true if the module is in the new debug info mode which uses
857 * non-instruction debug records instead of debug intrinsics for variable
858 * location tracking.
859 */
861
862/**
863 * Soon to be deprecated.
864 * See https://llvm.org/docs/RemoveDIsDebugInfo.html#c-api-changes
865 *
866 * Convert module into desired debug info format.
867 */
869 LLVMBool UseNewFormat);
870
871/**
872 * Obtain the identifier of a module.
873 *
874 * @param M Module to obtain identifier of
875 * @param Len Out parameter which holds the length of the returned string.
876 * @return The identifier of M.
877 * @see Module::getModuleIdentifier()
878 */
879LLVM_C_ABI const char *LLVMGetModuleIdentifier(LLVMModuleRef M, size_t *Len);
880
881/**
882 * Set the identifier of a module to a string Ident with length Len.
883 *
884 * @param M The module to set identifier
885 * @param Ident The string to set M's identifier to
886 * @param Len Length of Ident
887 * @see Module::setModuleIdentifier()
888 */
889LLVM_C_ABI void LLVMSetModuleIdentifier(LLVMModuleRef M, const char *Ident,
890 size_t Len);
891
892/**
893 * Obtain the module's original source file name.
894 *
895 * @param M Module to obtain the name of
896 * @param Len Out parameter which holds the length of the returned string
897 * @return The original source file name of M
898 * @see Module::getSourceFileName()
899 */
900LLVM_C_ABI const char *LLVMGetSourceFileName(LLVMModuleRef M, size_t *Len);
901
902/**
903 * Set the original source file name of a module to a string Name with length
904 * Len.
905 *
906 * @param M The module to set the source file name of
907 * @param Name The string to set M's source file name to
908 * @param Len Length of Name
909 * @see Module::setSourceFileName()
910 */
911LLVM_C_ABI void LLVMSetSourceFileName(LLVMModuleRef M, const char *Name,
912 size_t Len);
913
914/**
915 * Obtain the data layout for a module.
916 *
917 * @see Module::getDataLayoutStr()
918 *
919 * LLVMGetDataLayout is DEPRECATED, as the name is not only incorrect,
920 * but match the name of another method on the module. Prefer the use
921 * of LLVMGetDataLayoutStr, which is not ambiguous.
922 */
925
926/**
927 * Set the data layout for a module.
928 *
929 * @see Module::setDataLayout()
930 */
931LLVM_C_ABI void LLVMSetDataLayout(LLVMModuleRef M, const char *DataLayoutStr);
932
933/**
934 * Obtain the target triple for a module.
935 *
936 * @see Module::getTargetTriple()
937 */
939
940/**
941 * Set the target triple for a module.
942 *
943 * @see Module::setTargetTriple()
944 */
945LLVM_C_ABI void LLVMSetTarget(LLVMModuleRef M, const char *Triple);
946
947/**
948 * Returns the module flags as an array of flag-key-value triples. The caller
949 * is responsible for freeing this array by calling
950 * \c LLVMDisposeModuleFlagsMetadata.
951 *
952 * @see Module::getModuleFlagsMetadata()
953 */
955 size_t *Len);
956
957/**
958 * Destroys module flags metadata entries.
959 */
961
962/**
963 * Returns the flag behavior for a module flag entry at a specific index.
964 *
965 * @see Module::ModuleFlagEntry::Behavior
966 */
968 LLVMModuleFlagEntry *Entries, unsigned Index);
969
970/**
971 * Returns the key for a module flag entry at a specific index.
972 *
973 * @see Module::ModuleFlagEntry::Key
974 */
976 unsigned Index, size_t *Len);
977
978/**
979 * Returns the metadata for a module flag entry at a specific index.
980 *
981 * @see Module::ModuleFlagEntry::Val
982 */
985
986/**
987 * Add a module-level flag to the module-level flags metadata if it doesn't
988 * already exist.
989 *
990 * @see Module::getModuleFlag()
991 */
993 size_t KeyLen);
994
995/**
996 * Add a module-level flag to the module-level flags metadata if it doesn't
997 * already exist.
998 *
999 * @see Module::addModuleFlag()
1000 */
1002 LLVMModuleFlagBehavior Behavior,
1003 const char *Key, size_t KeyLen,
1004 LLVMMetadataRef Val);
1005
1006/**
1007 * Dump a representation of a module to stderr.
1008 *
1009 * @see Module::dump()
1010 */
1012
1013/**
1014 * Print a representation of a module to a file. The ErrorMessage needs to be
1015 * disposed with LLVMDisposeMessage. Returns 0 on success, 1 otherwise.
1016 *
1017 * @see Module::print()
1018 */
1020 char **ErrorMessage);
1021
1022/**
1023 * Return a string representation of the module. Use
1024 * LLVMDisposeMessage to free the string.
1025 *
1026 * @see Module::print()
1027 */
1029
1030/**
1031 * Get inline assembly for a module.
1032 *
1033 * @see Module::getModuleInlineAsm()
1034 */
1035LLVM_C_ABI const char *LLVMGetModuleInlineAsm(LLVMModuleRef M, size_t *Len);
1036
1037/**
1038 * Set inline assembly for a module.
1039 *
1040 * @see Module::setModuleInlineAsm()
1041 */
1042LLVM_C_ABI void LLVMSetModuleInlineAsm2(LLVMModuleRef M, const char *Asm,
1043 size_t Len);
1044
1045/**
1046 * Append inline assembly to a module.
1047 *
1048 * @see Module::appendModuleInlineAsm()
1049 */
1050LLVM_C_ABI void LLVMAppendModuleInlineAsm(LLVMModuleRef M, const char *Asm,
1051 size_t Len);
1052
1053/**
1054 * Create the specified uniqued inline asm string.
1055 *
1056 * @see InlineAsm::get()
1057 */
1059 LLVMTypeRef Ty, const char *AsmString, size_t AsmStringSize,
1060 const char *Constraints, size_t ConstraintsSize, LLVMBool HasSideEffects,
1061 LLVMBool IsAlignStack, LLVMInlineAsmDialect Dialect, LLVMBool CanThrow);
1062
1063/**
1064 * Get the template string used for an inline assembly snippet
1065 *
1066 */
1067LLVM_C_ABI const char *LLVMGetInlineAsmAsmString(LLVMValueRef InlineAsmVal,
1068 size_t *Len);
1069
1070/**
1071 * Get the raw constraint string for an inline assembly snippet
1072 *
1073 */
1074LLVM_C_ABI const char *
1075LLVMGetInlineAsmConstraintString(LLVMValueRef InlineAsmVal, size_t *Len);
1076
1077/**
1078 * Get the dialect used by the inline asm snippet
1079 *
1080 */
1083
1084/**
1085 * Get the function type of the inline assembly snippet. The same type that
1086 * was passed into LLVMGetInlineAsm originally
1087 *
1088 * @see LLVMGetInlineAsm
1089 *
1090 */
1092
1093/**
1094 * Get if the inline asm snippet has side effects
1095 *
1096 */
1098
1099/**
1100 * Get if the inline asm snippet needs an aligned stack
1101 *
1102 */
1105
1106/**
1107 * Get if the inline asm snippet may unwind the stack
1108 *
1109 */
1111
1112/**
1113 * Obtain the context to which this module is associated.
1114 *
1115 * @see Module::getContext()
1116 */
1118
1119/** Deprecated: Use LLVMGetTypeByName2 instead. */
1121
1122/**
1123 * Obtain an iterator to the first NamedMDNode in a Module.
1124 *
1125 * @see llvm::Module::named_metadata_begin()
1126 */
1128
1129/**
1130 * Obtain an iterator to the last NamedMDNode in a Module.
1131 *
1132 * @see llvm::Module::named_metadata_end()
1133 */
1135
1136/**
1137 * Advance a NamedMDNode iterator to the next NamedMDNode.
1138 *
1139 * Returns NULL if the iterator was already at the end and there are no more
1140 * named metadata nodes.
1141 */
1144
1145/**
1146 * Decrement a NamedMDNode iterator to the previous NamedMDNode.
1147 *
1148 * Returns NULL if the iterator was already at the beginning and there are
1149 * no previous named metadata nodes.
1150 */
1153
1154/**
1155 * Retrieve a NamedMDNode with the given name, returning NULL if no such
1156 * node exists.
1157 *
1158 * @see llvm::Module::getNamedMetadata()
1159 */
1161 const char *Name,
1162 size_t NameLen);
1163
1164/**
1165 * Retrieve a NamedMDNode with the given name, creating a new node if no such
1166 * node exists.
1167 *
1168 * @see llvm::Module::getOrInsertNamedMetadata()
1169 */
1171 const char *Name,
1172 size_t NameLen);
1173
1174/**
1175 * Retrieve the name of a NamedMDNode.
1176 *
1177 * @see llvm::NamedMDNode::getName()
1178 */
1180 size_t *NameLen);
1181
1182/**
1183 * Obtain the number of operands for named metadata in a module.
1184 *
1185 * @see llvm::Module::getNamedMetadata()
1186 */
1188 const char *Name);
1189
1190/**
1191 * Obtain the named metadata operands for a module.
1192 *
1193 * The passed LLVMValueRef pointer should refer to an array of
1194 * LLVMValueRef at least LLVMGetNamedMetadataNumOperands long. This
1195 * array will be populated with the LLVMValueRef instances. Each
1196 * instance corresponds to a llvm::MDNode.
1197 *
1198 * @see llvm::Module::getNamedMetadata()
1199 * @see llvm::MDNode::getOperand()
1200 */
1202 LLVMValueRef *Dest);
1203
1204/**
1205 * Add an operand to named metadata.
1206 *
1207 * @see llvm::Module::getNamedMetadata()
1208 * @see llvm::MDNode::addOperand()
1209 */
1211 LLVMValueRef Val);
1212
1213/**
1214 * Return the directory of the debug location for this value, which must be
1215 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1216 *
1217 * @see llvm::Instruction::getDebugLoc()
1218 * @see llvm::GlobalVariable::getDebugInfo()
1219 * @see llvm::Function::getSubprogram()
1220 */
1222 unsigned *Length);
1223
1224/**
1225 * Return the filename of the debug location for this value, which must be
1226 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1227 *
1228 * @see llvm::Instruction::getDebugLoc()
1229 * @see llvm::GlobalVariable::getDebugInfo()
1230 * @see llvm::Function::getSubprogram()
1231 */
1233 unsigned *Length);
1234
1235/**
1236 * Return the line number of the debug location for this value, which must be
1237 * an llvm::Instruction, llvm::GlobalVariable, or llvm::Function.
1238 *
1239 * @see llvm::Instruction::getDebugLoc()
1240 * @see llvm::GlobalVariable::getDebugInfo()
1241 * @see llvm::Function::getSubprogram()
1242 */
1244
1245/**
1246 * Return the column number of the debug location for this value, which must be
1247 * an llvm::Instruction.
1248 *
1249 * @see llvm::Instruction::getDebugLoc()
1250 */
1252
1253/**
1254 * Add a function to a module under a specified name.
1255 *
1256 * @see llvm::Function::Create()
1257 */
1259 LLVMTypeRef FunctionTy);
1260
1261/**
1262 * Obtain or insert a function into a module.
1263 *
1264 * If a function with the specified name already exists in the module, it
1265 * is returned. Otherwise, a new function is created in the module with the
1266 * specified name and type and is returned.
1267 *
1268 * The returned value corresponds to a llvm::Function instance.
1269 *
1270 * @see llvm::Module::getOrInsertFunction()
1271 */
1273 const char *Name,
1274 size_t NameLen,
1275 LLVMTypeRef FunctionTy);
1276
1277/**
1278 * Obtain a Function value from a Module by its name.
1279 *
1280 * The returned value corresponds to a llvm::Function value.
1281 *
1282 * @see llvm::Module::getFunction()
1283 */
1285
1286/**
1287 * Obtain a Function value from a Module by its name.
1288 *
1289 * The returned value corresponds to a llvm::Function value.
1290 *
1291 * @see llvm::Module::getFunction()
1292 */
1294 const char *Name,
1295 size_t Length);
1296
1297/**
1298 * Obtain an iterator to the first Function in a Module.
1299 *
1300 * @see llvm::Module::begin()
1301 */
1303
1304/**
1305 * Obtain an iterator to the last Function in a Module.
1306 *
1307 * @see llvm::Module::end()
1308 */
1310
1311/**
1312 * Advance a Function iterator to the next Function.
1313 *
1314 * Returns NULL if the iterator was already at the end and there are no more
1315 * functions.
1316 */
1318
1319/**
1320 * Decrement a Function iterator to the previous Function.
1321 *
1322 * Returns NULL if the iterator was already at the beginning and there are
1323 * no previous functions.
1324 */
1326
1327/** Deprecated: Use LLVMSetModuleInlineAsm2 instead. */
1328LLVM_C_ABI void LLVMSetModuleInlineAsm(LLVMModuleRef M, const char *Asm);
1329
1330/**
1331 * @}
1332 */
1333
1334/**
1335 * @defgroup LLVMCCoreType Types
1336 *
1337 * Types represent the type of a value.
1338 *
1339 * Types are associated with a context instance. The context internally
1340 * deduplicates types so there is only 1 instance of a specific type
1341 * alive at a time. In other words, a unique type is shared among all
1342 * consumers within a context.
1343 *
1344 * A Type in the C API corresponds to llvm::Type.
1345 *
1346 * Types have the following hierarchy:
1347 *
1348 * types:
1349 * integer type
1350 * real type
1351 * function type
1352 * sequence types:
1353 * array type
1354 * pointer type
1355 * vector type
1356 * void type
1357 * label type
1358 * opaque type
1359 *
1360 * @{
1361 */
1362
1363/**
1364 * Obtain the enumerated type of a Type instance.
1365 *
1366 * @see llvm::Type:getTypeID()
1367 */
1369
1370/**
1371 * Whether the type has a known size.
1372 *
1373 * Things that don't have a size are abstract types, labels, and void.a
1374 *
1375 * @see llvm::Type::isSized()
1376 */
1378
1379/**
1380 * Obtain the context to which this type instance is associated.
1381 *
1382 * @see llvm::Type::getContext()
1383 */
1385
1386/**
1387 * Dump a representation of a type to stderr.
1388 *
1389 * @see llvm::Type::dump()
1390 */
1392
1393/**
1394 * Return a string representation of the type. Use
1395 * LLVMDisposeMessage to free the string.
1396 *
1397 * @see llvm::Type::print()
1398 */
1400
1401/**
1402 * @defgroup LLVMCCoreTypeInt Integer Types
1403 *
1404 * Functions in this section operate on integer types.
1405 *
1406 * @{
1407 */
1408
1409/**
1410 * Obtain an integer type from a context with specified bit width.
1411 */
1419
1420/**
1421 * Obtain an integer type from the global context with a specified bit
1422 * width.
1423 */
1426 "Use of the global context is deprecated, use "
1427 "LLVMInt1TypeInContext instead");
1430 "Use of the global context is deprecated, use "
1431 "LLVMInt8TypeInContext instead");
1434 "Use of the global context is deprecated, use "
1435 "LLVMInt16TypeInContext instead");
1438 "Use of the global context is deprecated, use "
1439 "LLVMInt32TypeInContext instead");
1442 "Use of the global context is deprecated, use "
1443 "LLVMInt64TypeInContext instead");
1446 "Use of the global context is deprecated, use "
1447 "LLVMInt128TypeInContext instead");
1450 "Use of the global context is deprecated, use "
1451 "LLVMIntTypeInContext instead");
1452
1453LLVM_C_ABI unsigned LLVMGetIntTypeWidth(LLVMTypeRef IntegerTy);
1454
1455/**
1456 * @}
1457 */
1458
1459/**
1460 * @defgroup LLVMCCoreTypeFloat Floating Point Types
1461 *
1462 * @{
1463 */
1464
1465/**
1466 * Obtain a 16-bit floating point type from a context.
1467 */
1469
1470/**
1471 * Obtain a 16-bit brain floating point type from a context.
1472 */
1474
1475/**
1476 * Obtain a 32-bit floating point type from a context.
1477 */
1479
1480/**
1481 * Obtain a 64-bit floating point type from a context.
1482 */
1484
1485/**
1486 * Obtain a 80-bit floating point type (X87) from a context.
1487 */
1489
1490/**
1491 * Obtain a 128-bit floating point type (112-bit mantissa) from a
1492 * context.
1493 */
1495
1496/**
1497 * Obtain a 128-bit floating point type (two 64-bits) from a context.
1498 */
1500
1501/**
1502 * Obtain a floating point type from the global context.
1503 *
1504 * These map to the functions in this group of the same name.
1505 */
1508 "Use of the global context is deprecated, use "
1509 "LLVMHalfTypeInContext instead");
1512 "Use of the global context is deprecated, use "
1513 "LLVMBFloatTypeInContext instead");
1516 "Use of the global context is deprecated, use "
1517 "LLVMFloatTypeInContext instead");
1520 "Use of the global context is deprecated, use "
1521 "LLVMDoubleTypeInContext instead");
1524 "Use of the global context is deprecated, use "
1525 "LLVMX86FP80TypeInContext instead");
1528 "Use of the global context is deprecated, use "
1529 "LLVMFP128TypeInContext instead");
1532 "Use of the global context is deprecated, use "
1533 "LLVMPPCFP128TypeInContext instead");
1534
1535/**
1536 * @}
1537 */
1538
1539/**
1540 * @defgroup LLVMCCoreTypeFunction Function Types
1541 *
1542 * @{
1543 */
1544
1545/**
1546 * Obtain a function type consisting of a specified signature.
1547 *
1548 * The function is defined as a tuple of a return Type, a list of
1549 * parameter types, and whether the function is variadic.
1550 */
1552 LLVMTypeRef *ParamTypes,
1553 unsigned ParamCount, LLVMBool IsVarArg);
1554
1555/**
1556 * Returns whether a function type is variadic.
1557 */
1559
1560/**
1561 * Obtain the Type this function Type returns.
1562 */
1564
1565/**
1566 * Obtain the number of parameters this function accepts.
1567 */
1568LLVM_C_ABI unsigned LLVMCountParamTypes(LLVMTypeRef FunctionTy);
1569
1570/**
1571 * Obtain the types of a function's parameters.
1572 *
1573 * The Dest parameter should point to a pre-allocated array of
1574 * LLVMTypeRef at least LLVMCountParamTypes() large. On return, the
1575 * first LLVMCountParamTypes() entries in the array will be populated
1576 * with LLVMTypeRef instances.
1577 *
1578 * @param FunctionTy The function type to operate on.
1579 * @param Dest Memory address of an array to be filled with result.
1580 */
1581LLVM_C_ABI void LLVMGetParamTypes(LLVMTypeRef FunctionTy, LLVMTypeRef *Dest);
1582
1583/**
1584 * @}
1585 */
1586
1587/**
1588 * @defgroup LLVMCCoreTypeStruct Structure Types
1589 *
1590 * These functions relate to LLVMTypeRef instances.
1591 *
1592 * @see llvm::StructType
1593 *
1594 * @{
1595 */
1596
1597/**
1598 * Create a new structure type in a context.
1599 *
1600 * A structure is specified by a list of inner elements/types and
1601 * whether these can be packed together.
1602 *
1603 * @see llvm::StructType::create()
1604 */
1606 LLVMTypeRef *ElementTypes,
1607 unsigned ElementCount,
1608 LLVMBool Packed);
1609
1610/**
1611 * Create a new structure type in the global context.
1612 *
1613 * @see llvm::StructType::create()
1614 */
1616 LLVMTypeRef LLVMStructType(LLVMTypeRef *ElementTypes, unsigned ElementCount,
1617 LLVMBool Packed),
1618 "Use of the global context is deprecated, use LLVMStructTypeInContext "
1619 "instead");
1620
1621/**
1622 * Create an empty structure in a context having a specified name.
1623 *
1624 * @see llvm::StructType::create()
1625 */
1627 const char *Name);
1628
1629/**
1630 * Obtain the name of a structure.
1631 *
1632 * @see llvm::StructType::getName()
1633 */
1635
1636/**
1637 * Set the contents of a structure type.
1638 *
1639 * @see llvm::StructType::setBody()
1640 */
1642 LLVMTypeRef *ElementTypes,
1643 unsigned ElementCount, LLVMBool Packed);
1644
1645/**
1646 * Get the number of elements defined inside the structure.
1647 *
1648 * @see llvm::StructType::getNumElements()
1649 */
1651
1652/**
1653 * Get the elements within a structure.
1654 *
1655 * The function is passed the address of a pre-allocated array of
1656 * LLVMTypeRef at least LLVMCountStructElementTypes() long. After
1657 * invocation, this array will be populated with the structure's
1658 * elements. The objects in the destination array will have a lifetime
1659 * of the structure type itself, which is the lifetime of the context it
1660 * is contained in.
1661 */
1663 LLVMTypeRef *Dest);
1664
1665/**
1666 * Get the type of the element at a given index in the structure.
1667 *
1668 * @see llvm::StructType::getTypeAtIndex()
1669 */
1671 unsigned i);
1672
1673/**
1674 * Determine whether a structure is packed.
1675 *
1676 * @see llvm::StructType::isPacked()
1677 */
1679
1680/**
1681 * Determine whether a structure is opaque.
1682 *
1683 * @see llvm::StructType::isOpaque()
1684 */
1686
1687/**
1688 * Determine whether a structure is literal.
1689 *
1690 * @see llvm::StructType::isLiteral()
1691 */
1693
1694/**
1695 * @}
1696 */
1697
1698/**
1699 * @defgroup LLVMCCoreTypeSequential Sequential Types
1700 *
1701 * Sequential types represents "arrays" of types. This is a super class
1702 * for array, vector, and pointer types.
1703 *
1704 * @{
1705 */
1706
1707/**
1708 * Obtain the element type of an array or vector type.
1709 *
1710 * @see llvm::SequentialType::getElementType()
1711 */
1713
1714/**
1715 * Returns type's subtypes
1716 *
1717 * @see llvm::Type::subtypes()
1718 */
1720
1721/**
1722 * Return the number of types in the derived type.
1723 *
1724 * @see llvm::Type::getNumContainedTypes()
1725 */
1727
1728/**
1729 * Create a fixed size array type that refers to a specific type.
1730 *
1731 * The created type will exist in the context that its element type
1732 * exists in.
1733 *
1734 * @deprecated LLVMArrayType is deprecated in favor of the API accurate
1735 * LLVMArrayType2
1736 * @see llvm::ArrayType::get()
1737 */
1739 unsigned ElementCount);
1740
1741/**
1742 * Create a fixed size array type that refers to a specific type.
1743 *
1744 * The created type will exist in the context that its element type
1745 * exists in.
1746 *
1747 * @see llvm::ArrayType::get()
1748 */
1750 uint64_t ElementCount);
1751
1752/**
1753 * Obtain the length of an array type.
1754 *
1755 * This only works on types that represent arrays.
1756 *
1757 * @deprecated LLVMGetArrayLength is deprecated in favor of the API accurate
1758 * LLVMGetArrayLength2
1759 * @see llvm::ArrayType::getNumElements()
1760 */
1761LLVM_C_ABI unsigned LLVMGetArrayLength(LLVMTypeRef ArrayTy);
1762
1763/**
1764 * Obtain the length of an array type.
1765 *
1766 * This only works on types that represent arrays.
1767 *
1768 * @see llvm::ArrayType::getNumElements()
1769 */
1771
1772/**
1773 * Create a pointer type that points to a defined type.
1774 *
1775 * The created type will exist in the context that its pointee type
1776 * exists in.
1777 *
1778 * @see llvm::PointerType::get()
1779 */
1781 unsigned AddressSpace);
1782
1783/**
1784 * Determine whether a pointer is opaque.
1785 *
1786 * True if this is an instance of an opaque PointerType.
1787 *
1788 * @see llvm::Type::isOpaquePointerTy()
1789 */
1791
1792/**
1793 * Create an opaque pointer type in a context.
1794 *
1795 * @see llvm::PointerType::get()
1796 */
1798 unsigned AddressSpace);
1799
1800/**
1801 * Obtain the address space of a pointer type.
1802 *
1803 * This only works on types that represent pointers.
1804 *
1805 * @see llvm::PointerType::getAddressSpace()
1806 */
1808
1809/**
1810 * Create a vector type that contains a defined type and has a specific
1811 * number of elements.
1812 *
1813 * The created type will exist in the context thats its element type
1814 * exists in.
1815 *
1816 * @see llvm::VectorType::get()
1817 */
1819 unsigned ElementCount);
1820
1821/**
1822 * Create a vector type that contains a defined type and has a scalable
1823 * number of elements.
1824 *
1825 * The created type will exist in the context thats its element type
1826 * exists in.
1827 *
1828 * @see llvm::ScalableVectorType::get()
1829 */
1831 unsigned ElementCount);
1832
1833/**
1834 * Obtain the (possibly scalable) number of elements in a vector type.
1835 *
1836 * This only works on types that represent vectors (fixed or scalable).
1837 *
1838 * @see llvm::VectorType::getNumElements()
1839 */
1840LLVM_C_ABI unsigned LLVMGetVectorSize(LLVMTypeRef VectorTy);
1841
1842/**
1843 * Get the pointer value for the associated ConstantPtrAuth constant.
1844 *
1845 * @see llvm::ConstantPtrAuth::getPointer
1846 */
1848
1849/**
1850 * Get the key value for the associated ConstantPtrAuth constant.
1851 *
1852 * @see llvm::ConstantPtrAuth::getKey
1853 */
1855
1856/**
1857 * Get the discriminator value for the associated ConstantPtrAuth constant.
1858 *
1859 * @see llvm::ConstantPtrAuth::getDiscriminator
1860 */
1863
1864/**
1865 * Get the address discriminator value for the associated ConstantPtrAuth
1866 * constant.
1867 *
1868 * @see llvm::ConstantPtrAuth::getAddrDiscriminator
1869 */
1872
1873/**
1874 * @}
1875 */
1876
1877/**
1878 * @defgroup LLVMCCoreTypeOther Other Types
1879 *
1880 * @{
1881 */
1882
1883/**
1884 * Create a void type in a context.
1885 */
1887
1888/**
1889 * Create a label type in a context.
1890 */
1892
1893/**
1894 * Create a X86 AMX type in a context.
1895 */
1897
1898/**
1899 * Create a token type in a context.
1900 */
1902
1903/**
1904 * Create a metadata type in a context.
1905 */
1907
1908/**
1909 * These are similar to the above functions except they operate on the
1910 * global context.
1911 */
1914 "Use of the global context is deprecated, use "
1915 "LLVMVoidTypeInContext instead");
1918 "Use of the global context is deprecated, use "
1919 "LLVMLabelTypeInContext instead");
1922 "Use of the global context is deprecated, use "
1923 "LLVMX86AMXTypeInContext instead");
1924
1925/**
1926 * Create a target extension type in LLVM context.
1927 */
1929 LLVMContextRef C, const char *Name, LLVMTypeRef *TypeParams,
1930 unsigned TypeParamCount, unsigned *IntParams, unsigned IntParamCount);
1931
1932/**
1933 * Obtain the name for this target extension type.
1934 *
1935 * @see llvm::TargetExtType::getName()
1936 */
1937LLVM_C_ABI const char *LLVMGetTargetExtTypeName(LLVMTypeRef TargetExtTy);
1938
1939/**
1940 * Obtain the number of type parameters for this target extension type.
1941 *
1942 * @see llvm::TargetExtType::getNumTypeParameters()
1943 */
1945
1946/**
1947 * Get the type parameter at the given index for the target extension type.
1948 *
1949 * @see llvm::TargetExtType::getTypeParameter()
1950 */
1952 unsigned Idx);
1953
1954/**
1955 * Obtain the number of int parameters for this target extension type.
1956 *
1957 * @see llvm::TargetExtType::getNumIntParameters()
1958 */
1960
1961/**
1962 * Get the int parameter at the given index for the target extension type.
1963 *
1964 * @see llvm::TargetExtType::getIntParameter()
1965 */
1967 unsigned Idx);
1968
1969/**
1970 * @}
1971 */
1972
1973/**
1974 * @}
1975 */
1976
1977/**
1978 * @defgroup LLVMCCoreValues Values
1979 *
1980 * The bulk of LLVM's object model consists of values, which comprise a very
1981 * rich type hierarchy.
1982 *
1983 * LLVMValueRef essentially represents llvm::Value. There is a rich
1984 * hierarchy of classes within this type. Depending on the instance
1985 * obtained, not all APIs are available.
1986 *
1987 * Callers can determine the type of an LLVMValueRef by calling the
1988 * LLVMIsA* family of functions (e.g. LLVMIsAArgument()). These
1989 * functions are defined by a macro, so it isn't obvious which are
1990 * available by looking at the Doxygen source code. Instead, look at the
1991 * source definition of LLVM_FOR_EACH_VALUE_SUBCLASS and note the list
1992 * of value names given. These value names also correspond to classes in
1993 * the llvm::Value hierarchy.
1994 *
1995 * @{
1996 */
1997
1998// Currently, clang-format tries to format the LLVM_FOR_EACH_VALUE_SUBCLASS
1999// macro in a progressively-indented fashion, which is not desired
2000// clang-format off
2001
2002#define LLVM_FOR_EACH_VALUE_SUBCLASS(macro) \
2003 macro(Argument) \
2004 macro(BasicBlock) \
2005 macro(InlineAsm) \
2006 macro(User) \
2007 macro(Constant) \
2008 macro(BlockAddress) \
2009 macro(ConstantAggregateZero) \
2010 macro(ConstantArray) \
2011 macro(ConstantDataSequential) \
2012 macro(ConstantDataArray) \
2013 macro(ConstantDataVector) \
2014 macro(ConstantExpr) \
2015 macro(ConstantFP) \
2016 macro(ConstantInt) \
2017 macro(ConstantPointerNull) \
2018 macro(ConstantStruct) \
2019 macro(ConstantTokenNone) \
2020 macro(ConstantVector) \
2021 macro(ConstantPtrAuth) \
2022 macro(GlobalValue) \
2023 macro(GlobalAlias) \
2024 macro(GlobalObject) \
2025 macro(Function) \
2026 macro(GlobalVariable) \
2027 macro(GlobalIFunc) \
2028 macro(UndefValue) \
2029 macro(PoisonValue) \
2030 macro(Instruction) \
2031 macro(UnaryOperator) \
2032 macro(BinaryOperator) \
2033 macro(CallInst) \
2034 macro(IntrinsicInst) \
2035 macro(DbgInfoIntrinsic) \
2036 macro(DbgVariableIntrinsic) \
2037 macro(DbgDeclareInst) \
2038 macro(DbgLabelInst) \
2039 macro(MemIntrinsic) \
2040 macro(MemCpyInst) \
2041 macro(MemMoveInst) \
2042 macro(MemSetInst) \
2043 macro(CmpInst) \
2044 macro(FCmpInst) \
2045 macro(ICmpInst) \
2046 macro(ExtractElementInst) \
2047 macro(GetElementPtrInst) \
2048 macro(InsertElementInst) \
2049 macro(InsertValueInst) \
2050 macro(LandingPadInst) \
2051 macro(PHINode) \
2052 macro(SelectInst) \
2053 macro(ShuffleVectorInst) \
2054 macro(StoreInst) \
2055 macro(BranchInst) \
2056 macro(IndirectBrInst) \
2057 macro(InvokeInst) \
2058 macro(ReturnInst) \
2059 macro(SwitchInst) \
2060 macro(UnreachableInst) \
2061 macro(ResumeInst) \
2062 macro(CleanupReturnInst) \
2063 macro(CatchReturnInst) \
2064 macro(CatchSwitchInst) \
2065 macro(CallBrInst) \
2066 macro(FuncletPadInst) \
2067 macro(CatchPadInst) \
2068 macro(CleanupPadInst) \
2069 macro(UnaryInstruction) \
2070 macro(AllocaInst) \
2071 macro(CastInst) \
2072 macro(AddrSpaceCastInst) \
2073 macro(BitCastInst) \
2074 macro(FPExtInst) \
2075 macro(FPToSIInst) \
2076 macro(FPToUIInst) \
2077 macro(FPTruncInst) \
2078 macro(IntToPtrInst) \
2079 macro(PtrToIntInst) \
2080 macro(SExtInst) \
2081 macro(SIToFPInst) \
2082 macro(TruncInst) \
2083 macro(UIToFPInst) \
2084 macro(ZExtInst) \
2085 macro(ExtractValueInst) \
2086 macro(LoadInst) \
2087 macro(VAArgInst) \
2088 macro(FreezeInst) \
2089 macro(AtomicCmpXchgInst) \
2090 macro(AtomicRMWInst) \
2091 macro(FenceInst)
2092
2093// clang-format on
2094
2095/**
2096 * @defgroup LLVMCCoreValueGeneral General APIs
2097 *
2098 * Functions in this section work on all LLVMValueRef instances,
2099 * regardless of their sub-type. They correspond to functions available
2100 * on llvm::Value.
2101 *
2102 * @{
2103 */
2104
2105/**
2106 * Obtain the type of a value.
2107 *
2108 * @see llvm::Value::getType()
2109 */
2111
2112/**
2113 * Obtain the enumerated type of a Value instance.
2114 *
2115 * @see llvm::Value::getValueID()
2116 */
2118
2119/**
2120 * Obtain the string name of a value.
2121 *
2122 * @see llvm::Value::getName()
2123 */
2124LLVM_C_ABI const char *LLVMGetValueName2(LLVMValueRef Val, size_t *Length);
2125
2126/**
2127 * Set the string name of a value.
2128 *
2129 * @see llvm::Value::setName()
2130 */
2131LLVM_C_ABI void LLVMSetValueName2(LLVMValueRef Val, const char *Name,
2132 size_t NameLen);
2133
2134/**
2135 * Dump a representation of a value to stderr.
2136 *
2137 * @see llvm::Value::dump()
2138 */
2140
2141/**
2142 * Return a string representation of the value. Use
2143 * LLVMDisposeMessage to free the string.
2144 *
2145 * @see llvm::Value::print()
2146 */
2148
2149/**
2150 * Obtain the context to which this value is associated.
2151 *
2152 * @see llvm::Value::getContext()
2153 */
2155
2156/**
2157 * Return a string representation of the DbgRecord. Use
2158 * LLVMDisposeMessage to free the string.
2159 *
2160 * @see llvm::DbgRecord::print()
2161 */
2163
2164/**
2165 * Replace all uses of a value with another one.
2166 *
2167 * @see llvm::Value::replaceAllUsesWith()
2168 */
2170 LLVMValueRef NewVal);
2171
2172/**
2173 * Determine whether the specified value instance is constant.
2174 */
2176
2177/**
2178 * Determine whether a value instance is undefined.
2179 */
2181
2182/**
2183 * Determine whether a value instance is poisonous.
2184 */
2186
2187/**
2188 * Convert value instances between types.
2189 *
2190 * Internally, an LLVMValueRef is "pinned" to a specific type. This
2191 * series of functions allows you to cast an instance to a specific
2192 * type.
2193 *
2194 * If the cast is not valid for the specified type, NULL is returned.
2195 *
2196 * @see llvm::dyn_cast_or_null<>
2197 */
2198#define LLVM_DECLARE_VALUE_CAST(name) \
2199 LLVM_C_ABI LLVMValueRef LLVMIsA##name(LLVMValueRef Val);
2201
2205
2206/** Deprecated: Use LLVMGetValueName2 instead. */
2208/** Deprecated: Use LLVMSetValueName2 instead. */
2209LLVM_C_ABI void LLVMSetValueName(LLVMValueRef Val, const char *Name);
2210
2211/**
2212 * @}
2213 */
2214
2215/**
2216 * @defgroup LLVMCCoreValueUses Usage
2217 *
2218 * This module defines functions that allow you to inspect the uses of a
2219 * LLVMValueRef.
2220 *
2221 * It is possible to obtain an LLVMUseRef for any LLVMValueRef instance.
2222 * Each LLVMUseRef (which corresponds to a llvm::Use instance) holds a
2223 * llvm::User and llvm::Value.
2224 *
2225 * @{
2226 */
2227
2228/**
2229 * Obtain the first use of a value.
2230 *
2231 * Uses are obtained in an iterator fashion. First, call this function
2232 * to obtain a reference to the first use. Then, call LLVMGetNextUse()
2233 * on that instance and all subsequently obtained instances until
2234 * LLVMGetNextUse() returns NULL.
2235 *
2236 * @see llvm::Value::use_begin()
2237 */
2239
2240/**
2241 * Obtain the next use of a value.
2242 *
2243 * This effectively advances the iterator. It returns NULL if you are on
2244 * the final use and no more are available.
2245 */
2247
2248/**
2249 * Obtain the user value for a user.
2250 *
2251 * The returned value corresponds to a llvm::User type.
2252 *
2253 * @see llvm::Use::getUser()
2254 */
2256
2257/**
2258 * Obtain the value this use corresponds to.
2259 *
2260 * @see llvm::Use::get().
2261 */
2263
2264/**
2265 * @}
2266 */
2267
2268/**
2269 * @defgroup LLVMCCoreValueUser User value
2270 *
2271 * Function in this group pertain to LLVMValueRef instances that descent
2272 * from llvm::User. This includes constants, instructions, and
2273 * operators.
2274 *
2275 * @{
2276 */
2277
2278/**
2279 * Obtain an operand at a specific index in a llvm::User value.
2280 *
2281 * @see llvm::User::getOperand()
2282 */
2284
2285/**
2286 * Obtain the use of an operand at a specific index in a llvm::User value.
2287 *
2288 * @see llvm::User::getOperandUse()
2289 */
2291
2292/**
2293 * Set an operand at a specific index in a llvm::User value.
2294 *
2295 * @see llvm::User::setOperand()
2296 */
2297LLVM_C_ABI void LLVMSetOperand(LLVMValueRef User, unsigned Index,
2298 LLVMValueRef Val);
2299
2300/**
2301 * Obtain the number of operands in a llvm::User value.
2302 *
2303 * @see llvm::User::getNumOperands()
2304 */
2306
2307/**
2308 * @}
2309 */
2310
2311/**
2312 * @defgroup LLVMCCoreValueConstant Constants
2313 *
2314 * This section contains APIs for interacting with LLVMValueRef that
2315 * correspond to llvm::Constant instances.
2316 *
2317 * These functions will work for any LLVMValueRef in the llvm::Constant
2318 * class hierarchy.
2319 *
2320 * @{
2321 */
2322
2323/**
2324 * Obtain a constant value referring to the null instance of a type.
2325 *
2326 * @see llvm::Constant::getNullValue()
2327 */
2329
2330/**
2331 * Obtain a constant value referring to the instance of a type
2332 * consisting of all ones.
2333 *
2334 * This is only valid for integer types.
2335 *
2336 * @see llvm::Constant::getAllOnesValue()
2337 */
2339
2340/**
2341 * Obtain a constant value referring to an undefined value of a type.
2342 *
2343 * @see llvm::UndefValue::get()
2344 */
2346
2347/**
2348 * Obtain a constant value referring to a poison value of a type.
2349 *
2350 * @see llvm::PoisonValue::get()
2351 */
2353
2354/**
2355 * Determine whether a value instance is null.
2356 *
2357 * @see llvm::Constant::isNullValue()
2358 */
2360
2361/**
2362 * Obtain a constant that is a constant pointer pointing to NULL for a
2363 * specified type.
2364 */
2366
2367/**
2368 * @defgroup LLVMCCoreValueConstantScalar Scalar constants
2369 *
2370 * Functions in this group model LLVMValueRef instances that correspond
2371 * to constants referring to scalar types.
2372 *
2373 * For integer types, the LLVMTypeRef parameter should correspond to a
2374 * llvm::IntegerType instance and the returned LLVMValueRef will
2375 * correspond to a llvm::ConstantInt.
2376 *
2377 * For floating point types, the LLVMTypeRef returned corresponds to a
2378 * llvm::ConstantFP.
2379 *
2380 * @{
2381 */
2382
2383/**
2384 * Obtain a constant value for an integer type.
2385 *
2386 * The returned value corresponds to a llvm::ConstantInt.
2387 *
2388 * @see llvm::ConstantInt::get()
2389 *
2390 * @param IntTy Integer type to obtain value of.
2391 * @param N The value the returned instance should refer to.
2392 * @param SignExtend Whether to sign extend the produced value.
2393 */
2394LLVM_C_ABI LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
2395 LLVMBool SignExtend);
2396
2397/**
2398 * Obtain a constant value for an integer of arbitrary precision.
2399 *
2400 * @see llvm::ConstantInt::get()
2401 */
2403 LLVMTypeRef IntTy, unsigned NumWords, const uint64_t Words[]);
2404
2405/**
2406 * Obtain a constant value for an integer parsed from a string.
2407 *
2408 * A similar API, LLVMConstIntOfStringAndSize is also available. If the
2409 * string's length is available, it is preferred to call that function
2410 * instead.
2411 *
2412 * @see llvm::ConstantInt::get()
2413 */
2415 const char *Text, uint8_t Radix);
2416
2417/**
2418 * Obtain a constant value for an integer parsed from a string with
2419 * specified length.
2420 *
2421 * @see llvm::ConstantInt::get()
2422 */
2424 const char *Text,
2425 unsigned SLen,
2426 uint8_t Radix);
2427
2428/**
2429 * Obtain a constant value referring to a double floating point value.
2430 */
2432
2433/**
2434 * Obtain a constant for a floating point value parsed from a string.
2435 *
2436 * A similar API, LLVMConstRealOfStringAndSize is also available. It
2437 * should be used if the input string's length is known.
2438 */
2440 const char *Text);
2441
2442/**
2443 * Obtain a constant for a floating point value parsed from a string.
2444 */
2446 const char *Text,
2447 unsigned SLen);
2448
2449/**
2450 * Obtain a constant for a floating point value from array of 64 bit values.
2451 * The length of the array N must be ceildiv(bits, 64), where bits is the
2452 * scalar size in bits of the floating-point type.
2453 */
2454
2456
2457/**
2458 * Obtain the zero extended value for an integer constant value.
2459 *
2460 * @see llvm::ConstantInt::getZExtValue()
2461 */
2462LLVM_C_ABI unsigned long long
2464
2465/**
2466 * Obtain the sign extended value for an integer constant value.
2467 *
2468 * @see llvm::ConstantInt::getSExtValue()
2469 */
2470LLVM_C_ABI long long LLVMConstIntGetSExtValue(LLVMValueRef ConstantVal);
2471
2472/**
2473 * Obtain the double value for an floating point constant value.
2474 * losesInfo indicates if some precision was lost in the conversion.
2475 *
2476 * @see llvm::ConstantFP::getDoubleValue
2477 */
2479 LLVMBool *losesInfo);
2480
2481/**
2482 * @}
2483 */
2484
2485/**
2486 * @defgroup LLVMCCoreValueConstantComposite Composite Constants
2487 *
2488 * Functions in this group operate on composite constants.
2489 *
2490 * @{
2491 */
2492
2493/**
2494 * Create a ConstantDataSequential and initialize it with a string.
2495 *
2496 * @deprecated LLVMConstStringInContext is deprecated in favor of the API
2497 * accurate LLVMConstStringInContext2
2498 * @see llvm::ConstantDataArray::getString()
2499 */
2501 const char *Str,
2502 unsigned Length,
2503 LLVMBool DontNullTerminate);
2504
2505/**
2506 * Create a ConstantDataSequential and initialize it with a string.
2507 *
2508 * @see llvm::ConstantDataArray::getString()
2509 */
2511 const char *Str,
2512 size_t Length,
2513 LLVMBool DontNullTerminate);
2514
2515/**
2516 * Create a ConstantDataSequential with string content in the global context.
2517 *
2518 * This is the same as LLVMConstStringInContext except it operates on the
2519 * global context.
2520 *
2521 * @see LLVMConstStringInContext()
2522 * @see llvm::ConstantDataArray::getString()
2523 */
2525 LLVMValueRef LLVMConstString(const char *Str, unsigned Length,
2526 LLVMBool DontNullTerminate),
2527 "Use of the global context is deprecated, use LLVMConstStringInContext2 "
2528 "instead");
2529
2530/**
2531 * Returns true if the specified constant is an array of i8.
2532 *
2533 * @see ConstantDataSequential::getAsString()
2534 */
2536
2537/**
2538 * Get the given constant data sequential as a string.
2539 *
2540 * @see ConstantDataSequential::getAsString()
2541 */
2542LLVM_C_ABI const char *LLVMGetAsString(LLVMValueRef c, size_t *Length);
2543
2544/**
2545 * Get the raw, underlying bytes of the given constant data sequential.
2546 *
2547 * This is the same as LLVMGetAsString except it works for all constant data
2548 * sequentials, not just i8 arrays.
2549 *
2550 * @see ConstantDataSequential::getRawDataValues()
2551 */
2553 size_t *SizeInBytes);
2554
2555/**
2556 * Create an anonymous ConstantStruct with the specified values.
2557 *
2558 * @see llvm::ConstantStruct::getAnon()
2559 */
2561 LLVMValueRef *ConstantVals,
2562 unsigned Count,
2563 LLVMBool Packed);
2564
2565/**
2566 * Create a ConstantStruct in the global Context.
2567 *
2568 * This is the same as LLVMConstStructInContext except it operates on the
2569 * global Context.
2570 *
2571 * @see LLVMConstStructInContext()
2572 */
2574 LLVMValueRef LLVMConstStruct(LLVMValueRef *ConstantVals, unsigned Count,
2575 LLVMBool Packed),
2576 "Use of the global context is deprecated, use LLVMConstStructInContext "
2577 "instead");
2578
2579/**
2580 * Create a ConstantArray from values.
2581 *
2582 * @deprecated LLVMConstArray is deprecated in favor of the API accurate
2583 * LLVMConstArray2
2584 * @see llvm::ConstantArray::get()
2585 */
2587 LLVMValueRef *ConstantVals,
2588 unsigned Length);
2589
2590/**
2591 * Create a ConstantArray from values.
2592 *
2593 * @see llvm::ConstantArray::get()
2594 */
2596 LLVMValueRef *ConstantVals,
2597 uint64_t Length);
2598
2599/**
2600 * Create a ConstantDataArray from raw values.
2601 *
2602 * ElementTy must be one of i8, i16, i32, i64, half, bfloat, float, or double.
2603 * Data points to a contiguous buffer of raw values in the host endianness. The
2604 * element count is inferred from the element type and the data size in bytes.
2605 *
2606 * @see llvm::ConstantDataArray::getRaw()
2607 */
2609 const char *Data,
2610 size_t SizeInBytes);
2611
2612/**
2613 * Create a non-anonymous ConstantStruct from values.
2614 *
2615 * @see llvm::ConstantStruct::get()
2616 */
2618 LLVMValueRef *ConstantVals,
2619 unsigned Count);
2620
2621/**
2622 * Get element of a constant aggregate (struct, array or vector) at the
2623 * specified index. Returns null if the index is out of range, or it's not
2624 * possible to determine the element (e.g., because the constant is a
2625 * constant expression.)
2626 *
2627 * @see llvm::Constant::getAggregateElement()
2628 */
2630
2631/**
2632 * Get an element at specified index as a constant.
2633 *
2634 * @see ConstantDataSequential::getElementAsConstant()
2635 */
2638 "Use LLVMGetAggregateElement instead");
2639
2640/**
2641 * Create a ConstantVector from values.
2642 *
2643 * @see llvm::ConstantVector::get()
2644 */
2646 unsigned Size);
2647
2648/**
2649 * Create a ConstantPtrAuth constant with the given values.
2650 *
2651 * @see llvm::ConstantPtrAuth::get()
2652 */
2654 LLVMValueRef Disc,
2655 LLVMValueRef AddrDisc);
2656
2657/**
2658 * @}
2659 */
2660
2661/**
2662 * @defgroup LLVMCCoreValueConstantExpressions Constant Expressions
2663 *
2664 * Functions in this group correspond to APIs on llvm::ConstantExpr.
2665 *
2666 * @see llvm::ConstantExpr.
2667 *
2668 * @{
2669 */
2677 "Use LLVMConstNull instead.");
2680 LLVMValueRef RHSConstant);
2682 LLVMValueRef RHSConstant);
2684 LLVMValueRef RHSConstant);
2686 LLVMValueRef RHSConstant);
2688 LLVMValueRef RHSConstant);
2690 LLVMValueRef RHSConstant);
2692 LLVMValueRef RHSConstant);
2694 LLVMValueRef *ConstantIndices,
2695 unsigned NumIndices);
2697 LLVMValueRef ConstantVal,
2698 LLVMValueRef *ConstantIndices,
2699 unsigned NumIndices);
2700/**
2701 * Creates a constant GetElementPtr expression. Similar to LLVMConstGEP2, but
2702 * allows specifying the no-wrap flags.
2703 *
2704 * @see llvm::ConstantExpr::getGetElementPtr()
2705 */
2707 LLVMTypeRef Ty, LLVMValueRef ConstantVal, LLVMValueRef *ConstantIndices,
2708 unsigned NumIndices, LLVMGEPNoWrapFlags NoWrapFlags);
2710 LLVMTypeRef ToType);
2712 LLVMTypeRef ToType);
2714 LLVMTypeRef ToType);
2716 LLVMTypeRef ToType);
2718 LLVMTypeRef ToType);
2720 LLVMTypeRef ToType);
2722 LLVMTypeRef ToType);
2724 LLVMValueRef IndexConstant);
2726 LLVMValueRef VectorConstant, LLVMValueRef ElementValueConstant,
2727 LLVMValueRef IndexConstant);
2729 LLVMValueRef VectorBConstant,
2730 LLVMValueRef MaskConstant);
2732
2733/**
2734 * Gets the function associated with a given BlockAddress constant value.
2735 */
2737
2738/**
2739 * Gets the basic block associated with a given BlockAddress constant value.
2740 */
2743
2744/** Deprecated: Use LLVMGetInlineAsm instead. */
2746 const char *AsmString,
2747 const char *Constraints,
2748 LLVMBool HasSideEffects,
2749 LLVMBool IsAlignStack);
2750
2751/**
2752 * @}
2753 */
2754
2755/**
2756 * @defgroup LLVMCCoreValueConstantGlobals Global Values
2757 *
2758 * This group contains functions that operate on global values. Functions in
2759 * this group relate to functions in the llvm::GlobalValue class tree.
2760 *
2761 * @see llvm::GlobalValue
2762 *
2763 * @{
2764 */
2765
2770LLVM_C_ABI const char *LLVMGetSection(LLVMValueRef Global);
2771LLVM_C_ABI void LLVMSetSection(LLVMValueRef Global, const char *Section);
2776 LLVMDLLStorageClass Class);
2779 LLVMUnnamedAddr UnnamedAddr);
2780
2781/**
2782 * Returns the "value type" of a global value. This differs from the formal
2783 * type of a global value which is always a pointer type.
2784 *
2785 * @see llvm::GlobalValue::getValueType()
2786 * @see llvm::Function::getFunctionType()
2787 */
2789
2790/** Deprecated: Use LLVMGetUnnamedAddress instead. */
2792/** Deprecated: Use LLVMSetUnnamedAddress instead. */
2794 LLVMBool HasUnnamedAddr);
2795
2796/**
2797 * @defgroup LLVMCCoreValueWithAlignment Values with alignment
2798 *
2799 * Functions in this group only apply to values with alignment, i.e.
2800 * global variables, load and store instructions.
2801 */
2802
2803/**
2804 * Obtain the preferred alignment of the value.
2805 * @see llvm::AllocaInst::getAlignment()
2806 * @see llvm::LoadInst::getAlignment()
2807 * @see llvm::StoreInst::getAlignment()
2808 * @see llvm::AtomicRMWInst::setAlignment()
2809 * @see llvm::AtomicCmpXchgInst::setAlignment()
2810 * @see llvm::GlobalValue::getAlignment()
2811 */
2813
2814/**
2815 * Set the preferred alignment of the value.
2816 * @see llvm::AllocaInst::setAlignment()
2817 * @see llvm::LoadInst::setAlignment()
2818 * @see llvm::StoreInst::setAlignment()
2819 * @see llvm::AtomicRMWInst::setAlignment()
2820 * @see llvm::AtomicCmpXchgInst::setAlignment()
2821 * @see llvm::GlobalValue::setAlignment()
2822 */
2823LLVM_C_ABI void LLVMSetAlignment(LLVMValueRef V, unsigned Bytes);
2824
2825/**
2826 * Sets a metadata attachment, erasing the existing metadata attachment if
2827 * it already exists for the given kind.
2828 *
2829 * @see llvm::GlobalObject::setMetadata()
2830 */
2831LLVM_C_ABI void LLVMGlobalSetMetadata(LLVMValueRef Global, unsigned Kind,
2832 LLVMMetadataRef MD);
2833
2834/**
2835 * Adds a metadata attachment.
2836 *
2837 * @see llvm::GlobalObject::addMetadata()
2838 */
2839LLVM_C_ABI void LLVMGlobalAddMetadata(LLVMValueRef Global, unsigned Kind,
2840 LLVMMetadataRef MD);
2841
2842/**
2843 * Erases a metadata attachment of the given kind if it exists.
2844 *
2845 * @see llvm::GlobalObject::eraseMetadata()
2846 */
2847LLVM_C_ABI void LLVMGlobalEraseMetadata(LLVMValueRef Global, unsigned Kind);
2848
2849/**
2850 * Removes all metadata attachments from this value.
2851 *
2852 * @see llvm::GlobalObject::clearMetadata()
2853 */
2855
2856/**
2857 * Add debuginfo metadata to this global.
2858 *
2859 * @see llvm::GlobalVariable::addDebugInfo()
2860 */
2862 LLVMMetadataRef GVE);
2863
2864/**
2865 * Retrieves an array of metadata entries representing the metadata attached to
2866 * this value. The caller is responsible for freeing this array by calling
2867 * \c LLVMDisposeValueMetadataEntries.
2868 *
2869 * @see llvm::GlobalObject::getAllMetadata()
2870 */
2872LLVMGlobalCopyAllMetadata(LLVMValueRef Value, size_t *NumEntries);
2873
2874/**
2875 * Destroys value metadata entries.
2876 */
2877LLVM_C_ABI void
2879
2880/**
2881 * Returns the kind of a value metadata entry at a specific index.
2882 */
2883LLVM_C_ABI unsigned
2885 unsigned Index);
2886
2887/**
2888 * Returns the underlying metadata node of a value metadata entry at a
2889 * specific index.
2890 */
2892 LLVMValueMetadataEntry *Entries, unsigned Index);
2893
2894/**
2895 * @}
2896 */
2897
2898/**
2899 * @defgroup LLVMCoreValueConstantGlobalVariable Global Variables
2900 *
2901 * This group contains functions that operate on global variable values.
2902 *
2903 * @see llvm::GlobalVariable
2904 *
2905 * @{
2906 */
2908 const char *Name);
2910 LLVMTypeRef Ty,
2911 const char *Name,
2912 unsigned AddressSpace);
2915 const char *Name,
2916 size_t Length);
2924 LLVMValueRef ConstantVal);
2927 LLVMBool IsThreadLocal);
2930 LLVMBool IsConstant);
2936 LLVMBool IsExtInit);
2937
2938/**
2939 * @}
2940 */
2941
2942/**
2943 * @defgroup LLVMCoreValueConstantGlobalAlias Global Aliases
2944 *
2945 * This group contains function that operate on global alias values.
2946 *
2947 * @see llvm::GlobalAlias
2948 *
2949 * @{
2950 */
2951
2952/**
2953 * Add a GlobalAlias with the given value type, address space and aliasee.
2954 *
2955 * @see llvm::GlobalAlias::create()
2956 */
2958 unsigned AddrSpace, LLVMValueRef Aliasee,
2959 const char *Name);
2960
2961/**
2962 * Obtain a GlobalAlias value from a Module by its name.
2963 *
2964 * The returned value corresponds to a llvm::GlobalAlias value.
2965 *
2966 * @see llvm::Module::getNamedAlias()
2967 */
2969 const char *Name,
2970 size_t NameLen);
2971
2972/**
2973 * Obtain an iterator to the first GlobalAlias in a Module.
2974 *
2975 * @see llvm::Module::alias_begin()
2976 */
2978
2979/**
2980 * Obtain an iterator to the last GlobalAlias in a Module.
2981 *
2982 * @see llvm::Module::alias_end()
2983 */
2985
2986/**
2987 * Advance a GlobalAlias iterator to the next GlobalAlias.
2988 *
2989 * Returns NULL if the iterator was already at the end and there are no more
2990 * global aliases.
2991 */
2993
2994/**
2995 * Decrement a GlobalAlias iterator to the previous GlobalAlias.
2996 *
2997 * Returns NULL if the iterator was already at the beginning and there are
2998 * no previous global aliases.
2999 */
3001
3002/**
3003 * Retrieve the target value of an alias.
3004 */
3006
3007/**
3008 * Set the target value of an alias.
3009 */
3011
3012/**
3013 * @}
3014 */
3015
3016/**
3017 * @defgroup LLVMCCoreValueFunction Function values
3018 *
3019 * Functions in this group operate on LLVMValueRef instances that
3020 * correspond to llvm::Function instances.
3021 *
3022 * @see llvm::Function
3023 *
3024 * @{
3025 */
3026
3027/**
3028 * Remove a function from its containing module and deletes it.
3029 *
3030 * @see llvm::Function::eraseFromParent()
3031 */
3033
3034/**
3035 * Check whether the given function has a personality function.
3036 *
3037 * @see llvm::Function::hasPersonalityFn()
3038 */
3040
3041/**
3042 * Obtain the personality function attached to the function.
3043 *
3044 * @see llvm::Function::getPersonalityFn()
3045 */
3047
3048/**
3049 * Set the personality function attached to the function.
3050 *
3051 * @see llvm::Function::setPersonalityFn()
3052 */
3054 LLVMValueRef PersonalityFn);
3055
3056/**
3057 * Obtain the intrinsic ID number which matches the given function name.
3058 *
3059 * @see llvm::Intrinsic::lookupIntrinsicID()
3060 */
3061LLVM_C_ABI unsigned LLVMLookupIntrinsicID(const char *Name, size_t NameLen);
3062
3063/**
3064 * Obtain the ID number from a function instance.
3065 *
3066 * @see llvm::Function::getIntrinsicID()
3067 */
3069
3070/**
3071 * Get or insert the declaration of an intrinsic. For overloaded intrinsics,
3072 * parameter types must be provided to uniquely identify an overload.
3073 *
3074 * @see llvm::Intrinsic::getOrInsertDeclaration()
3075 */
3077 unsigned ID,
3078 LLVMTypeRef *ParamTypes,
3079 size_t ParamCount);
3080
3081/**
3082 * Retrieves the type of an intrinsic. For overloaded intrinsics, parameter
3083 * types must be provided to uniquely identify an overload.
3084 *
3085 * @see llvm::Intrinsic::getType()
3086 */
3088 LLVMTypeRef *ParamTypes,
3089 size_t ParamCount);
3090
3091/**
3092 * Retrieves the name of an intrinsic.
3093 *
3094 * @see llvm::Intrinsic::getName()
3095 */
3096LLVM_C_ABI const char *LLVMIntrinsicGetName(unsigned ID, size_t *NameLength);
3097
3098/** Deprecated: Use LLVMIntrinsicCopyOverloadedName2 instead. */
3100 LLVMTypeRef *ParamTypes,
3101 size_t ParamCount,
3102 size_t *NameLength);
3103
3104/**
3105 * Copies the name of an overloaded intrinsic identified by a given list of
3106 * parameter types.
3107 *
3108 * Unlike LLVMIntrinsicGetName, the caller is responsible for freeing the
3109 * returned string.
3110 *
3111 * This version also supports unnamed types.
3112 *
3113 * @see llvm::Intrinsic::getName()
3114 */
3116 unsigned ID,
3117 LLVMTypeRef *ParamTypes,
3118 size_t ParamCount,
3119 size_t *NameLength);
3120
3121/**
3122 * Obtain if the intrinsic identified by the given ID is overloaded.
3123 *
3124 * @see llvm::Intrinsic::isOverloaded()
3125 */
3127
3128/**
3129 * Obtain the calling function of a function.
3130 *
3131 * The returned value corresponds to the LLVMCallConv enumeration.
3132 *
3133 * @see llvm::Function::getCallingConv()
3134 */
3136
3137/**
3138 * Set the calling convention of a function.
3139 *
3140 * @see llvm::Function::setCallingConv()
3141 *
3142 * @param Fn Function to operate on
3143 * @param CC LLVMCallConv to set calling convention to
3144 */
3145LLVM_C_ABI void LLVMSetFunctionCallConv(LLVMValueRef Fn, unsigned CC);
3146
3147/**
3148 * Obtain the name of the garbage collector to use during code
3149 * generation.
3150 *
3151 * @see llvm::Function::getGC()
3152 */
3153LLVM_C_ABI const char *LLVMGetGC(LLVMValueRef Fn);
3154
3155/**
3156 * Define the garbage collector to use during code generation.
3157 *
3158 * @see llvm::Function::setGC()
3159 */
3160LLVM_C_ABI void LLVMSetGC(LLVMValueRef Fn, const char *Name);
3161
3162/**
3163 * Gets the prefix data associated with a function. Only valid on functions, and
3164 * only if LLVMHasPrefixData returns true.
3165 * See https://llvm.org/docs/LangRef.html#prefix-data
3166 */
3168
3169/**
3170 * Check if a given function has prefix data. Only valid on functions.
3171 * See https://llvm.org/docs/LangRef.html#prefix-data
3172 */
3174
3175/**
3176 * Sets the prefix data for the function. Only valid on functions.
3177 * See https://llvm.org/docs/LangRef.html#prefix-data
3178 */
3180
3181/**
3182 * Gets the prologue data associated with a function. Only valid on functions,
3183 * and only if LLVMHasPrologueData returns true.
3184 * See https://llvm.org/docs/LangRef.html#prologue-data
3185 */
3187
3188/**
3189 * Check if a given function has prologue data. Only valid on functions.
3190 * See https://llvm.org/docs/LangRef.html#prologue-data
3191 */
3193
3194/**
3195 * Sets the prologue data for the function. Only valid on functions.
3196 * See https://llvm.org/docs/LangRef.html#prologue-data
3197 */
3199
3200/**
3201 * Add an attribute to a function.
3202 *
3203 * @see llvm::Function::addAttribute()
3204 */
3208 LLVMAttributeIndex Idx);
3210 LLVMAttributeRef *Attrs);
3213 unsigned KindID);
3215 LLVMValueRef F, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
3218 unsigned KindID);
3221 const char *K, unsigned KLen);
3222
3223/**
3224 * Add a target-dependent attribute to a function
3225 * @see llvm::AttrBuilder::addAttribute()
3226 */
3228 const char *A,
3229 const char *V);
3230
3231/**
3232 * @defgroup LLVMCCoreValueFunctionParameters Function Parameters
3233 *
3234 * Functions in this group relate to arguments/parameters on functions.
3235 *
3236 * Functions in this group expect LLVMValueRef instances that correspond
3237 * to llvm::Function instances.
3238 *
3239 * @{
3240 */
3241
3242/**
3243 * Obtain the number of parameters in a function.
3244 *
3245 * @see llvm::Function::arg_size()
3246 */
3248
3249/**
3250 * Obtain the parameters in a function.
3251 *
3252 * The takes a pointer to a pre-allocated array of LLVMValueRef that is
3253 * at least LLVMCountParams() long. This array will be filled with
3254 * LLVMValueRef instances which correspond to the parameters the
3255 * function receives. Each LLVMValueRef corresponds to a llvm::Argument
3256 * instance.
3257 *
3258 * @see llvm::Function::arg_begin()
3259 */
3261
3262/**
3263 * Obtain the parameter at the specified index.
3264 *
3265 * Parameters are indexed from 0.
3266 *
3267 * @see llvm::Function::arg_begin()
3268 */
3270
3271/**
3272 * Obtain the function to which this argument belongs.
3273 *
3274 * Unlike other functions in this group, this one takes an LLVMValueRef
3275 * that corresponds to a llvm::Attribute.
3276 *
3277 * The returned LLVMValueRef is the llvm::Function to which this
3278 * argument belongs.
3279 */
3281
3282/**
3283 * Obtain the first parameter to a function.
3284 *
3285 * @see llvm::Function::arg_begin()
3286 */
3288
3289/**
3290 * Obtain the last parameter to a function.
3291 *
3292 * @see llvm::Function::arg_end()
3293 */
3295
3296/**
3297 * Obtain the next parameter to a function.
3298 *
3299 * This takes an LLVMValueRef obtained from LLVMGetFirstParam() (which is
3300 * actually a wrapped iterator) and obtains the next parameter from the
3301 * underlying iterator.
3302 */
3304
3305/**
3306 * Obtain the previous parameter to a function.
3307 *
3308 * This is the opposite of LLVMGetNextParam().
3309 */
3311
3312/**
3313 * Set the alignment for a function parameter.
3314 *
3315 * @see llvm::Argument::addAttr()
3316 * @see llvm::AttrBuilder::addAlignmentAttr()
3317 */
3318LLVM_C_ABI void LLVMSetParamAlignment(LLVMValueRef Arg, unsigned Align);
3319
3320/**
3321 * @}
3322 */
3323
3324/**
3325 * @defgroup LLVMCCoreValueGlobalIFunc IFuncs
3326 *
3327 * Functions in this group relate to indirect functions.
3328 *
3329 * Functions in this group expect LLVMValueRef instances that correspond
3330 * to llvm::GlobalIFunc instances.
3331 *
3332 * @{
3333 */
3334
3335/**
3336 * Add a global indirect function to a module under a specified name.
3337 *
3338 * @see llvm::GlobalIFunc::create()
3339 */
3341 size_t NameLen, LLVMTypeRef Ty,
3342 unsigned AddrSpace,
3343 LLVMValueRef Resolver);
3344
3345/**
3346 * Obtain a GlobalIFunc value from a Module by its name.
3347 *
3348 * The returned value corresponds to a llvm::GlobalIFunc value.
3349 *
3350 * @see llvm::Module::getNamedIFunc()
3351 */
3353 const char *Name,
3354 size_t NameLen);
3355
3356/**
3357 * Obtain an iterator to the first GlobalIFunc in a Module.
3358 *
3359 * @see llvm::Module::ifunc_begin()
3360 */
3362
3363/**
3364 * Obtain an iterator to the last GlobalIFunc in a Module.
3365 *
3366 * @see llvm::Module::ifunc_end()
3367 */
3369
3370/**
3371 * Advance a GlobalIFunc iterator to the next GlobalIFunc.
3372 *
3373 * Returns NULL if the iterator was already at the end and there are no more
3374 * global aliases.
3375 */
3377
3378/**
3379 * Decrement a GlobalIFunc iterator to the previous GlobalIFunc.
3380 *
3381 * Returns NULL if the iterator was already at the beginning and there are
3382 * no previous global aliases.
3383 */
3385
3386/**
3387 * Retrieves the resolver function associated with this indirect function, or
3388 * NULL if it doesn't not exist.
3389 *
3390 * @see llvm::GlobalIFunc::getResolver()
3391 */
3393
3394/**
3395 * Sets the resolver function associated with this indirect function.
3396 *
3397 * @see llvm::GlobalIFunc::setResolver()
3398 */
3400 LLVMValueRef Resolver);
3401
3402/**
3403 * Remove a global indirect function from its parent module and delete it.
3404 *
3405 * @see llvm::GlobalIFunc::eraseFromParent()
3406 */
3408
3409/**
3410 * Remove a global indirect function from its parent module.
3411 *
3412 * This unlinks the global indirect function from its containing module but
3413 * keeps it alive.
3414 *
3415 * @see llvm::GlobalIFunc::removeFromParent()
3416 */
3418
3419/**
3420 * @}
3421 */
3422
3423/**
3424 * @}
3425 */
3426
3427/**
3428 * @}
3429 */
3430
3431/**
3432 * @}
3433 */
3434
3435/**
3436 * @defgroup LLVMCCoreValueMetadata Metadata
3437 *
3438 * @{
3439 */
3440
3441/**
3442 * Create an MDString value from a given string value.
3443 *
3444 * The MDString value does not take ownership of the given string, it remains
3445 * the responsibility of the caller to free it.
3446 *
3447 * @see llvm::MDString::get()
3448 */
3450 const char *Str, size_t SLen);
3451
3452/**
3453 * Create an MDNode value with the given array of operands.
3454 *
3455 * @see llvm::MDNode::get()
3456 */
3458 LLVMMetadataRef *MDs,
3459 size_t Count);
3460
3461/**
3462 * Obtain a Metadata as a Value.
3463 */
3465 LLVMMetadataRef MD);
3466
3467/**
3468 * Obtain a Value as a Metadata.
3469 */
3471
3472/**
3473 * Obtain the underlying string from a MDString value.
3474 *
3475 * @param V Instance to obtain string from.
3476 * @param Length Memory address which will hold length of returned string.
3477 * @return String data in MDString.
3478 */
3479LLVM_C_ABI const char *LLVMGetMDString(LLVMValueRef V, unsigned *Length);
3480
3481/**
3482 * Obtain the number of operands from an MDNode value.
3483 *
3484 * @param V MDNode to get number of operands from.
3485 * @return Number of operands of the MDNode.
3486 */
3488
3489/**
3490 * Obtain the given MDNode's operands.
3491 *
3492 * The passed LLVMValueRef pointer should point to enough memory to hold all of
3493 * the operands of the given MDNode (see LLVMGetMDNodeNumOperands) as
3494 * LLVMValueRefs. This memory will be populated with the LLVMValueRefs of the
3495 * MDNode's operands.
3496 *
3497 * @param V MDNode to get the operands from.
3498 * @param Dest Destination array for operands.
3499 */
3501
3502/**
3503 * Replace an operand at a specific index in a llvm::MDNode value.
3504 *
3505 * @see llvm::MDNode::replaceOperandWith()
3506 */
3508 LLVMMetadataRef Replacement);
3509
3510/** Deprecated: Use LLVMMDStringInContext2 instead. */
3512 unsigned SLen);
3513/** Deprecated: Use LLVMMDStringInContext2 instead. */
3515 LLVMValueRef LLVMMDString(const char *Str, unsigned SLen),
3516 "Use of the global context is deprecated, use LLVMMDStringInContext2 "
3517 "instead");
3518/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3520 LLVMValueRef *Vals, unsigned Count);
3521/** Deprecated: Use LLVMMDNodeInContext2 instead. */
3523 LLVMValueRef LLVMMDNode(LLVMValueRef *Vals, unsigned Count),
3524 "Use of the global context is deprecated, use LLVMMDNodeInContext2 "
3525 "instead");
3526
3527/**
3528 * @}
3529 */
3530
3531/**
3532 * @defgroup LLVMCCoreOperandBundle Operand Bundles
3533 *
3534 * Functions in this group operate on LLVMOperandBundleRef instances that
3535 * correspond to llvm::OperandBundleDef instances.
3536 *
3537 * @see llvm::OperandBundleDef
3538 *
3539 * @{
3540 */
3541
3542/**
3543 * Create a new operand bundle.
3544 *
3545 * Every invocation should be paired with LLVMDisposeOperandBundle() or memory
3546 * will be leaked.
3547 *
3548 * @param Tag Tag name of the operand bundle
3549 * @param TagLen Length of Tag
3550 * @param Args Memory address of an array of bundle operands
3551 * @param NumArgs Length of Args
3552 */
3554 size_t TagLen,
3555 LLVMValueRef *Args,
3556 unsigned NumArgs);
3557
3558/**
3559 * Destroy an operand bundle.
3560 *
3561 * This must be called for every created operand bundle or memory will be
3562 * leaked.
3563 */
3565
3566/**
3567 * Obtain the tag of an operand bundle as a string.
3568 *
3569 * @param Bundle Operand bundle to obtain tag of.
3570 * @param Len Out parameter which holds the length of the returned string.
3571 * @return The tag name of Bundle.
3572 * @see OperandBundleDef::getTag()
3573 */
3575 size_t *Len);
3576
3577/**
3578 * Obtain the number of operands for an operand bundle.
3579 *
3580 * @param Bundle Operand bundle to obtain operand count of.
3581 * @return The number of operands.
3582 * @see OperandBundleDef::input_size()
3583 */
3585
3586/**
3587 * Obtain the operand for an operand bundle at the given index.
3588 *
3589 * @param Bundle Operand bundle to obtain operand of.
3590 * @param Index An operand index, must be less than
3591 * LLVMGetNumOperandBundleArgs().
3592 * @return The operand.
3593 */
3596
3597/**
3598 * @}
3599 */
3600
3601/**
3602 * @defgroup LLVMCCoreValueBasicBlock Basic Block
3603 *
3604 * A basic block represents a single entry single exit section of code.
3605 * Basic blocks contain a list of instructions which form the body of
3606 * the block.
3607 *
3608 * Basic blocks belong to functions. They have the type of label.
3609 *
3610 * Basic blocks are themselves values. However, the C API models them as
3611 * LLVMBasicBlockRef.
3612 *
3613 * @see llvm::BasicBlock
3614 *
3615 * @{
3616 */
3617
3618/**
3619 * Convert a basic block instance to a value type.
3620 */
3622
3623/**
3624 * Determine whether an LLVMValueRef is itself a basic block.
3625 */
3627
3628/**
3629 * Convert an LLVMValueRef to an LLVMBasicBlockRef instance.
3630 */
3632
3633/**
3634 * Obtain the string name of a basic block.
3635 */
3637
3638/**
3639 * Obtain the function to which a basic block belongs.
3640 *
3641 * @see llvm::BasicBlock::getParent()
3642 */
3644
3645/**
3646 * Obtain the terminator instruction for a basic block.
3647 *
3648 * If the basic block does not have a terminator (it is not well-formed
3649 * if it doesn't), then NULL is returned.
3650 *
3651 * The returned LLVMValueRef corresponds to an llvm::Instruction.
3652 *
3653 * @see llvm::BasicBlock::getTerminator()
3654 */
3656
3657/**
3658 * Obtain the number of basic blocks in a function.
3659 *
3660 * @param Fn Function value to operate on.
3661 */
3663
3664/**
3665 * Obtain all of the basic blocks in a function.
3666 *
3667 * This operates on a function value. The BasicBlocks parameter is a
3668 * pointer to a pre-allocated array of LLVMBasicBlockRef of at least
3669 * LLVMCountBasicBlocks() in length. This array is populated with
3670 * LLVMBasicBlockRef instances.
3671 */
3673 LLVMBasicBlockRef *BasicBlocks);
3674
3675/**
3676 * Obtain the first basic block in a function.
3677 *
3678 * The returned basic block can be used as an iterator. You will likely
3679 * eventually call into LLVMGetNextBasicBlock() with it.
3680 *
3681 * @see llvm::Function::begin()
3682 */
3684
3685/**
3686 * Obtain the last basic block in a function.
3687 *
3688 * @see llvm::Function::end()
3689 */
3691
3692/**
3693 * Advance a basic block iterator.
3694 */
3696
3697/**
3698 * Go backwards in a basic block iterator.
3699 */
3701
3702/**
3703 * Obtain the basic block that corresponds to the entry point of a
3704 * function.
3705 *
3706 * @see llvm::Function::getEntryBlock()
3707 */
3709
3710/**
3711 * Insert the given basic block after the insertion point of the given builder.
3712 *
3713 * The insertion point must be valid.
3714 *
3715 * @see llvm::Function::BasicBlockListType::insertAfter()
3716 */
3717LLVM_C_ABI void
3720
3721/**
3722 * Append the given basic block to the basic block list of the given function.
3723 *
3724 * @see llvm::Function::BasicBlockListType::push_back()
3725 */
3728
3729/**
3730 * Create a new basic block without inserting it into a function.
3731 *
3732 * @see llvm::BasicBlock::Create()
3733 */
3735 const char *Name);
3736
3737/**
3738 * Append a basic block to the end of a function.
3739 *
3740 * @see llvm::BasicBlock::Create()
3741 */
3743 LLVMValueRef Fn,
3744 const char *Name);
3745
3746/**
3747 * Append a basic block to the end of a function using the global
3748 * context.
3749 *
3750 * @see llvm::BasicBlock::Create()
3751 */
3754 "Use of the global context is deprecated, use "
3755 "LLVMAppendBasicBlockInContext instead");
3756
3757/**
3758 * Insert a basic block in a function before another basic block.
3759 *
3760 * The function to add to is determined by the function of the
3761 * passed basic block.
3762 *
3763 * @see llvm::BasicBlock::Create()
3764 */
3767 const char *Name);
3768
3769/**
3770 * Insert a basic block in a function using the global context.
3771 *
3772 * @see llvm::BasicBlock::Create()
3773 */
3776 const char *Name),
3777 "Use of the global context is deprecated, use "
3778 "LLVMInsertBasicBlockInContext instead");
3779
3780/**
3781 * Remove a basic block from a function and delete it.
3782 *
3783 * This deletes the basic block from its containing function and deletes
3784 * the basic block itself.
3785 *
3786 * @see llvm::BasicBlock::eraseFromParent()
3787 */
3789
3790/**
3791 * Remove a basic block from a function.
3792 *
3793 * This deletes the basic block from its containing function but keep
3794 * the basic block alive.
3795 *
3796 * @see llvm::BasicBlock::removeFromParent()
3797 */
3799
3800/**
3801 * Move a basic block to before another one.
3802 *
3803 * @see llvm::BasicBlock::moveBefore()
3804 */
3806 LLVMBasicBlockRef MovePos);
3807
3808/**
3809 * Move a basic block to after another one.
3810 *
3811 * @see llvm::BasicBlock::moveAfter()
3812 */
3814 LLVMBasicBlockRef MovePos);
3815
3816/**
3817 * Obtain the first instruction in a basic block.
3818 *
3819 * The returned LLVMValueRef corresponds to a llvm::Instruction
3820 * instance.
3821 */
3823
3824/**
3825 * Obtain the last instruction in a basic block.
3826 *
3827 * The returned LLVMValueRef corresponds to an LLVM:Instruction.
3828 */
3830
3831/**
3832 * @}
3833 */
3834
3835/**
3836 * @defgroup LLVMCCoreValueInstruction Instructions
3837 *
3838 * Functions in this group relate to the inspection and manipulation of
3839 * individual instructions.
3840 *
3841 * In the C++ API, an instruction is modeled by llvm::Instruction. This
3842 * class has a large number of descendents. llvm::Instruction is a
3843 * llvm::Value and in the C API, instructions are modeled by
3844 * LLVMValueRef.
3845 *
3846 * This group also contains sub-groups which operate on specific
3847 * llvm::Instruction types, e.g. llvm::CallInst.
3848 *
3849 * @{
3850 */
3851
3852/**
3853 * Determine whether an instruction has any metadata attached.
3854 */
3856
3857/**
3858 * Return metadata associated with an instruction value.
3859 */
3861
3862/**
3863 * Set metadata associated with an instruction value.
3864 */
3865LLVM_C_ABI void LLVMSetMetadata(LLVMValueRef Val, unsigned KindID,
3867
3868/**
3869 * Returns the metadata associated with an instruction value, but filters out
3870 * all the debug locations.
3871 *
3872 * @see llvm::Instruction::getAllMetadataOtherThanDebugLoc()
3873 */
3876 size_t *NumEntries);
3877
3878/**
3879 * Obtain the basic block to which an instruction belongs.
3880 *
3881 * @see llvm::Instruction::getParent()
3882 */
3884
3885/**
3886 * Obtain the instruction that occurs after the one specified.
3887 *
3888 * The next instruction will be from the same basic block.
3889 *
3890 * If this is the last instruction in a basic block, NULL will be
3891 * returned.
3892 */
3894
3895/**
3896 * Obtain the instruction that occurred before this one.
3897 *
3898 * If the instruction is the first instruction in a basic block, NULL
3899 * will be returned.
3900 */
3902
3903/**
3904 * Remove an instruction.
3905 *
3906 * The instruction specified is removed from its containing building
3907 * block but is kept alive.
3908 *
3909 * @see llvm::Instruction::removeFromParent()
3910 */
3912
3913/**
3914 * Remove and delete an instruction.
3915 *
3916 * The instruction specified is removed from its containing building
3917 * block and then deleted.
3918 *
3919 * @see llvm::Instruction::eraseFromParent()
3920 */
3922
3923/**
3924 * Delete an instruction.
3925 *
3926 * The instruction specified is deleted. It must have previously been
3927 * removed from its containing building block.
3928 *
3929 * @see llvm::Value::deleteValue()
3930 */
3932
3933/**
3934 * Obtain the code opcode for an individual instruction.
3935 *
3936 * @see llvm::Instruction::getOpCode()
3937 */
3939
3940/**
3941 * Obtain the predicate of an instruction.
3942 *
3943 * This is only valid for instructions that correspond to llvm::ICmpInst.
3944 *
3945 * @see llvm::ICmpInst::getPredicate()
3946 */
3948
3949/**
3950 * Get whether or not an icmp instruction has the samesign flag.
3951 *
3952 * This is only valid for instructions that correspond to llvm::ICmpInst.
3953 *
3954 * @see llvm::ICmpInst::hasSameSign()
3955 */
3957
3958/**
3959 * Set the samesign flag on an icmp instruction.
3960 *
3961 * This is only valid for instructions that correspond to llvm::ICmpInst.
3962 *
3963 * @see llvm::ICmpInst::setSameSign()
3964 */
3966
3967/**
3968 * Obtain the float predicate of an instruction.
3969 *
3970 * This is only valid for instructions that correspond to llvm::FCmpInst.
3971 *
3972 * @see llvm::FCmpInst::getPredicate()
3973 */
3975
3976/**
3977 * Create a copy of 'this' instruction that is identical in all ways
3978 * except the following:
3979 * * The instruction has no parent
3980 * * The instruction has no name
3981 *
3982 * @see llvm::Instruction::clone()
3983 */
3985
3986/**
3987 * Determine whether an instruction is a terminator. This routine is named to
3988 * be compatible with historical functions that did this by querying the
3989 * underlying C++ type.
3990 *
3991 * @see llvm::Instruction::isTerminator()
3992 */
3994
3995/**
3996 * Obtain the first debug record attached to an instruction.
3997 *
3998 * Use LLVMGetNextDbgRecord() and LLVMGetPreviousDbgRecord() to traverse the
3999 * sequence of DbgRecords.
4000 *
4001 * Return the first DbgRecord attached to Inst or NULL if there are none.
4002 *
4003 * @see llvm::Instruction::getDbgRecordRange()
4004 */
4006
4007/**
4008 * Obtain the last debug record attached to an instruction.
4009 *
4010 * Return the last DbgRecord attached to Inst or NULL if there are none.
4011 *
4012 * @see llvm::Instruction::getDbgRecordRange()
4013 */
4015
4016/**
4017 * Obtain the next DbgRecord in the sequence or NULL if there are no more.
4018 *
4019 * @see llvm::Instruction::getDbgRecordRange()
4020 */
4022
4023/**
4024 * Obtain the previous DbgRecord in the sequence or NULL if there are no more.
4025 *
4026 * @see llvm::Instruction::getDbgRecordRange()
4027 */
4030
4031/**
4032 * Get the debug location attached to the debug record.
4033 *
4034 * @see llvm::DbgRecord::getDebugLoc()
4035 */
4037
4039
4040/**
4041 * Get the value of the DbgVariableRecord.
4042 *
4043 * @see llvm::DbgVariableRecord::getValue()
4044 */
4046 unsigned OpIdx);
4047
4048/**
4049 * Get the debug info variable of the DbgVariableRecord.
4050 *
4051 * @see llvm::DbgVariableRecord::getVariable()
4052 */
4055
4056/**
4057 * Get the debug info expression of the DbgVariableRecord.
4058 *
4059 * @see llvm::DbgVariableRecord::getExpression()
4060 */
4063
4064/**
4065 * @defgroup LLVMCCoreValueInstructionCall Call Sites and Invocations
4066 *
4067 * Functions in this group apply to instructions that refer to call
4068 * sites and invocations. These correspond to C++ types in the
4069 * llvm::CallInst class tree.
4070 *
4071 * @{
4072 */
4073
4074/**
4075 * Obtain the argument count for a call instruction.
4076 *
4077 * This expects an LLVMValueRef that corresponds to a llvm::CallInst,
4078 * llvm::InvokeInst, or llvm:FuncletPadInst.
4079 *
4080 * @see llvm::CallInst::getNumArgOperands()
4081 * @see llvm::InvokeInst::getNumArgOperands()
4082 * @see llvm::FuncletPadInst::getNumArgOperands()
4083 */
4085
4086/**
4087 * Set the calling convention for a call instruction.
4088 *
4089 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4090 * llvm::InvokeInst.
4091 *
4092 * @see llvm::CallInst::setCallingConv()
4093 * @see llvm::InvokeInst::setCallingConv()
4094 */
4095LLVM_C_ABI void LLVMSetInstructionCallConv(LLVMValueRef Instr, unsigned CC);
4096
4097/**
4098 * Obtain the calling convention for a call instruction.
4099 *
4100 * This is the opposite of LLVMSetInstructionCallConv(). Reads its
4101 * usage.
4102 *
4103 * @see LLVMSetInstructionCallConv()
4104 */
4106
4109 unsigned Align);
4110
4114 LLVMAttributeIndex Idx);
4117 LLVMAttributeRef *Attrs);
4120 unsigned KindID);
4122 LLVMValueRef C, LLVMAttributeIndex Idx, const char *K, unsigned KLen);
4125 unsigned KindID);
4128 const char *K, unsigned KLen);
4129
4130/**
4131 * Obtain the function type called by this instruction.
4132 *
4133 * @see llvm::CallBase::getFunctionType()
4134 */
4136
4137/**
4138 * Obtain the pointer to the function invoked by this instruction.
4139 *
4140 * This expects an LLVMValueRef that corresponds to a llvm::CallInst or
4141 * llvm::InvokeInst.
4142 *
4143 * @see llvm::CallInst::getCalledOperand()
4144 * @see llvm::InvokeInst::getCalledOperand()
4145 */
4147
4148/**
4149 * Obtain the number of operand bundles attached to this instruction.
4150 *
4151 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4152 *
4153 * @see llvm::CallBase::getNumOperandBundles()
4154 */
4156
4157/**
4158 * Obtain the operand bundle attached to this instruction at the given index.
4159 * Use LLVMDisposeOperandBundle to free the operand bundle.
4160 *
4161 * This only works on llvm::CallInst and llvm::InvokeInst instructions.
4162 */
4164 unsigned Index);
4165
4166/**
4167 * Obtain whether a call instruction is a tail call.
4168 *
4169 * This only works on llvm::CallInst instructions.
4170 *
4171 * @see llvm::CallInst::isTailCall()
4172 */
4174
4175/**
4176 * Set whether a call instruction is a tail call.
4177 *
4178 * This only works on llvm::CallInst instructions.
4179 *
4180 * @see llvm::CallInst::setTailCall()
4181 */
4182LLVM_C_ABI void LLVMSetTailCall(LLVMValueRef CallInst, LLVMBool IsTailCall);
4183
4184/**
4185 * Obtain a tail call kind of the call instruction.
4186 *
4187 * @see llvm::CallInst::setTailCallKind()
4188 */
4190
4191/**
4192 * Set the call kind of the call instruction.
4193 *
4194 * @see llvm::CallInst::getTailCallKind()
4195 */
4197 LLVMTailCallKind kind);
4198
4199/**
4200 * Return the normal destination basic block.
4201 *
4202 * This only works on llvm::InvokeInst instructions.
4203 *
4204 * @see llvm::InvokeInst::getNormalDest()
4205 */
4207
4208/**
4209 * Return the unwind destination basic block.
4210 *
4211 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4212 * llvm::CatchSwitchInst instructions.
4213 *
4214 * @see llvm::InvokeInst::getUnwindDest()
4215 * @see llvm::CleanupReturnInst::getUnwindDest()
4216 * @see llvm::CatchSwitchInst::getUnwindDest()
4217 */
4219
4220/**
4221 * Set the normal destination basic block.
4222 *
4223 * This only works on llvm::InvokeInst instructions.
4224 *
4225 * @see llvm::InvokeInst::setNormalDest()
4226 */
4228
4229/**
4230 * Set the unwind destination basic block.
4231 *
4232 * Works on llvm::InvokeInst, llvm::CleanupReturnInst, and
4233 * llvm::CatchSwitchInst instructions.
4234 *
4235 * @see llvm::InvokeInst::setUnwindDest()
4236 * @see llvm::CleanupReturnInst::setUnwindDest()
4237 * @see llvm::CatchSwitchInst::setUnwindDest()
4238 */
4240
4241/**
4242 * Get the default destination of a CallBr instruction.
4243 *
4244 * @see llvm::CallBrInst::getDefaultDest()
4245 */
4247
4248/**
4249 * Get the number of indirect destinations of a CallBr instruction.
4250 *
4251 * @see llvm::CallBrInst::getNumIndirectDests()
4252
4253 */
4255
4256/**
4257 * Get the indirect destination of a CallBr instruction at the given index.
4258 *
4259 * @see llvm::CallBrInst::getIndirectDest()
4260 */
4262 unsigned Idx);
4263
4264/**
4265 * @}
4266 */
4267
4268/**
4269 * @defgroup LLVMCCoreValueInstructionTerminator Terminators
4270 *
4271 * Functions in this group only apply to instructions for which
4272 * LLVMIsATerminatorInst returns true.
4273 *
4274 * @{
4275 */
4276
4277/**
4278 * Return the number of successors that this terminator has.
4279 *
4280 * @see llvm::Instruction::getNumSuccessors
4281 */
4283
4284/**
4285 * Return the specified successor.
4286 *
4287 * @see llvm::Instruction::getSuccessor
4288 */
4290
4291/**
4292 * Update the specified successor to point at the provided block.
4293 *
4294 * @see llvm::Instruction::setSuccessor
4295 */
4296LLVM_C_ABI void LLVMSetSuccessor(LLVMValueRef Term, unsigned i,
4298
4299/**
4300 * Return if a branch is conditional.
4301 *
4302 * This only works on llvm::BranchInst instructions.
4303 *
4304 * @see llvm::BranchInst::isConditional
4305 */
4307
4308/**
4309 * Return the condition of a branch instruction.
4310 *
4311 * This only works on llvm::BranchInst instructions.
4312 *
4313 * @see llvm::BranchInst::getCondition
4314 */
4316
4317/**
4318 * Set the condition of a branch instruction.
4319 *
4320 * This only works on llvm::BranchInst instructions.
4321 *
4322 * @see llvm::BranchInst::setCondition
4323 */
4325
4326/**
4327 * Obtain the default destination basic block of a switch instruction.
4328 *
4329 * This only works on llvm::SwitchInst instructions.
4330 *
4331 * @see llvm::SwitchInst::getDefaultDest()
4332 */
4334
4335/**
4336 * Obtain the case value for a successor of a switch instruction. i corresponds
4337 * to the successor index. The first successor is the default destination, so i
4338 * must be greater than zero.
4339 *
4340 * This only works on llvm::SwitchInst instructions.
4341 *
4342 * @see llvm::SwitchInst::CaseHandle::getCaseValue()
4343 */
4345 unsigned i);
4346
4347/**
4348 * Set the case value for a successor of a switch instruction. i corresponds to
4349 * the successor index. The first successor is the default destination, so i
4350 * must be greater than zero.
4351 *
4352 * This only works on llvm::SwitchInst instructions.
4353 *
4354 * @see llvm::SwitchInst::CaseHandle::setValue()
4355 */
4356LLVM_C_ABI void LLVMSetSwitchCaseValue(LLVMValueRef SwitchInstr, unsigned i,
4357 LLVMValueRef CaseValue);
4358
4359/**
4360 * @}
4361 */
4362
4363/**
4364 * @defgroup LLVMCCoreValueInstructionAlloca Allocas
4365 *
4366 * Functions in this group only apply to instructions that map to
4367 * llvm::AllocaInst instances.
4368 *
4369 * @{
4370 */
4371
4372/**
4373 * Obtain the type that is being allocated by the alloca instruction.
4374 */
4376
4377/**
4378 * @}
4379 */
4380
4381/**
4382 * @defgroup LLVMCCoreValueInstructionGetElementPointer GEPs
4383 *
4384 * Functions in this group only apply to instructions that map to
4385 * llvm::GetElementPtrInst instances.
4386 *
4387 * @{
4388 */
4389
4390/**
4391 * Check whether the given GEP operator is inbounds.
4392 */
4394
4395/**
4396 * Set the given GEP instruction to be inbounds or not.
4397 */
4399
4400/**
4401 * Get the source element type of the given GEP operator.
4402 */
4404
4405/**
4406 * Get the no-wrap related flags for the given GEP instruction.
4407 *
4408 * @see llvm::GetElementPtrInst::getNoWrapFlags
4409 */
4411
4412/**
4413 * Set the no-wrap related flags for the given GEP instruction.
4414 *
4415 * @see llvm::GetElementPtrInst::setNoWrapFlags
4416 */
4418 LLVMGEPNoWrapFlags NoWrapFlags);
4419
4420/**
4421 * @}
4422 */
4423
4424/**
4425 * @defgroup LLVMCCoreValueInstructionPHINode PHI Nodes
4426 *
4427 * Functions in this group only apply to instructions that map to
4428 * llvm::PHINode instances.
4429 *
4430 * @{
4431 */
4432
4433/**
4434 * Add an incoming value to the end of a PHI list.
4435 */
4437 LLVMValueRef *IncomingValues,
4438 LLVMBasicBlockRef *IncomingBlocks,
4439 unsigned Count);
4440
4441/**
4442 * Obtain the number of incoming basic blocks to a PHI node.
4443 */
4444LLVM_C_ABI unsigned LLVMCountIncoming(LLVMValueRef PhiNode);
4445
4446/**
4447 * Obtain an incoming value to a PHI node as an LLVMValueRef.
4448 */
4450 unsigned Index);
4451
4452/**
4453 * Obtain an incoming value to a PHI node as an LLVMBasicBlockRef.
4454 */
4456 unsigned Index);
4457
4458/**
4459 * @}
4460 */
4461
4462/**
4463 * @defgroup LLVMCCoreValueInstructionExtractValue ExtractValue
4464 * @defgroup LLVMCCoreValueInstructionInsertValue InsertValue
4465 *
4466 * Functions in this group only apply to instructions that map to
4467 * llvm::ExtractValue and llvm::InsertValue instances.
4468 *
4469 * @{
4470 */
4471
4472/**
4473 * Obtain the number of indices.
4474 * NB: This also works on GEP operators.
4475 */
4477
4478/**
4479 * Obtain the indices as an array.
4480 */
4481LLVM_C_ABI const unsigned *LLVMGetIndices(LLVMValueRef Inst);
4482
4483/**
4484 * @}
4485 */
4486
4487/**
4488 * @}
4489 */
4490
4491/**
4492 * @}
4493 */
4494
4495/**
4496 * @defgroup LLVMCCoreInstructionBuilder Instruction Builders
4497 *
4498 * An instruction builder represents a point within a basic block and is
4499 * the exclusive means of building instructions using the C interface.
4500 *
4501 * @{
4502 */
4503
4507 "Use of the global context is deprecated, use "
4508 "LLVMCreateBuilderInContext instead");
4509/**
4510 * Set the builder position before Instr but after any attached debug records,
4511 * or if Instr is null set the position to the end of Block.
4512 */
4514 LLVMBasicBlockRef Block,
4515 LLVMValueRef Instr);
4516/**
4517 * Set the builder position before Instr and any attached debug records,
4518 * or if Instr is null set the position to the end of Block.
4519 */
4521 LLVMBasicBlockRef Block,
4522 LLVMValueRef Inst);
4523/**
4524 * Set the builder position before Instr but after any attached debug records.
4525 */
4527 LLVMValueRef Instr);
4528/**
4529 * Set the builder position before Instr and any attached debug records.
4530 */
4531LLVM_C_ABI void
4533 LLVMValueRef Instr);
4535 LLVMBasicBlockRef Block);
4539 LLVMValueRef Instr);
4541 LLVMValueRef Instr,
4542 const char *Name);
4544
4545/* Metadata */
4546
4547/**
4548 * Get location information used by debugging information.
4549 *
4550 * @see llvm::IRBuilder::getCurrentDebugLocation()
4551 */
4553
4554/**
4555 * Set location information used by debugging information.
4556 *
4557 * To clear the location metadata of the given instruction, pass NULL to \p Loc.
4558 *
4559 * @see llvm::IRBuilder::SetCurrentDebugLocation()
4560 */
4562 LLVMMetadataRef Loc);
4563
4564/**
4565 * Attempts to set the debug location for the given instruction using the
4566 * current debug location for the given builder. If the builder has no current
4567 * debug location, this function is a no-op.
4568 *
4569 * @deprecated LLVMSetInstDebugLocation is deprecated in favor of the more general
4570 * LLVMAddMetadataToInst.
4571 *
4572 * @see llvm::IRBuilder::SetInstDebugLocation()
4573 */
4575 LLVMValueRef Inst);
4576
4577/**
4578 * Adds the metadata registered with the given builder to the given instruction.
4579 *
4580 * @see llvm::IRBuilder::AddMetadataToInst()
4581 */
4583 LLVMValueRef Inst);
4584
4585/**
4586 * Get the dafult floating-point math metadata for a given builder.
4587 *
4588 * @see llvm::IRBuilder::getDefaultFPMathTag()
4589 */
4592
4593/**
4594 * Set the default floating-point math metadata for the given builder.
4595 *
4596 * To clear the metadata, pass NULL to \p FPMathTag.
4597 *
4598 * @see llvm::IRBuilder::setDefaultFPMathTag()
4599 */
4601 LLVMMetadataRef FPMathTag);
4602
4603/**
4604 * Obtain the context to which this builder is associated.
4605 *
4606 * @see llvm::IRBuilder::getContext()
4607 */
4609
4610/**
4611 * Deprecated: Passing the NULL location will crash.
4612 * Use LLVMGetCurrentDebugLocation2 instead.
4613 */
4615 LLVMValueRef L);
4616/**
4617 * Deprecated: Returning the NULL location will crash.
4618 * Use LLVMGetCurrentDebugLocation2 instead.
4619 */
4621
4622/* Terminators */
4626 LLVMValueRef *RetVals,
4627 unsigned N);
4630 LLVMBasicBlockRef Then,
4631 LLVMBasicBlockRef Else);
4633 LLVMBasicBlockRef Else,
4634 unsigned NumCases);
4636 unsigned NumDests);
4639 LLVMBasicBlockRef DefaultDest, LLVMBasicBlockRef *IndirectDests,
4640 unsigned NumIndirectDests, LLVMValueRef *Args, unsigned NumArgs,
4641 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4643 LLVMValueRef Fn, LLVMValueRef *Args,
4644 unsigned NumArgs,
4645 LLVMBasicBlockRef Then,
4646 LLVMBasicBlockRef Catch,
4647 const char *Name);
4650 unsigned NumArgs, LLVMBasicBlockRef Then, LLVMBasicBlockRef Catch,
4651 LLVMOperandBundleRef *Bundles, unsigned NumBundles, const char *Name);
4653
4654/* Exception Handling */
4657 LLVMValueRef PersFn,
4658 unsigned NumClauses,
4659 const char *Name);
4661 LLVMValueRef CatchPad,
4664 LLVMValueRef CatchPad,
4667 LLVMValueRef ParentPad,
4668 LLVMValueRef *Args, unsigned NumArgs,
4669 const char *Name);
4671 LLVMValueRef ParentPad,
4672 LLVMValueRef *Args,
4673 unsigned NumArgs, const char *Name);
4675 LLVMValueRef ParentPad,
4676 LLVMBasicBlockRef UnwindBB,
4677 unsigned NumHandlers,
4678 const char *Name);
4679
4680/* Add a case to the switch instruction */
4682 LLVMBasicBlockRef Dest);
4683
4684/* Add a destination to the indirectbr instruction */
4686 LLVMBasicBlockRef Dest);
4687
4688/* Get the number of clauses on the landingpad instruction */
4689LLVM_C_ABI unsigned LLVMGetNumClauses(LLVMValueRef LandingPad);
4690
4691/* Get the value of the clause at index Idx on the landingpad instruction */
4692LLVM_C_ABI LLVMValueRef LLVMGetClause(LLVMValueRef LandingPad, unsigned Idx);
4693
4694/* Add a catch or filter clause to the landingpad instruction */
4695LLVM_C_ABI void LLVMAddClause(LLVMValueRef LandingPad, LLVMValueRef ClauseVal);
4696
4697/* Get the 'cleanup' flag in the landingpad instruction */
4699
4700/* Set the 'cleanup' flag in the landingpad instruction */
4701LLVM_C_ABI void LLVMSetCleanup(LLVMValueRef LandingPad, LLVMBool Val);
4702
4703/* Add a destination to the catchswitch instruction */
4704LLVM_C_ABI void LLVMAddHandler(LLVMValueRef CatchSwitch,
4705 LLVMBasicBlockRef Dest);
4706
4707/* Get the number of handlers on the catchswitch instruction */
4708LLVM_C_ABI unsigned LLVMGetNumHandlers(LLVMValueRef CatchSwitch);
4709
4710/**
4711 * Obtain the basic blocks acting as handlers for a catchswitch instruction.
4712 *
4713 * The Handlers parameter should point to a pre-allocated array of
4714 * LLVMBasicBlockRefs at least LLVMGetNumHandlers() large. On return, the
4715 * first LLVMGetNumHandlers() entries in the array will be populated
4716 * with LLVMBasicBlockRef instances.
4717 *
4718 * @param CatchSwitch The catchswitch instruction to operate on.
4719 * @param Handlers Memory address of an array to be filled with basic blocks.
4720 */
4721LLVM_C_ABI void LLVMGetHandlers(LLVMValueRef CatchSwitch,
4722 LLVMBasicBlockRef *Handlers);
4723
4724/* Funclets */
4725
4726/* Get the number of funcletpad arguments. */
4728
4729/* Set a funcletpad argument at the given index. */
4730LLVM_C_ABI void LLVMSetArgOperand(LLVMValueRef Funclet, unsigned i,
4731 LLVMValueRef value);
4732
4733/**
4734 * Get the parent catchswitch instruction of a catchpad instruction.
4735 *
4736 * This only works on llvm::CatchPadInst instructions.
4737 *
4738 * @see llvm::CatchPadInst::getCatchSwitch()
4739 */
4741
4742/**
4743 * Set the parent catchswitch instruction of a catchpad instruction.
4744 *
4745 * This only works on llvm::CatchPadInst instructions.
4746 *
4747 * @see llvm::CatchPadInst::setCatchSwitch()
4748 */
4750 LLVMValueRef CatchSwitch);
4751
4752/* Arithmetic */
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);
4804 LLVMValueRef RHS, const char *Name);
4807 const char *Name);
4809 const char *Name);
4811 const char *Name);
4814 const char *Name),
4815 "Use LLVMBuildNeg + LLVMSetNUW instead.");
4817 const char *Name);
4819 const char *Name);
4820
4822LLVM_C_ABI void LLVMSetNUW(LLVMValueRef ArithInst, LLVMBool HasNUW);
4824LLVM_C_ABI void LLVMSetNSW(LLVMValueRef ArithInst, LLVMBool HasNSW);
4826LLVM_C_ABI void LLVMSetExact(LLVMValueRef DivOrShrInst, LLVMBool IsExact);
4827
4828/**
4829 * Gets if the instruction has the non-negative flag set.
4830 * Only valid for zext instructions.
4831 */
4833/**
4834 * Sets the non-negative flag for the instruction.
4835 * Only valid for zext instructions.
4836 */
4837LLVM_C_ABI void LLVMSetNNeg(LLVMValueRef NonNegInst, LLVMBool IsNonNeg);
4838
4839/**
4840 * Get the flags for which fast-math-style optimizations are allowed for this
4841 * value.
4842 *
4843 * Only valid on floating point instructions.
4844 * @see LLVMCanValueUseFastMathFlags
4845 */
4847
4848/**
4849 * Sets the flags for which fast-math-style optimizations are allowed for this
4850 * value.
4851 *
4852 * Only valid on floating point instructions.
4853 * @see LLVMCanValueUseFastMathFlags
4854 */
4856 LLVMFastMathFlags FMF);
4857
4858/**
4859 * Check if a given value can potentially have fast math flags.
4860 *
4861 * Will return true for floating point arithmetic instructions, and for select,
4862 * phi, and call instructions whose type is a floating point type, or a vector
4863 * or array thereof. See https://llvm.org/docs/LangRef.html#fast-math-flags
4864 */
4866
4867/**
4868 * Gets whether the instruction has the disjoint flag set.
4869 * Only valid for or instructions.
4870 */
4872/**
4873 * Sets the disjoint flag for the instruction.
4874 * Only valid for or instructions.
4875 */
4876LLVM_C_ABI void LLVMSetIsDisjoint(LLVMValueRef Inst, LLVMBool IsDisjoint);
4877
4878/* Memory */
4880 const char *Name);
4882 LLVMValueRef Val,
4883 const char *Name);
4884
4885/**
4886 * Creates and inserts a memset to the specified pointer and the
4887 * specified value.
4888 *
4889 * @see llvm::IRRBuilder::CreateMemSet()
4890 */
4892 LLVMValueRef Val, LLVMValueRef Len,
4893 unsigned Align);
4894/**
4895 * Creates and inserts a memcpy between the specified pointers.
4896 *
4897 * @see llvm::IRRBuilder::CreateMemCpy()
4898 */
4900 unsigned DstAlign, LLVMValueRef Src,
4901 unsigned SrcAlign, LLVMValueRef Size);
4902/**
4903 * Creates and inserts a memmove between the specified pointers.
4904 *
4905 * @see llvm::IRRBuilder::CreateMemMove()
4906 */
4908 unsigned DstAlign, LLVMValueRef Src,
4909 unsigned SrcAlign, LLVMValueRef Size);
4910
4912 const char *Name);
4914 LLVMValueRef Val,
4915 const char *Name);
4918 LLVMValueRef PointerVal,
4919 const char *Name);
4921 LLVMValueRef Ptr);
4923 LLVMValueRef Pointer,
4924 LLVMValueRef *Indices,
4925 unsigned NumIndices, const char *Name);
4927 LLVMValueRef Pointer,
4928 LLVMValueRef *Indices,
4929 unsigned NumIndices,
4930 const char *Name);
4931/**
4932 * Creates a GetElementPtr instruction. Similar to LLVMBuildGEP2, but allows
4933 * specifying the no-wrap flags.
4934 *
4935 * @see llvm::IRBuilder::CreateGEP()
4936 */
4939 LLVMValueRef *Indices, unsigned NumIndices, const char *Name,
4940 LLVMGEPNoWrapFlags NoWrapFlags);
4942 LLVMValueRef Pointer, unsigned Idx,
4943 const char *Name);
4945 const char *Name);
4946/**
4947 * Deprecated: Use LLVMBuildGlobalString instead, which has identical behavior.
4948 */
4950 const char *Str,
4951 const char *Name);
4953LLVM_C_ABI void LLVMSetVolatile(LLVMValueRef MemoryAccessInst,
4954 LLVMBool IsVolatile);
4956LLVM_C_ABI void LLVMSetWeak(LLVMValueRef CmpXchgInst, LLVMBool IsWeak);
4958LLVM_C_ABI void LLVMSetOrdering(LLVMValueRef MemoryAccessInst,
4959 LLVMAtomicOrdering Ordering);
4962 LLVMAtomicRMWBinOp BinOp);
4963
4964/* Casts */
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, const char *Name);
4990 LLVMTypeRef DestTy,
4991 const char *Name);
4993 LLVMTypeRef DestTy,
4994 const char *Name);
4996 LLVMTypeRef DestTy,
4997 const char *Name);
4999 LLVMValueRef Val,
5000 LLVMTypeRef DestTy,
5001 const char *Name);
5003 LLVMValueRef Val, LLVMTypeRef DestTy,
5004 const char *Name);
5006 LLVMTypeRef DestTy,
5007 const char *Name);
5009 LLVMTypeRef DestTy, LLVMBool IsSigned,
5010 const char *Name);
5012 LLVMTypeRef DestTy, const char *Name);
5013
5014/** Deprecated: This cast is always signed. Use LLVMBuildIntCast2 instead. */
5016 LLVMValueRef Val, /*Signed cast!*/
5017 LLVMTypeRef DestTy, const char *Name);
5018
5020 LLVMTypeRef DestTy,
5021 LLVMBool DestIsSigned);
5022
5023/* Comparisons */
5026 const char *Name);
5029 const char *Name);
5030
5031/* Miscellaneous instructions */
5033 const char *Name);
5035 LLVMValueRef Fn, LLVMValueRef *Args,
5036 unsigned NumArgs, const char *Name);
5039 unsigned NumArgs, LLVMOperandBundleRef *Bundles, unsigned NumBundles,
5040 const char *Name);
5042 LLVMValueRef Then, LLVMValueRef Else,
5043 const char *Name);
5045 LLVMTypeRef Ty, const char *Name);
5047 LLVMValueRef VecVal,
5048 LLVMValueRef Index,
5049 const char *Name);
5051 LLVMValueRef VecVal,
5052 LLVMValueRef EltVal,
5053 LLVMValueRef Index,
5054 const char *Name);
5056 LLVMValueRef V2,
5057 LLVMValueRef Mask,
5058 const char *Name);
5060 LLVMValueRef AggVal,
5061 unsigned Index, const char *Name);
5063 LLVMValueRef AggVal,
5064 LLVMValueRef EltVal,
5065 unsigned Index, const char *Name);
5067 const char *Name);
5068
5070 const char *Name);
5072 const char *Name);
5075 const char *Name);
5077 LLVMAtomicOrdering ordering,
5078 LLVMBool singleThread, const char *Name);
5080 LLVMAtomicOrdering ordering,
5081 unsigned SSID,
5082 const char *Name);
5085 LLVMValueRef PTR, LLVMValueRef Val,
5086 LLVMAtomicOrdering ordering,
5087 LLVMBool singleThread);
5090 LLVMAtomicOrdering ordering, unsigned SSID);
5093 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5097 LLVMAtomicOrdering SuccessOrdering, LLVMAtomicOrdering FailureOrdering,
5098 unsigned SSID);
5099
5100/**
5101 * Get the number of elements in the mask of a ShuffleVector instruction.
5102 */
5103LLVM_C_ABI unsigned LLVMGetNumMaskElements(LLVMValueRef ShuffleVectorInst);
5104
5105/**
5106 * \returns a constant that specifies that the result of a \c ShuffleVectorInst
5107 * is undefined.
5108 */
5110
5111/**
5112 * Get the mask value at position Elt in the mask of a ShuffleVector
5113 * instruction.
5114 *
5115 * \Returns the result of \c LLVMGetUndefMaskElem() if the mask value is
5116 * poison at that position.
5117 */
5118LLVM_C_ABI int LLVMGetMaskValue(LLVMValueRef ShuffleVectorInst, unsigned Elt);
5119
5123
5124/**
5125 * Returns whether an instruction is an atomic instruction, e.g., atomicrmw,
5126 * cmpxchg, fence, or loads and stores with atomic ordering.
5127 */
5129
5130/**
5131 * Returns the synchronization scope ID of an atomic instruction.
5132 */
5134
5135/**
5136 * Sets the synchronization scope ID of an atomic instruction.
5137 */
5139 unsigned SSID);
5140
5144 LLVMAtomicOrdering Ordering);
5148 LLVMAtomicOrdering Ordering);
5149
5150/**
5151 * @}
5152 */
5153
5154/**
5155 * @defgroup LLVMCCoreModuleProvider Module Providers
5156 *
5157 * @{
5158 */
5159
5160/**
5161 * Changes the type of M so it can be passed to FunctionPassManagers and the
5162 * JIT. They take ModuleProviders for historical reasons.
5163 */
5166
5167/**
5168 * Destroys the module M.
5169 */
5171
5172/**
5173 * @}
5174 */
5175
5176/**
5177 * @defgroup LLVMCCoreMemoryBuffers Memory Buffers
5178 *
5179 * @{
5180 */
5181
5183 const char *Path, LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5185 LLVMMemoryBufferRef *OutMemBuf, char **OutMessage);
5187 const char *InputData, size_t InputDataLength, const char *BufferName,
5188 LLVMBool RequiresNullTerminator);
5190 const char *InputData, size_t InputDataLength, const char *BufferName);
5194
5195/**
5196 * @}
5197 */
5198
5199/**
5200 * @defgroup LLVMCCorePassManagers Pass Managers
5201 * @ingroup LLVMCCore
5202 *
5203 * @{
5204 */
5205
5206/** Constructs a new whole-module pass pipeline. This type of pipeline is
5207 suitable for link-time optimization and whole-module transformations.
5208 @see llvm::PassManager::PassManager */
5210
5211/** Constructs a new function-by-function pass pipeline over the module
5212 provider. It does not take ownership of the module provider. This type of
5213 pipeline is suitable for code generation and JIT compilation tasks.
5214 @see llvm::FunctionPassManager::FunctionPassManager */
5217
5218/** Deprecated: Use LLVMCreateFunctionPassManagerForModule instead. */
5221
5222/** Initializes, executes on the provided module, and finalizes all of the
5223 passes scheduled in the pass manager. Returns 1 if any of the passes
5224 modified the module, 0 otherwise.
5225 @see llvm::PassManager::run(Module&) */
5227
5228/** Initializes all of the function passes scheduled in the function pass
5229 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5230 @see llvm::FunctionPassManager::doInitialization */
5232
5233/** Executes all of the function passes scheduled in the function pass manager
5234 on the provided function. Returns 1 if any of the passes modified the
5235 function, false otherwise.
5236 @see llvm::FunctionPassManager::run(Function&) */
5238 LLVMValueRef F);
5239
5240/** Finalizes all of the function passes scheduled in the function pass
5241 manager. Returns 1 if any of the passes modified the module, 0 otherwise.
5242 @see llvm::FunctionPassManager::doFinalization */
5244
5245/** Frees the memory of a pass pipeline. For function pipelines, does not free
5246 the module provider.
5247 @see llvm::PassManagerBase::~PassManagerBase. */
5249
5250/**
5251 * @}
5252 */
5253
5254/**
5255 * @defgroup LLVMCCoreThreading Threading
5256 *
5257 * Handle the structures needed to make LLVM safe for multithreading.
5258 *
5259 * @{
5260 */
5261
5262/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5263 time define LLVM_ENABLE_THREADS. This function always returns
5264 LLVMIsMultithreaded(). */
5266
5267/** Deprecated: Multi-threading can only be enabled/disabled with the compile
5268 time define LLVM_ENABLE_THREADS. */
5270
5271/** Check whether LLVM is executing in thread-safe mode or not.
5272 @see llvm::llvm_is_multithreaded */
5274
5275/**
5276 * @}
5277 */
5278
5279/**
5280 * @}
5281 */
5282
5283/**
5284 * @}
5285 */
5286
5288
5289#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:740
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:581
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:580
LLVM_C_ABI LLVMDiagnosticSeverity LLVMGetDiagInfoSeverity(LLVMDiagnosticInfoRef DI)
Return an enum LLVMDiagnosticSeverity.
Definition Core.cpp:272
@ LLVMDenormalModeKindPreserveSign
Definition Core.h:742
@ LLVMDenormalModeKindDynamic
Definition Core.h:744
@ LLVMDenormalModeKindPositiveZero
Definition Core.h:743
@ LLVMDenormalModeKindIEEE
Definition Core.h:741
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:492
LLVMLinkage
Definition Core.h:176
LLVMOpcode
External users depend on the following values being stable.
Definition Core.h:61
LLVMRealPredicate
Definition Core.h:309
LLVMTypeKind
Definition Core.h:152
LLVMDLLStorageClass
Definition Core.h:211
LLVMValueKind
Definition Core.h:261
unsigned LLVMAttributeIndex
Definition Core.h:483
LLVMCallConv
Definition Core.h:217
LLVMDbgRecordKind
Definition Core.h:536
LLVMIntPredicate
Definition Core.h:296
unsigned LLVMFastMathFlags
Flags to indicate what fast-math-style optimizations are allowed on operations.
Definition Core.h:520
LLVMUnnamedAddr
Definition Core.h:205
LLVMModuleFlagBehavior
Definition Core.h:420
LLVMDiagnosticSeverity
Definition Core.h:408
LLVMVisibility
Definition Core.h:199
LLVMAtomicRMWBinOp
Definition Core.h:363
LLVMThreadLocalMode
Definition Core.h:328
unsigned LLVMGEPNoWrapFlags
Flags that constrain the allowed wrap semantics of a getelementptr instruction.
Definition Core.h:534
LLVMAtomicOrdering
Definition Core.h:336
LLVMInlineAsmDialect
Definition Core.h:415
@ LLVMTailCallKindNoTail
Definition Core.h:496
@ LLVMTailCallKindNone
Definition Core.h:493
@ LLVMTailCallKindTail
Definition Core.h:494
@ LLVMTailCallKindMustTail
Definition Core.h:495
@ LLVMDLLImportLinkage
Obsolete.
Definition Core.h:190
@ LLVMInternalLinkage
Rename collisions when linking (static functions)
Definition Core.h:187
@ LLVMLinkOnceAnyLinkage
Keep one copy of function when linking (inline)
Definition Core.h:179
@ LLVMExternalLinkage
Externally visible function.
Definition Core.h:177
@ LLVMExternalWeakLinkage
ExternalWeak linkage description.
Definition Core.h:192
@ LLVMLinkOnceODRLinkage
Same, but only replaced by something equivalent.
Definition Core.h:180
@ LLVMPrivateLinkage
Like Internal, but omit from symbol table.
Definition Core.h:189
@ LLVMDLLExportLinkage
Obsolete.
Definition Core.h:191
@ LLVMLinkerPrivateLinkage
Like Private, but linker removes.
Definition Core.h:195
@ LLVMWeakODRLinkage
Same, but only replaced by something equivalent.
Definition Core.h:184
@ LLVMGhostLinkage
Obsolete.
Definition Core.h:193
@ LLVMWeakAnyLinkage
Keep one copy of function when linking (weak)
Definition Core.h:183
@ LLVMAppendingLinkage
Special purpose, only applies to global arrays.
Definition Core.h:186
@ LLVMCommonLinkage
Tentative definitions.
Definition Core.h:194
@ LLVMLinkOnceODRAutoHideLinkage
Obsolete.
Definition Core.h:182
@ LLVMLinkerPrivateWeakLinkage
Like LinkerPrivate, but is weak.
Definition Core.h:196
@ LLVMAvailableExternallyLinkage
Definition Core.h:178
@ LLVMAttributeReturnIndex
Definition Core.h:476
@ LLVMAttributeFunctionIndex
Definition Core.h:480
@ LLVMFastMathAllowReassoc
Definition Core.h:500
@ LLVMFastMathNoSignedZeros
Definition Core.h:503
@ LLVMFastMathApproxFunc
Definition Core.h:506
@ LLVMFastMathNoInfs
Definition Core.h:502
@ LLVMFastMathNoNaNs
Definition Core.h:501
@ LLVMFastMathAll
Definition Core.h:508
@ LLVMFastMathNone
Definition Core.h:507
@ LLVMFastMathAllowContract
Definition Core.h:505
@ LLVMFastMathAllowReciprocal
Definition Core.h:504
@ LLVMSelect
Definition Core.h:126
@ LLVMSRem
Definition Core.h:88
@ LLVMOr
Definition Core.h:96
@ LLVMCallBr
Definition Core.h:72
@ LLVMUIToFP
Definition Core.h:111
@ LLVMIntToPtr
Definition Core.h:117
@ LLVMAtomicRMW
Definition Core.h:140
@ LLVMFMul
Definition Core.h:83
@ LLVMLoad
Definition Core.h:101
@ LLVMUncondBr
Definition Core.h:65
@ LLVMIndirectBr
Definition Core.h:68
@ LLVMUnreachable
Definition Core.h:71
@ LLVMCatchSwitch
Definition Core.h:149
@ LLVMCall
Definition Core.h:125
@ LLVMGetElementPtr
Definition Core.h:103
@ LLVMAdd
Definition Core.h:78
@ LLVMSub
Definition Core.h:80
@ LLVMExtractValue
Definition Core.h:133
@ LLVMUserOp1
Definition Core.h:127
@ LLVMICmp
Definition Core.h:122
@ LLVMFDiv
Definition Core.h:86
@ LLVMLShr
Definition Core.h:93
@ LLVMFPTrunc
Definition Core.h:113
@ LLVMResume
Definition Core.h:143
@ LLVMAddrSpaceCast
Definition Core.h:119
@ LLVMFNeg
Definition Core.h:75
@ LLVMRet
Definition Core.h:63
@ LLVMFPToSI
Definition Core.h:110
@ LLVMCatchRet
Definition Core.h:146
@ LLVMFreeze
Definition Core.h:135
@ LLVMFRem
Definition Core.h:89
@ LLVMSIToFP
Definition Core.h:112
@ LLVMPHI
Definition Core.h:124
@ LLVMPtrToAddr
Definition Core.h:116
@ LLVMCondBr
Definition Core.h:66
@ LLVMUDiv
Definition Core.h:84
@ LLVMInvoke
Definition Core.h:69
@ LLVMCleanupPad
Definition Core.h:148
@ LLVMSDiv
Definition Core.h:85
@ LLVMFence
Definition Core.h:138
@ LLVMAnd
Definition Core.h:95
@ LLVMFPToUI
Definition Core.h:109
@ LLVMLandingPad
Definition Core.h:144
@ LLVMURem
Definition Core.h:87
@ LLVMCleanupRet
Definition Core.h:145
@ LLVMTrunc
Definition Core.h:106
@ LLVMVAArg
Definition Core.h:129
@ LLVMShuffleVector
Definition Core.h:132
@ LLVMSExt
Definition Core.h:108
@ LLVMBitCast
Definition Core.h:118
@ LLVMUserOp2
Definition Core.h:128
@ LLVMMul
Definition Core.h:82
@ LLVMCatchPad
Definition Core.h:147
@ LLVMAShr
Definition Core.h:94
@ LLVMPtrToInt
Definition Core.h:115
@ LLVMInsertElement
Definition Core.h:131
@ LLVMFAdd
Definition Core.h:79
@ LLVMFSub
Definition Core.h:81
@ LLVMStore
Definition Core.h:102
@ LLVMZExt
Definition Core.h:107
@ LLVMShl
Definition Core.h:92
@ LLVMInsertValue
Definition Core.h:134
@ LLVMExtractElement
Definition Core.h:130
@ LLVMXor
Definition Core.h:97
@ LLVMFCmp
Definition Core.h:123
@ LLVMFPExt
Definition Core.h:114
@ LLVMAlloca
Definition Core.h:100
@ LLVMAtomicCmpXchg
Definition Core.h:139
@ LLVMSwitch
Definition Core.h:67
@ LLVMGEPFlagInBounds
Definition Core.h:523
@ LLVMGEPFlagNUSW
Definition Core.h:524
@ LLVMGEPFlagNUW
Definition Core.h:525
@ LLVMRealUNE
True if unordered or not equal.
Definition Core.h:324
@ LLVMRealUGT
True if unordered or greater than.
Definition Core.h:320
@ LLVMRealULE
True if unordered, less than, or equal.
Definition Core.h:323
@ LLVMRealOLE
True if ordered and less than or equal.
Definition Core.h:315
@ LLVMRealOGE
True if ordered and greater than or equal.
Definition Core.h:313
@ LLVMRealULT
True if unordered or less than.
Definition Core.h:322
@ LLVMRealPredicateFalse
Always false (always folded)
Definition Core.h:310
@ LLVMRealPredicateTrue
Always true (always folded)
Definition Core.h:325
@ LLVMRealUNO
True if unordered: isnan(X) | isnan(Y)
Definition Core.h:318
@ LLVMRealOEQ
True if ordered and equal.
Definition Core.h:311
@ LLVMRealOLT
True if ordered and less than.
Definition Core.h:314
@ LLVMRealUEQ
True if unordered or equal.
Definition Core.h:319
@ LLVMRealORD
True if ordered (no nans)
Definition Core.h:317
@ LLVMRealOGT
True if ordered and greater than.
Definition Core.h:312
@ LLVMRealUGE
True if unordered, greater than, or equal.
Definition Core.h:321
@ LLVMRealONE
True if ordered and operands are unequal.
Definition Core.h:316
@ LLVMHalfTypeKind
16 bit floating point type
Definition Core.h:154
@ LLVMFP128TypeKind
128 bit floating point type (112-bit mantissa)
Definition Core.h:158
@ LLVMIntegerTypeKind
Arbitrary bit width integers.
Definition Core.h:161
@ LLVMPointerTypeKind
Pointers.
Definition Core.h:165
@ LLVMX86_FP80TypeKind
80 bit floating point type (X87)
Definition Core.h:157
@ LLVMX86_AMXTypeKind
X86 AMX.
Definition Core.h:172
@ LLVMMetadataTypeKind
Metadata.
Definition Core.h:167
@ LLVMScalableVectorTypeKind
Scalable SIMD vector type.
Definition Core.h:170
@ LLVMArrayTypeKind
Arrays.
Definition Core.h:164
@ LLVMBFloatTypeKind
16 bit brain floating point type
Definition Core.h:171
@ LLVMStructTypeKind
Structures.
Definition Core.h:163
@ LLVMLabelTypeKind
Labels.
Definition Core.h:160
@ LLVMDoubleTypeKind
64 bit floating point type
Definition Core.h:156
@ LLVMVoidTypeKind
type with no size
Definition Core.h:153
@ LLVMTokenTypeKind
Tokens.
Definition Core.h:169
@ LLVMFloatTypeKind
32 bit floating point type
Definition Core.h:155
@ LLVMFunctionTypeKind
Functions.
Definition Core.h:162
@ LLVMVectorTypeKind
Fixed width SIMD vector type.
Definition Core.h:166
@ LLVMPPC_FP128TypeKind
128 bit floating point type (two 64-bits)
Definition Core.h:159
@ LLVMTargetExtTypeKind
Target extension type.
Definition Core.h:173
@ LLVMDefaultStorageClass
Definition Core.h:212
@ LLVMDLLExportStorageClass
Function to be accessible from DLL.
Definition Core.h:214
@ LLVMDLLImportStorageClass
Function to be imported from DLL.
Definition Core.h:213
@ LLVMMemoryDefValueKind
Definition Core.h:265
@ LLVMConstantDataVectorValueKind
Definition Core.h:281
@ LLVMConstantIntValueKind
Definition Core.h:282
@ LLVMConstantDataArrayValueKind
Definition Core.h:280
@ LLVMUndefValueValueKind
Definition Core.h:278
@ LLVMFunctionValueKind
Definition Core.h:268
@ LLVMConstantVectorValueKind
Definition Core.h:276
@ LLVMMemoryPhiValueKind
Definition Core.h:266
@ LLVMConstantTokenNoneValueKind
Definition Core.h:285
@ LLVMArgumentValueKind
Definition Core.h:262
@ LLVMInlineAsmValueKind
Definition Core.h:288
@ LLVMConstantAggregateZeroValueKind
Definition Core.h:279
@ LLVMGlobalAliasValueKind
Definition Core.h:269
@ LLVMMetadataAsValueValueKind
Definition Core.h:287
@ LLVMConstantTargetNoneValueKind
Definition Core.h:292
@ LLVMConstantStructValueKind
Definition Core.h:275
@ LLVMInstructionValueKind
Definition Core.h:290
@ LLVMConstantArrayValueKind
Definition Core.h:274
@ LLVMMemoryUseValueKind
Definition Core.h:264
@ LLVMConstantPtrAuthValueKind
Definition Core.h:293
@ LLVMConstantPointerNullValueKind
Definition Core.h:284
@ LLVMBasicBlockValueKind
Definition Core.h:263
@ LLVMBlockAddressValueKind
Definition Core.h:272
@ LLVMConstantExprValueKind
Definition Core.h:273
@ LLVMPoisonValueValueKind
Definition Core.h:291
@ LLVMGlobalVariableValueKind
Definition Core.h:271
@ LLVMGlobalIFuncValueKind
Definition Core.h:270
@ LLVMConstantFPValueKind
Definition Core.h:283
@ LLVMCXXFASTTLSCallConv
Definition Core.h:227
@ LLVMX86INTRCallConv
Definition Core.h:245
@ LLVMAMDGPUCSCallConv
Definition Core.h:252
@ LLVMAMDGPUHSCallConv
Definition Core.h:255
@ LLVMSwiftCallConv
Definition Core.h:226
@ LLVMPTXDeviceCallConv
Definition Core.h:236
@ LLVMX86VectorCallCallConv
Definition Core.h:242
@ LLVMPreserveAllCallConv
Definition Core.h:225
@ LLVMAMDGPUGSCallConv
Definition Core.h:250
@ LLVMMSP430INTRCallConv
Definition Core.h:233
@ LLVMCCallConv
Definition Core.h:218
@ LLVMARMAPCSCallConv
Definition Core.h:230
@ LLVMAVRSIGNALCallConv
Definition Core.h:247
@ LLVMX86RegCallCallConv
Definition Core.h:254
@ LLVMAMDGPUVSCallConv
Definition Core.h:249
@ LLVMSPIRKERNELCallConv
Definition Core.h:238
@ LLVMGHCCallConv
Definition Core.h:221
@ LLVMX86ThisCallCallConv
Definition Core.h:234
@ LLVMPTXKernelCallConv
Definition Core.h:235
@ LLVMAnyRegCallConv
Definition Core.h:223
@ LLVMAVRINTRCallConv
Definition Core.h:246
@ LLVMAMDGPUPSCallConv
Definition Core.h:251
@ LLVMSPIRFUNCCallConv
Definition Core.h:237
@ LLVMPreserveMostCallConv
Definition Core.h:224
@ LLVMMSP430BUILTINCallConv
Definition Core.h:256
@ LLVMAMDGPUKERNELCallConv
Definition Core.h:253
@ LLVMX8664SysVCallConv
Definition Core.h:240
@ LLVMARMAAPCSCallConv
Definition Core.h:231
@ LLVMColdCallConv
Definition Core.h:220
@ LLVMAMDGPULSCallConv
Definition Core.h:257
@ LLVMX86FastcallCallConv
Definition Core.h:229
@ LLVMAMDGPUESCallConv
Definition Core.h:258
@ LLVMX86StdcallCallConv
Definition Core.h:228
@ LLVMFastCallConv
Definition Core.h:219
@ LLVMAVRBUILTINCallConv
Definition Core.h:248
@ LLVMHHVMCallConv
Definition Core.h:243
@ LLVMIntelOCLBICallConv
Definition Core.h:239
@ LLVMWin64CallConv
Definition Core.h:241
@ LLVMHiPECallConv
Definition Core.h:222
@ LLVMHHVMCCallConv
Definition Core.h:244
@ LLVMARMAAPCSVFPCallConv
Definition Core.h:232
@ LLVMDbgRecordValue
Definition Core.h:539
@ LLVMDbgRecordDeclare
Definition Core.h:538
@ LLVMDbgRecordLabel
Definition Core.h:537
@ LLVMDbgRecordAssign
Definition Core.h:540
@ LLVMIntSGT
signed greater than
Definition Core.h:303
@ LLVMIntULE
unsigned less or equal
Definition Core.h:302
@ LLVMIntEQ
equal
Definition Core.h:297
@ LLVMIntUGE
unsigned greater or equal
Definition Core.h:300
@ LLVMIntSGE
signed greater or equal
Definition Core.h:304
@ LLVMIntULT
unsigned less than
Definition Core.h:301
@ LLVMIntUGT
unsigned greater than
Definition Core.h:299
@ LLVMIntSLE
signed less or equal
Definition Core.h:306
@ LLVMIntSLT
signed less than
Definition Core.h:305
@ LLVMIntNE
not equal
Definition Core.h:298
@ LLVMGlobalUnnamedAddr
Address of the GV is globally insignificant.
Definition Core.h:208
@ LLVMLocalUnnamedAddr
Address of the GV is locally insignificant.
Definition Core.h:207
@ LLVMNoUnnamedAddr
Address of the GV is significant.
Definition Core.h:206
@ LLVMModuleFlagBehaviorRequire
Adds a requirement that another module flag be present and have a specified value after linking is pe...
Definition Core.h:446
@ LLVMModuleFlagBehaviorWarning
Emits a warning if two values disagree.
Definition Core.h:434
@ LLVMModuleFlagBehaviorOverride
Uses the specified value, regardless of the behavior or value of the other module.
Definition Core.h:454
@ LLVMModuleFlagBehaviorAppendUnique
Appends the two values, which are required to be metadata nodes.
Definition Core.h:468
@ LLVMModuleFlagBehaviorAppend
Appends the two values, which are required to be metadata nodes.
Definition Core.h:460
@ LLVMModuleFlagBehaviorError
Emits an error if two values disagree, otherwise the resulting value is that of the operands.
Definition Core.h:427
@ LLVMDSWarning
Definition Core.h:410
@ LLVMDSNote
Definition Core.h:412
@ LLVMDSError
Definition Core.h:409
@ LLVMDSRemark
Definition Core.h:411
@ LLVMProtectedVisibility
The GV is protected.
Definition Core.h:202
@ LLVMDefaultVisibility
The GV is visible.
Definition Core.h:200
@ LLVMHiddenVisibility
The GV is hidden.
Definition Core.h:201
@ LLVMAtomicRMWBinOpXor
Xor a value and return the old one.
Definition Core.h:370
@ LLVMAtomicRMWBinOpXchg
Set the new value and return the one old.
Definition Core.h:364
@ LLVMAtomicRMWBinOpSub
Subtract a value and return the old one.
Definition Core.h:366
@ LLVMAtomicRMWBinOpUMax
Sets the value if it's greater than the original using an unsigned comparison and return the old one.
Definition Core.h:377
@ LLVMAtomicRMWBinOpUSubSat
Subtracts the value, clamping to zero.
Definition Core.h:399
@ LLVMAtomicRMWBinOpAnd
And a value and return the old one.
Definition Core.h:367
@ LLVMAtomicRMWBinOpUDecWrap
Decrements the value, wrapping back to the input value when decremented below zero.
Definition Core.h:395
@ LLVMAtomicRMWBinOpFMax
Sets the value if it's greater than the original using an floating point comparison and return the ol...
Definition Core.h:387
@ LLVMAtomicRMWBinOpMin
Sets the value if it's Smaller than the original using a signed comparison and return the old one.
Definition Core.h:374
@ LLVMAtomicRMWBinOpOr
OR a value and return the old one.
Definition Core.h:369
@ LLVMAtomicRMWBinOpFMin
Sets the value if it's smaller than the original using an floating point comparison and return the ol...
Definition Core.h:390
@ LLVMAtomicRMWBinOpMax
Sets the value if it's greater than the original using a signed comparison and return the old one.
Definition Core.h:371
@ LLVMAtomicRMWBinOpFMaximum
Sets the value if it's greater than the original using an floating point comparison and return the ol...
Definition Core.h:400
@ LLVMAtomicRMWBinOpFMinimum
Sets the value if it's smaller than the original using an floating point comparison and return the ol...
Definition Core.h:403
@ LLVMAtomicRMWBinOpUIncWrap
Increments the value, wrapping back to zero when incremented above input value.
Definition Core.h:393
@ LLVMAtomicRMWBinOpFAdd
Add a floating point value and return the old one.
Definition Core.h:383
@ LLVMAtomicRMWBinOpFSub
Subtract a floating point value and return the old one.
Definition Core.h:385
@ LLVMAtomicRMWBinOpAdd
Add a value and return the old one.
Definition Core.h:365
@ LLVMAtomicRMWBinOpUMin
Sets the value if it's greater than the original using an unsigned comparison and return the old one.
Definition Core.h:380
@ LLVMAtomicRMWBinOpNand
Not-And a value and return the old one.
Definition Core.h:368
@ LLVMAtomicRMWBinOpUSubCond
Subtracts the value only if no unsigned overflow.
Definition Core.h:397
@ LLVMGeneralDynamicTLSModel
Definition Core.h:330
@ LLVMLocalDynamicTLSModel
Definition Core.h:331
@ LLVMNotThreadLocal
Definition Core.h:329
@ LLVMInitialExecTLSModel
Definition Core.h:332
@ LLVMLocalExecTLSModel
Definition Core.h:333
@ LLVMAtomicOrderingAcquireRelease
provides both an Acquire and a Release barrier (for fences and operations which both read and write m...
Definition Core.h:349
@ LLVMAtomicOrderingRelease
Release is similar to Acquire, but with a barrier of the sort necessary to release a lock.
Definition Core.h:346
@ LLVMAtomicOrderingAcquire
Acquire provides a barrier of the sort necessary to acquire a lock to access other memory with normal...
Definition Core.h:343
@ LLVMAtomicOrderingMonotonic
guarantees that if you take all the operations affecting a specific address, a consistent ordering ex...
Definition Core.h:340
@ LLVMAtomicOrderingSequentiallyConsistent
provides Acquire semantics for loads and Release semantics for stores.
Definition Core.h:353
@ LLVMAtomicOrderingNotAtomic
A load or store which is not atomic.
Definition Core.h:337
@ LLVMAtomicOrderingUnordered
Lowest level of atomicity, guarantees somewhat sane results, lock free.
Definition Core.h:338
@ LLVMInlineAsmDialectATT
Definition Core.h:416
@ LLVMInlineAsmDialectIntel
Definition Core.h:417
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:2198
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:2002
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