From c8714d284a5aab04d829caeec54adcacb7a91cfc Mon Sep 17 00:00:00 2001 From: Shoaib Meenai Date: Thu, 4 Oct 2018 19:50:14 +0000 Subject: [PATCH] [AST] Revert mangling changes from r339428 As discussed in https://reviews.llvm.org/D50144, we want Obj-C classes to have the same mangling as C++ structs, to support headers like the following: ``` @class I; struct I; void f(I *); ``` since the header can be used from both C++ and Obj-C++ TUs, and we want a consistent mangling across the two to prevent link errors. Itanium mangles both the same way, and so should the MS ABI. The main concern with having the same mangling for C++ structs and Obj-C classes was that we want to treat them differently for the purposes of exception handling, e.g. we don't want a C++ catch statement for a struct to be able to catch an Obj-C class with the same name as the struct. We can accomplish this by mangling Obj-C class names differently in their RTTI, which I'll do in a follow-up patch. Differential Revision: https://reviews.llvm.org/D52581 llvm-svn: 343808 --- clang/lib/AST/MicrosoftMangle.cpp | 19 ++- .../test/CodeGenObjCXX/arc-marker-funclet.mm | 2 +- .../microsoft-abi-arc-param-order.mm | 2 +- .../CodeGenObjCXX/msabi-objc-extensions.mm | 59 +++++---- clang/test/CodeGenObjCXX/msabi-objc-types.mm | 114 +++++++++--------- 5 files changed, 97 insertions(+), 99 deletions(-) diff --git a/clang/lib/AST/MicrosoftMangle.cpp b/clang/lib/AST/MicrosoftMangle.cpp index 1d4bdaa760c7..072184d82e82 100644 --- a/clang/lib/AST/MicrosoftMangle.cpp +++ b/clang/lib/AST/MicrosoftMangle.cpp @@ -482,7 +482,7 @@ void MicrosoftCXXNameMangler::mangle(const NamedDecl *D, StringRef Prefix) { mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD)); else if (const VarDecl *VD = dyn_cast(D)) mangleVariableEncoding(VD); - else if (!isa(D)) + else llvm_unreachable("Tried to mangle unexpected NamedDecl!"); } @@ -1951,13 +1951,13 @@ void MicrosoftCXXNameMangler::mangleType(const BuiltinType *T, Qualifiers, llvm_unreachable("placeholder types shouldn't get to name mangling"); case BuiltinType::ObjCId: - mangleArtificalTagType(TTK_Struct, ".objc_object"); + mangleArtificalTagType(TTK_Struct, "objc_object"); break; case BuiltinType::ObjCClass: - mangleArtificalTagType(TTK_Struct, ".objc_class"); + mangleArtificalTagType(TTK_Struct, "objc_class"); break; case BuiltinType::ObjCSel: - mangleArtificalTagType(TTK_Struct, ".objc_selector"); + mangleArtificalTagType(TTK_Struct, "objc_selector"); break; #define IMAGE_TYPE(ImgType, Id, SingletonId, Access, Suffix) \ @@ -2637,10 +2637,9 @@ void MicrosoftCXXNameMangler::mangleType(const DependentAddressSpaceType *T, void MicrosoftCXXNameMangler::mangleType(const ObjCInterfaceType *T, Qualifiers, SourceRange) { - // ObjC interfaces are mangled as if they were structs with a name that is - // not a valid C/C++ identifier + // ObjC interfaces have structs underlying them. mangleTagTypeKind(TTK_Struct); - mangle(T->getDecl(), ".objc_cls_"); + mangleName(T->getDecl()); } void MicrosoftCXXNameMangler::mangleType(const ObjCObjectType *T, @@ -2661,11 +2660,11 @@ void MicrosoftCXXNameMangler::mangleType(const ObjCObjectType *T, Out << "?$"; if (T->isObjCId()) - mangleSourceName(".objc_object"); + mangleSourceName("objc_object"); else if (T->isObjCClass()) - mangleSourceName(".objc_class"); + mangleSourceName("objc_class"); else - mangleSourceName((".objc_cls_" + T->getInterface()->getName()).str()); + mangleSourceName(T->getInterface()->getName()); for (const auto &Q : T->quals()) mangleObjCProtocol(Q); diff --git a/clang/test/CodeGenObjCXX/arc-marker-funclet.mm b/clang/test/CodeGenObjCXX/arc-marker-funclet.mm index 6ad0acd6878a..900c2788daed 100644 --- a/clang/test/CodeGenObjCXX/arc-marker-funclet.mm +++ b/clang/test/CodeGenObjCXX/arc-marker-funclet.mm @@ -10,7 +10,7 @@ void g() { } } -// CHECK: call i8* @"?f@@YAPAU.objc_object@@XZ"() [ "funclet"(token %1) ] +// CHECK: call i8* @"?f@@YAPAUobjc_object@@XZ"() [ "funclet"(token %1) ] // CHECK-NEXT: call void asm sideeffect "movl{{.*}}%ebp, %ebp{{.*}}", ""() [ "funclet"(token %1) ] // The corresponding f() call was invoked from the entry basic block. diff --git a/clang/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm b/clang/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm index 125f8821ef28..910a7db73404 100644 --- a/clang/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm +++ b/clang/test/CodeGenObjCXX/microsoft-abi-arc-param-order.mm @@ -9,7 +9,7 @@ struct A { // Verify that we destruct things from left to right in the MS C++ ABI: a, b, c, d. // -// CHECK-LABEL: define dso_local void @"?test_arc_order@@YAXUA@@PAU.objc_object@@01@Z" +// CHECK-LABEL: define dso_local void @"?test_arc_order@@YAXUA@@PAUobjc_object@@01@Z" // CHECK: (<{ %struct.A, i8*, %struct.A, i8* }>* inalloca) void test_arc_order(A a, id __attribute__((ns_consumed)) b , A c, id __attribute__((ns_consumed)) d) { // CHECK: call x86_thiscallcc void @"??1A@@QAE@XZ"(%struct.A* %{{.*}}) diff --git a/clang/test/CodeGenObjCXX/msabi-objc-extensions.mm b/clang/test/CodeGenObjCXX/msabi-objc-extensions.mm index 52d5cd8271c1..7ac3910ba471 100644 --- a/clang/test/CodeGenObjCXX/msabi-objc-extensions.mm +++ b/clang/test/CodeGenObjCXX/msabi-objc-extensions.mm @@ -7,92 +7,91 @@ @class J; void f(id

