[PATCH] D49597: [ms] Fix mangling of vector types in QMM_Result contexts.
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 23 10:16:38 PDT 2018
rnk added a comment.
Thanks!
In https://reviews.llvm.org/D49597#1171044, @thakis wrote:
> rnk, since zturner is out until Thu, can you take a look?
Yep.
================
Comment at: clang/lib/AST/MicrosoftMangle.cpp:1756
Quals = Quals.withoutObjCLifetime();
- if ((!IsPointer && Quals) || isa<TagType>(T)) {
+ if ((!IsPointer && Quals) || isa<TagType>(T) || isArtificialTagType(T)) {
Out << '?';
----------------
I think we might as well mangle qualifiers into all vector types. Ultimately, they are all mangled as artificial tag types, and MSVC mangles qualifiers into tag return types. I don't think it's worth the code complexity to distinguish between the __m64 / __m128* vector types that require ABI compatibility and those that don't.
================
Comment at: clang/test/CodeGenCXX/mangle-ms-vector-types.cpp:50-51
+__m64 rfoo64() { return __m64(); }
+// CHECK: define dso_local <1 x i64> @"?rfoo64@@YA?AT__m64@@XZ"
+
----------------
Probably worth testing a const return type to show we're mangling the qualifiers and not just adding "?A" sometimes.
https://reviews.llvm.org/D49597
More information about the cfe-commits
mailing list