Skip to content

Commit 7939ce6

Browse files
[AArch64] Add MSVC mangling for the __mfp8 type (#124968)
Fixes #124907
1 parent 3bc2dad commit 7939ce6

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

clang/lib/AST/MicrosoftMangle.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2792,6 +2792,10 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers,
27922792
mangleArtificialTagType(TagTypeKind::Struct, "__bf16", {"__clang"});
27932793
break;
27942794

2795+
case BuiltinType::MFloat8:
2796+
mangleArtificialTagType(TagTypeKind::Struct, "__mfp8", {"__clang"});
2797+
break;
2798+
27952799
#define WASM_REF_TYPE(InternalName, MangledName, Id, SingletonId, AS) \
27962800
case BuiltinType::Id: \
27972801
mangleArtificialTagType(TagTypeKind::Struct, MangledName); \
@@ -2808,6 +2812,7 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers,
28082812

28092813
#define SVE_TYPE(Name, Id, SingletonId) \
28102814
case BuiltinType::Id:
2815+
#define SVE_SCALAR_TYPE(Name, MangledName, Id, SingletonId, Bits)
28112816
#include "clang/Basic/AArch64SVEACLETypes.def"
28122817
#define PPC_VECTOR_TYPE(Name, Id, Size) \
28132818
case BuiltinType::Id:
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
// RUN: %clang_cc1 -triple aarch64-windows-msvc -emit-llvm -o - %s | FileCheck %s
2+
3+
typedef __mfp8 mf8;
4+
typedef __attribute__((neon_vector_type(8))) __mfp8 mf8x8_t;
5+
typedef __attribute__((neon_vector_type(16))) __mfp8 mf8x16_t;
6+
7+
// CHECK: "?f@@YAXU__mfp8@__clang@@@Z"
8+
void f(mf8 v) {}
9+
10+
// CHECK: "?f@@YAXT?$__vector@U__mfp8@__clang@@$07@__clang@@@Z"
11+
void f(mf8x8_t v) {}
12+
13+
// CHECK: "?f@@YAXT?$__vector@U__mfp8@__clang@@$0BA@@__clang@@@Z"
14+
void f(mf8x16_t v) {}

0 commit comments

Comments
 (0)