, id, id

, id) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@PAU.objc_object@@01@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@PAUobjc_object@@01@Z" void f(id, id

, id

, id) {} -// CHECK-LABEL: "?f@@YAXPAU.objc_object@@PAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@10@Z" +// CHECK-LABEL: "?f@@YAXPAUobjc_object@@PAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@10@Z" void f(id

, id

) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@0@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@0@Z" void f(id

) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@@@@Z" void f(id) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_object@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_object@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" void f(Class

) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_class@U?$Protocol@UP@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_class@U?$Protocol@UP@@@__ObjC@@@@@Z" void f(Class) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_class@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$objc_class@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" void f(I

*) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$I@U?$Protocol@UP@@@__ObjC@@@@@Z" void f(I *) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$I@U?$Protocol@UP@@@__ObjC@@U?$Protocol@UQ@@@2@@@@Z" template struct S {}; void f(S<__unsafe_unretained id>) {} -// CHECK-LABEL: "?f@@YAXU?$S@PAU.objc_object@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@PAUobjc_object@@@@@Z" void f(S<__autoreleasing id>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Autoreleasing@PAU.objc_object@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Autoreleasing@PAUobjc_object@@@__ObjC@@@@@Z" void f(S<__strong id>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU.objc_object@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAUobjc_object@@@__ObjC@@@@@Z" void f(S<__weak id>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU.objc_object@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAUobjc_object@@@__ObjC@@@@@Z" void w(__weak id) {} -// CHECK-LABEL: "?w@@YAXPAU.objc_object@@@Z" +// CHECK-LABEL: "?w@@YAXPAUobjc_object@@@Z" void s(__strong id) {} -// CHECK-LABEL: "?s@@YAXPAU.objc_object@@@Z" +// CHECK-LABEL: "?s@@YAXPAUobjc_object@@@Z" void a(__autoreleasing id) {} -// CHECK-LABEL: "?a@@YAXPAU.objc_object@@@Z" +// CHECK-LABEL: "?a@@YAXPAUobjc_object@@@Z" void u(__unsafe_unretained id) {} -// CHECK-LABEL: "?u@@YAXPAU.objc_object@@@Z" +// CHECK-LABEL: "?u@@YAXPAUobjc_object@@@Z" S<__autoreleasing id> g() { return S<__autoreleasing id>(); } -// CHECK-LABEL: "?g@@YA?AU?$S@U?$Autoreleasing@PAU.objc_object@@@__ObjC@@@@XZ" +// CHECK-LABEL: "?g@@YA?AU?$S@U?$Autoreleasing@PAUobjc_object@@@__ObjC@@@@XZ" __autoreleasing id h() { return nullptr; } -// CHECK-LABEL: "?h@@YAPAU.objc_object@@XZ" +// CHECK-LABEL: "?h@@YAPAUobjc_object@@XZ" void f(I *) {} -// CHECK-LABEL: "?f@@YAXPAU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAXPAUI@@@Z" void f(__kindof I *) {} -// CHECK-LABEL: "?f@@YAXPAU?$KindOf@U.objc_cls_I@@@__ObjC@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$KindOf@UI@@@__ObjC@@@Z" void f(__kindof I

