summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm-c/Core.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-02-12 20:49:41 +0000
committerChris Lattner <sabre@nondot.org>2010-02-12 20:49:41 +0000
commit392be58cad0f051b4e7e252b44cef14b547f9b81 (patch)
tree94d1ae41a937c2ba15293075eca262842da5d3fe /llvm/include/llvm-c/Core.h
parentbdf1b9520cf4be11020a6d2af5b84b33c12e1514 (diff)
downloadbcm5719-llvm-392be58cad0f051b4e7e252b44cef14b547f9b81.tar.gz
bcm5719-llvm-392be58cad0f051b4e7e252b44cef14b547f9b81.zip
Add support for a union type in LLVM IR. Patch by Talin!
llvm-svn: 96011
Diffstat (limited to 'llvm/include/llvm-c/Core.h')
-rw-r--r--llvm/include/llvm-c/Core.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/llvm/include/llvm-c/Core.h b/llvm/include/llvm-c/Core.h
index 98358fe3807..4500fccb65a 100644
--- a/llvm/include/llvm-c/Core.h
+++ b/llvm/include/llvm-c/Core.h
@@ -193,7 +193,8 @@ typedef enum {
LLVMPointerTypeKind, /**< Pointers */
LLVMOpaqueTypeKind, /**< Opaque: type with unknown structure */
LLVMVectorTypeKind, /**< SIMD 'packed' format, or other vector type */
- LLVMMetadataTypeKind /**< Metadata */
+ LLVMMetadataTypeKind, /**< Metadata */
+ LLVMUnionTypeKind /**< Unions */
} LLVMTypeKind;
typedef enum {
@@ -372,6 +373,13 @@ unsigned LLVMCountStructElementTypes(LLVMTypeRef StructTy);
void LLVMGetStructElementTypes(LLVMTypeRef StructTy, LLVMTypeRef *Dest);
LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy);
+/* Operations on union types */
+LLVMTypeRef LLVMUnionTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes,
+ unsigned ElementCount);
+LLVMTypeRef LLVMUnionType(LLVMTypeRef *ElementTypes, unsigned ElementCount);
+unsigned LLVMCountUnionElementTypes(LLVMTypeRef UnionTy);
+void LLVMGetUnionElementTypes(LLVMTypeRef UnionTy, LLVMTypeRef *Dest);
+
/* Operations on array, pointer, and vector types (sequence types) */
LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount);
LLVMTypeRef LLVMPointerType(LLVMTypeRef ElementType, unsigned AddressSpace);
OpenPOWER on IntegriCloud