[MS] Pass CVRU qualifiers properly in Itanium mangler

We already have a mangling for the __unaligned qualifier, we just have
to call Qualifiers::getFromCVRUMask instead of getFromCVRMask.

PR36638

llvm-svn: 326971
This commit is contained in:
Reid Kleckner 2018-03-08 00:55:09 +00:00
parent 86fb7bf2bc
commit 267589a966
2 changed files with 5 additions and 1 deletions

View File

@ -2688,7 +2688,7 @@ void CXXNameMangler::mangleType(const FunctionProtoType *T) {
// Mangle CV-qualifiers, if present. These are 'this' qualifiers,
// e.g. "const" in "int (A::*)() const".
mangleQualifiers(Qualifiers::fromCVRMask(T->getTypeQuals()));
mangleQualifiers(Qualifiers::fromCVRUMask(T->getTypeQuals()));
// Mangle instantiation-dependent exception-specification, if present,
// per cxx-abi-dev proposal on 2016-10-11.

View File

@ -21,6 +21,10 @@ void hb(__unaligned struct A *, __unaligned const struct A *) {}
void ja(__unaligned struct A *, __unaligned struct A *__unaligned *, __unaligned struct A *__unaligned *__unaligned *) {}
// CHECK: define {{(dso_local )?}}void @_Z2jaPU11__unaligned1APU11__unalignedS1_PU11__unalignedS3_(
struct A;
void memptr(void (A::*a)(int) __unaligned) {}
// CHECK: define {{.*}} @_Z6memptrM1AU11__unalignedFviE(
void jb(__unaligned struct A *, __unaligned struct A **, __unaligned struct A *__unaligned *__unaligned *) {}
// CHECK: @_Z2jbPU11__unaligned1APS1_PU11__unalignedPU11__unalignedS1_(