*) {} -// CHECK-LABEL: "?f@@YAXPAU?$KindOf@U?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$KindOf@U?$I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@Z" void f(S) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU.objc_cls_I@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAUI@@@__ObjC@@@@@Z" void f(S<__kindof I *>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU?$KindOf@U.objc_cls_I@@@__ObjC@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU?$KindOf@UI@@@__ObjC@@@__ObjC@@@@@Z" void f(S<__kindof I

*>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU?$KindOf@U?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Strong@PAU?$KindOf@U?$I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@__ObjC@@@@@Z" void f(S<__weak __kindof I *>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU?$KindOf@U.objc_cls_I@@@__ObjC@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU?$KindOf@UI@@@__ObjC@@@__ObjC@@@@@Z" void f(S<__weak __kindof I

*>) {} -// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU?$KindOf@U?$.objc_cls_I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@__ObjC@@@@@Z" +// CHECK-LABEL: "?f@@YAXU?$S@U?$Weak@PAU?$KindOf@U?$I@U?$Protocol@UP@@@__ObjC@@@@@__ObjC@@@__ObjC@@@@@Z" void f(J *) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_J@PAU.objc_cls_I@@@@@Z" +// CHECK-LABEL: "?f@@YAXPAU?$J@PAUI@@@@@Z" void f(J<__kindof I *> *) {} -// CHECK-LABEL: "?f@@YAXPAU?$.objc_cls_J@PAU?$KindOf@U.objc_cls_I@@@__ObjC@@@@@Z" - +// CHECK-LABEL: "?f@@YAXPAU?$J@PAU?$KindOf@UI@@@__ObjC@@@@@Z" diff --git a/clang/test/CodeGenObjCXX/msabi-objc-types.mm b/clang/test/CodeGenObjCXX/msabi-objc-types.mm index 08807bbe1a56..192dd4c23ffa 100644 --- a/clang/test/CodeGenObjCXX/msabi-objc-types.mm +++ b/clang/test/CodeGenObjCXX/msabi-objc-types.mm @@ -3,166 +3,166 @@ @class I; id kid; -// CHECK: @"?kid@@3PAU.objc_object@@A" = dso_local global +// CHECK: @"?kid@@3PAUobjc_object@@A" = dso_local global Class klass; -// CHECK: @"?klass@@3PAU.objc_class@@A" = dso_local global +// CHECK: @"?klass@@3PAUobjc_class@@A" = dso_local global I *kI; -// CHECK: @"?kI@@3PAU.objc_cls_I@@A" = dso_local global +// CHECK: @"?kI@@3PAUI@@A" = dso_local global void f(I *) {} -// CHECK-LABEL: "?f@@YAXPAU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAXPAUI@@@Z" void f(const I *) {} -// CHECK-LABEL: "?f@@YAXPBU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAXPBUI@@@Z" void f(I &) {} -// CHECK-LABEL: "?f@@YAXAAU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAXAAUI@@@Z" void f(const I &) {} -// CHECK-LABEL: "?f@@YAXABU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAXABUI@@@Z" void f(const I &&) {} -// CHECK-LABEL: "?f@@YAX$$QBU.objc_cls_I@@@Z" +// CHECK-LABEL: "?f@@YAX$$QBUI@@@Z" void g(id) {} -// CHECK-LABEL: "?g@@YAXPAU.objc_object@@@Z" +// CHECK-LABEL: "?g@@YAXPAUobjc_object@@@Z" void g(id &) {} -// CHECK-LABEL: "?g@@YAXAAPAU.objc_object@@@Z" +// CHECK-LABEL: "?g@@YAXAAPAUobjc_object@@@Z" void g(const id &) {} -// CHECK-LABEL: "?g@@YAXABQAU.objc_object@@@Z" +// CHECK-LABEL: "?g@@YAXABQAUobjc_object@@@Z" void g(id &&) {} -// CHECK-LABEL: "?g@@YAX$$QAPAU.objc_object@@@Z" +// CHECK-LABEL: "?g@@YAX$$QAPAUobjc_object@@@Z" void h(Class) {} -// CHECK-LABEL: "?h@@YAXPAU.objc_class@@@Z" +// CHECK-LABEL: "?h@@YAXPAUobjc_class@@@Z" void h(Class &) {} -// CHECK-LABEL: "?h@@YAXAAPAU.objc_class@@@Z" +// CHECK-LABEL: "?h@@YAXAAPAUobjc_class@@@Z" void h(const Class &) {} -// CHECK-LABEL: "?h@@YAXABQAU.objc_class@@@Z" +// CHECK-LABEL: "?h@@YAXABQAUobjc_class@@@Z" void h(Class &&) {} -// CHECK-LABEL: "?h@@YAX$$QAPAU.objc_class@@@Z" +// CHECK-LABEL: "?h@@YAX$$QAPAUobjc_class@@@Z" I *i() { return nullptr; } -// CHECK-LABEL: "?i@@YAPAU.objc_cls_I@@XZ" +// CHECK-LABEL: "?i@@YAPAUI@@XZ" const I *j() { return nullptr; } -// CHECK-LABEL: "?j@@YAPBU.objc_cls_I@@XZ" +// CHECK-LABEL: "?j@@YAPBUI@@XZ" I &k() { return *kI; } -// CHECK-LABEL: "?k@@YAAAU.objc_cls_I@@XZ" +// CHECK-LABEL: "?k@@YAAAUI@@XZ" const I &l() { return *kI; } -// CHECK-LABEL: "?l@@YAABU.objc_cls_I@@XZ" +// CHECK-LABEL: "?l@@YAABUI@@XZ" void m(const id) {} -// CHECK-LABEL: "?m@@YAXQAU.objc_object@@@Z" +// CHECK-LABEL: "?m@@YAXQAUobjc_object@@@Z" void m(const I *) {} -// CHECK-LABEL: "?m@@YAXPBU.objc_cls_I@@@Z" +// CHECK-LABEL: "?m@@YAXPBUI@@@Z" void n(SEL) {} -// CHECK-LABEL: "?n@@YAXPAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAXPAUobjc_selector@@@Z" void n(SEL *) {} -// CHECK-LABEL: "?n@@YAXPAPAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAXPAPAUobjc_selector@@@Z" void n(const SEL *) {} -// CHECK-LABEL: "?n@@YAXPBQAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAXPBQAUobjc_selector@@@Z" void n(SEL &) {} -// CHECK-LABEL: "?n@@YAXAAPAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAXAAPAUobjc_selector@@@Z" void n(const SEL &) {} -// CHECK-LABEL: "?n@@YAXABQAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAXABQAUobjc_selector@@@Z" void n(SEL &&) {} -// CHECK-LABEL: "?n@@YAX$$QAPAU.objc_selector@@@Z" +// CHECK-LABEL: "?n@@YAX$$QAPAUobjc_selector@@@Z" struct __declspec(dllexport) s { struct s &operator=(const struct s &) = delete; void m(I *) {} - // CHECK-LABEL: "?m@s@@QAAXPAU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAUI@@@Z" void m(const I *) {} - // CHECK-LABEL: "?m@s@@QAAXPBU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPBUI@@@Z" void m(I &) {} - // CHECK-LABEL: "?m@s@@QAAXAAU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAXAAUI@@@Z" void m(const I &) {} - // CHECK-LABEL: "?m@s@@QAAXABU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAXABUI@@@Z" void m(I &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QAU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QAUI@@@Z" void m(const I &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QBU.objc_cls_I@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QBUI@@@Z" void m(id) {} - // CHECK-LABEL: "?m@s@@QAAXPAU.objc_object@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAUobjc_object@@@Z" void m(id &) {} - // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_object@@@Z" + // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_object@@@Z" void m(id &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_object@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_object@@@Z" void m(const id &) {} - // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_object@@@Z" + // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_object@@@Z" void m(const id &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_object@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_object@@@Z" void m(Class *) {} - // CHECK-LABEL: "?m@s@@QAAXPAPAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAPAUobjc_class@@@Z" void m(const Class *) {} - // CHECK-LABEL: "?m@s@@QAAXPBQAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPBQAUobjc_class@@@Z" void m(Class) {} - // CHECK-LABEL: "?m@s@@QAAXPAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAUobjc_class@@@Z" void m(Class &) {} - // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_class@@@Z" void m(const Class &) {} - // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_class@@@Z" void m(Class &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_class@@@Z" void m(const Class &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_class@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_class@@@Z" void m(SEL) {} - // CHECK-LABEL: "?m@s@@QAAXPAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAUobjc_selector@@@Z" void m(SEL *) {} - // CHECK-LABEL: "?m@s@@QAAXPAPAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPAPAUobjc_selector@@@Z" void m(const SEL *) {} - // CHECK-LABEL: "?m@s@@QAAXPBQAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAXPBQAUobjc_selector@@@Z" void m(SEL &) {} - // CHECK-LABEL: "?m@s@@QAAXAAPAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAXAAPAUobjc_selector@@@Z" void m(const SEL &) {} - // CHECK-LABEL: "?m@s@@QAAXABQAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAXABQAUobjc_selector@@@Z" void m(SEL &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QAPAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QAPAUobjc_selector@@@Z" void m(const SEL &&) {} - // CHECK-LABEL: "?m@s@@QAAX$$QBQAU.objc_selector@@@Z" + // CHECK-LABEL: "?m@s@@QAAX$$QBQAUobjc_selector@@@Z" }; template @@ -179,14 +179,14 @@ struct t { }; template struct t; -// CHECK-LABEL: "??0?$t@PAU.objc_object@@@@QAA@XZ" +// CHECK-LABEL: "??0?$t@PAUobjc_object@@@@QAA@XZ" template struct t::type>; -// CHECK-LABEL: "??0?$t@U.objc_object@@@@QAA@XZ" +// CHECK-LABEL: "??0?$t@Uobjc_object@@@@QAA@XZ" template struct t; -// CHECK-LABEL: "??0?$t@PAU.objc_selector@@@@QAA@XZ" +// CHECK-LABEL: "??0?$t@PAUobjc_selector@@@@QAA@XZ" template struct t::type>; -// CHECK-LABEL: "??0?$t@U.objc_selector@@@@QAA@XZ" +// CHECK-LABEL: "??0?$t@Uobjc_selector@@@@QAA@XZ"