Skip to content

Commit 015e297

Browse files
[SVE] Restore broken LLVM-C ABI compatability
Reviewers: deadalnix, efriedma, rengolin, jyknight, joerg Reviewed By: joerg Subscribers: tschuett, hiraditya, rkruppe, psnobl, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D79915
1 parent adda9c0 commit 015e297

File tree

3 files changed

+21
-21
lines changed

3 files changed

+21
-21
lines changed

llvm/include/llvm-c/Core.h

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -144,24 +144,24 @@ typedef enum {
144144
} LLVMOpcode;
145145

146146
typedef enum {
147-
LLVMVoidTypeKind, /**< type with no size */
148-
LLVMHalfTypeKind, /**< 16 bit floating point type */
149-
LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
150-
LLVMFloatTypeKind, /**< 32 bit floating point type */
151-
LLVMDoubleTypeKind, /**< 64 bit floating point type */
152-
LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */
153-
LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/
154-
LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */
155-
LLVMLabelTypeKind, /**< Labels */
156-
LLVMIntegerTypeKind, /**< Arbitrary bit width integers */
157-
LLVMFunctionTypeKind, /**< Functions */
158-
LLVMStructTypeKind, /**< Structures */
159-
LLVMArrayTypeKind, /**< Arrays */
160-
LLVMPointerTypeKind, /**< Pointers */
161-
LLVMMetadataTypeKind, /**< Metadata */
162-
LLVMX86_MMXTypeKind, /**< X86 MMX */
163-
LLVMTokenTypeKind, /**< Tokens */
164-
LLVMFixedVectorTypeKind, /**< Fixed width SIMD vector type */
147+
LLVMVoidTypeKind, /**< type with no size */
148+
LLVMHalfTypeKind, /**< 16 bit floating point type */
149+
LLVMBFloatTypeKind, /**< 16 bit brain floating point type */
150+
LLVMFloatTypeKind, /**< 32 bit floating point type */
151+
LLVMDoubleTypeKind, /**< 64 bit floating point type */
152+
LLVMX86_FP80TypeKind, /**< 80 bit floating point type (X87) */
153+
LLVMFP128TypeKind, /**< 128 bit floating point type (112-bit mantissa)*/
154+
LLVMPPC_FP128TypeKind, /**< 128 bit floating point type (two 64-bits) */
155+
LLVMLabelTypeKind, /**< Labels */
156+
LLVMIntegerTypeKind, /**< Arbitrary bit width integers */
157+
LLVMFunctionTypeKind, /**< Functions */
158+
LLVMStructTypeKind, /**< Structures */
159+
LLVMArrayTypeKind, /**< Arrays */
160+
LLVMPointerTypeKind, /**< Pointers */
161+
LLVMVectorTypeKind, /**< Fixed width SIMD vector type */
162+
LLVMMetadataTypeKind, /**< Metadata */
163+
LLVMX86_MMXTypeKind, /**< X86 MMX */
164+
LLVMTokenTypeKind, /**< Tokens */
165165
LLVMScalableVectorTypeKind /**< Scalable SIMD vector type */
166166
} LLVMTypeKind;
167167

llvm/lib/IR/Core.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -503,12 +503,12 @@ LLVMTypeKind LLVMGetTypeKind(LLVMTypeRef Ty) {
503503
return LLVMArrayTypeKind;
504504
case Type::PointerTyID:
505505
return LLVMPointerTypeKind;
506+
case Type::FixedVectorTyID:
507+
return LLVMVectorTypeKind;
506508
case Type::X86_MMXTyID:
507509
return LLVMX86_MMXTypeKind;
508510
case Type::TokenTyID:
509511
return LLVMTokenTypeKind;
510-
case Type::FixedVectorTyID:
511-
return LLVMFixedVectorTypeKind;
512512
case Type::ScalableVectorTyID:
513513
return LLVMScalableVectorTypeKind;
514514
}

llvm/tools/llvm-c-test/echo.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct TypeCloner {
142142
case LLVMScalableVectorTypeKind:
143143
// FIXME: scalable vectors unsupported
144144
break;
145-
case LLVMFixedVectorTypeKind:
145+
case LLVMVectorTypeKind:
146146
return LLVMVectorType(
147147
Clone(LLVMGetElementType(Src)),
148148
LLVMGetVectorSize(Src)

0 commit comments

Comments
 (0)