mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-28 08:02:08 +00:00
[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
This commit is contained in:
parent
07dd5af6df
commit
c8714d284a
@ -482,7 +482,7 @@ void MicrosoftCXXNameMangler::mangle(const NamedDecl *D, StringRef Prefix) {
|
||||
mangleFunctionEncoding(FD, Context.shouldMangleDeclName(FD));
|
||||
else if (const VarDecl *VD = dyn_cast<VarDecl>(D))
|
||||
mangleVariableEncoding(VD);
|
||||
else if (!isa<ObjCInterfaceDecl>(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);
|
||||
|
@ -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.
|
||||
|
@ -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* %{{.*}})
|
||||
|
@ -7,92 +7,91 @@
|
||||
@class J<T>;
|
||||
|
||||
void f(id<P>, id, id<P>, 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<P>, id<P>, 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<P>, id<P>) {}
|
||||
// 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<P>) {}
|
||||
// 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<P, Q>) {}
|
||||
// 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<P>) {}
|
||||
// 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<P, Q>) {}
|
||||
// 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<P> *) {}
|
||||
// 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<P, Q> *) {}
|
||||
// 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 <typename>
|
||||
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<P> *) {}
|
||||
// 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<I *>) {}
|
||||
// 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<P> *>) {}
|
||||
// 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<P> *>) {}
|
||||
// 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<I *> *) {}
|
||||
// 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"
|
||||
|
@ -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 <typename T>
|
||||
@ -179,14 +179,14 @@ struct t {
|
||||
};
|
||||
|
||||
template struct t<id>;
|
||||
// CHECK-LABEL: "??0?$t@PAU.objc_object@@@@QAA@XZ"
|
||||
// CHECK-LABEL: "??0?$t@PAUobjc_object@@@@QAA@XZ"
|
||||
|
||||
template struct t<remove_pointer<id>::type>;
|
||||
// CHECK-LABEL: "??0?$t@U.objc_object@@@@QAA@XZ"
|
||||
// CHECK-LABEL: "??0?$t@Uobjc_object@@@@QAA@XZ"
|
||||
|
||||
template struct t<SEL>;
|
||||
// CHECK-LABEL: "??0?$t@PAU.objc_selector@@@@QAA@XZ"
|
||||
// CHECK-LABEL: "??0?$t@PAUobjc_selector@@@@QAA@XZ"
|
||||
|
||||
template struct t<remove_pointer<SEL>::type>;
|
||||
// CHECK-LABEL: "??0?$t@U.objc_selector@@@@QAA@XZ"
|
||||
// CHECK-LABEL: "??0?$t@Uobjc_selector@@@@QAA@XZ"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user