LLVMByValAttribute = 1<<7,
LLVMNestAttribute = 1<<8,
LLVMReadNoneAttribute = 1<<9,
- LLVMReadOnlyAttribute = 1<<10
+ LLVMReadOnlyAttribute = 1<<10,
+ LLVMNoInlineAttribute = 1<<11,
+ LLVMAlwaysInlineAttribute = 1<<12,
+ LLVMOptimizeForSizeAttribute = 1<<13,
+ LLVMStackProtectAttribute = 1<<14,
+ LLVMStackProtectReqAttribute = 1<<15,
+ LLVMNoCaptureAttribute = 1<<21,
+ LLVMNoRedZoneAttribute = 1<<22,
+ LLVMNoImplicitFloatAttribute = 1<<23,
+ LLVMNakedAttribute = 1<<24
} LLVMAttribute;
typedef enum {
LLVMArrayTypeKind, /**< Arrays */
LLVMPointerTypeKind, /**< Pointers */
LLVMOpaqueTypeKind, /**< Opaque: type with unknown structure */
- LLVMVectorTypeKind /**< SIMD 'packed' format, or other vector type */
+ LLVMVectorTypeKind, /**< SIMD 'packed' format, or other vector type */
+ LLVMMetadataTypeKind /**< Metadata */
} LLVMTypeKind;
typedef enum {
LLVMExternalWeakLinkage,/**< ExternalWeak linkage description */
LLVMGhostLinkage, /**< Stand-in functions for streaming fns from
bitcode */
- LLVMCommonLinkage /**< Tentative definitions */
+ LLVMCommonLinkage, /**< Tentative definitions */
+ LLVMLinkerPrivateLinkage /**< Like Private, but linker removes. */
} LLVMLinkage;
typedef enum {
/* Create and destroy modules. */
/** See llvm::Module::Module. */
LLVMModuleRef LLVMModuleCreateWithName(const char *ModuleID);
+LLVMModuleRef LLVMModuleCreateWithNameInContext(const char *ModuleID,
+ LLVMContextRef C);
/** See llvm::Module::~Module. */
void LLVMDisposeModule(LLVMModuleRef M);
/** See Module::addTypeName. */
int LLVMAddTypeName(LLVMModuleRef M, const char *Name, LLVMTypeRef Ty);
void LLVMDeleteTypeName(LLVMModuleRef M, const char *Name);
+LLVMTypeRef LLVMGetTypeByName(LLVMModuleRef M, const char *Name);
/** See Module::dump. */
void LLVMDumpModule(LLVMModuleRef M);
macro(CmpInst) \
macro(FCmpInst) \
macro(ICmpInst) \
- macro(VFCmpInst) \
- macro(VICmpInst) \
macro(ExtractElementInst) \
macro(GetElementPtrInst) \
macro(InsertElementInst) \
int LLVMIsConstant(LLVMValueRef Val);
int LLVMIsNull(LLVMValueRef Val);
int LLVMIsUndef(LLVMValueRef Val);
+LLVMValueRef LLVMConstPointerNull(LLVMTypeRef Ty);
/* Operations on scalar constants */
LLVMValueRef LLVMConstInt(LLVMTypeRef IntTy, unsigned long long N,
template<typename T>
inline T **unwrap(LLVMValueRef *Vals, unsigned Length) {
#if DEBUG
- for (LLVMValueRef *I = Vals, E = Vals + Length; I != E; ++I)
+ for (LLVMValueRef *I = Vals, *E = Vals + Length; I != E; ++I)
cast<T>(*I);
#endif
return reinterpret_cast<T**>(Vals);