summaryrefslogtreecommitdiff
path: root/lib/VMCore/Core.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-08-28 04:09:24 +0000
committerChris Lattner <sabre@nondot.org>2010-08-28 04:09:24 +0000
commit61c70e98ac3c7504d31dd9bc81c4e9cb998e9984 (patch)
tree05263a360b43d09ed99dacdf6d402ce50deb32d7 /lib/VMCore/Core.cpp
parent5f88af537637831451ff9ffa08c597e05e7dc9fb (diff)
downloadllvm-61c70e98ac3c7504d31dd9bc81c4e9cb998e9984.tar.gz
llvm-61c70e98ac3c7504d31dd9bc81c4e9cb998e9984.tar.bz2
llvm-61c70e98ac3c7504d31dd9bc81c4e9cb998e9984.tar.xz
remove unions from LLVM IR. They are severely buggy and not
being actively maintained, improved, or extended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112356 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Core.cpp')
-rw-r--r--lib/VMCore/Core.cpp34
1 files changed, 0 insertions, 34 deletions
diff --git a/lib/VMCore/Core.cpp b/lib/VMCore/Core.cpp
index e884404d8a..5aad19dd2a 100644
--- a/lib/VMCore/Core.cpp
+++ b/lib/VMCore/Core.cpp
@@ -156,8 +156,6 @@ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) {
return LLVMFunctionTypeKind;
case Type::StructTyID:
return LLVMStructTypeKind;
- case Type::UnionTyID:
- return LLVMUnionTypeKind;
case Type::ArrayTyID:
return LLVMArrayTypeKind;
case Type::PointerTyID:
@@ -316,34 +314,6 @@ LLVMBool LLVMIsPackedStruct(LLVMTypeRef StructTy) {
return unwrap<StructType>(StructTy)->isPacked();
}
-/*--.. Operations on union types ..........................................--*/
-
-LLVMTypeRef LLVMUnionTypeInContext(LLVMContextRef C, LLVMTypeRef *ElementTypes,
- unsigned ElementCount) {
- SmallVector<const Type*, 8> Tys;
- for (LLVMTypeRef *I = ElementTypes,
- *E = ElementTypes + ElementCount; I != E; ++I)
- Tys.push_back(unwrap(*I));
-
- return wrap(UnionType::get(&Tys[0], Tys.size()));
-}
-
-LLVMTypeRef LLVMUnionType(LLVMTypeRef *ElementTypes, unsigned ElementCount) {
- return LLVMUnionTypeInContext(LLVMGetGlobalContext(), ElementTypes,
- ElementCount);
-}
-
-unsigned LLVMCountUnionElementTypes(LLVMTypeRef UnionTy) {
- return unwrap<UnionType>(UnionTy)->getNumElements();
-}
-
-void LLVMGetUnionElementTypes(LLVMTypeRef UnionTy, LLVMTypeRef *Dest) {
- UnionType *Ty = unwrap<UnionType>(UnionTy);
- for (FunctionType::param_iterator I = Ty->element_begin(),
- E = Ty->element_end(); I != E; ++I)
- *Dest++ = wrap(*I);
-}
-
/*--.. Operations on array, pointer, and vector types (sequence types) .....--*/
LLVMTypeRef LLVMArrayType(LLVMTypeRef ElementType, unsigned ElementCount) {
@@ -628,10 +598,6 @@ LLVMValueRef LLVMConstVector(LLVMValueRef *ScalarConstantVals, unsigned Size) {
return wrap(ConstantVector::get(
unwrap<Constant>(ScalarConstantVals, Size), Size));
}
-LLVMValueRef LLVMConstUnion(LLVMTypeRef Ty, LLVMValueRef Val) {
- return wrap(ConstantUnion::get(unwrap<UnionType>(Ty), unwrap<Constant>(Val)));
-}
-
/*--.. Constant expressions ................................................--*/
LLVMOpcode LLVMGetConstOpcode(LLVMValueRef ConstantVal) {