forked from OSchip/llvm-project
libclang: correct inverted logic
The complete dtor is only emitted when there is a virtual destructor. The test itself was incorrect, so the issue in the code was not noticed. llvm-svn: 255225
This commit is contained in:
parent
8e44b9a4d1
commit
d5af8ae17f
|
@ -16,10 +16,10 @@ struct s {
|
|||
};
|
||||
|
||||
// ITANIUM: CXXConstructor=s{{.*}}[mangled=_ZN1sC2Ei] [mangled=_ZN1sC1Ei]
|
||||
// ITANIUM: CXXDestructor=~s{{.*}}[mangled=_ZN1sD2Ev] [mangled=_ZN1sD1Ev] [mangled=_ZN1sD0Ev]
|
||||
// ITANIUM: CXXDestructor=~s{{.*}}[mangled=_ZN1sD2Ev] [mangled=_ZN1sD1Ev]
|
||||
|
||||
// MACHO: CXXConstructor=s{{.*}}[mangled=__ZN1sC2Ei] [mangled=__ZN1sC1Ei]
|
||||
// MACHO: CXXDestructor=~s{{.*}}[mangled=__ZN1sD2Ev] [mangled=__ZN1sD1Ev] [mangled=__ZN1sD0Ev]
|
||||
// MACHO: CXXDestructor=~s{{.*}}[mangled=__ZN1sD2Ev] [mangled=__ZN1sD1Ev]
|
||||
|
||||
// MSVC: CXXConstructor=s{{.*}}[mangled=??0s@@QAE@H@Z]
|
||||
// MSVC: CXXDestructor=~s{{.*}}[mangled=??1s@@QAE@XZ]
|
||||
|
@ -31,10 +31,10 @@ struct t {
|
|||
};
|
||||
|
||||
// ITANIUM: CXXConstructor=t{{.*}}[mangled=_ZN1tC2Ei] [mangled=_ZN1tC1Ei]
|
||||
// ITANIUM: CXXDestructor=~t{{.*}}[mangled=_ZN1tD2Ev] [mangled=_ZN1tD1Ev]
|
||||
// ITANIUM: CXXDestructor=~t{{.*}}[mangled=_ZN1tD2Ev] [mangled=_ZN1tD1Ev] [mangled=_ZN1tD0Ev]
|
||||
|
||||
// MACHO: CXXConstructor=t{{.*}}[mangled=__ZN1tC2Ei] [mangled=__ZN1tC1Ei]
|
||||
// MACHO: CXXDestructor=~t{{.*}}[mangled=__ZN1tD2Ev] [mangled=__ZN1tD1Ev]
|
||||
// MACHO: CXXDestructor=~t{{.*}}[mangled=__ZN1tD2Ev] [mangled=__ZN1tD1Ev] [mangled=__ZN1tD0Ev]
|
||||
|
||||
// MSVC: CXXConstructor=t{{.*}}[mangled=??0t@@QAE@H@Z]
|
||||
// MSVC: CXXDestructor=~t{{.*}}[mangled=??1t@@UAE@XZ]
|
||||
|
@ -46,10 +46,10 @@ struct u {
|
|||
};
|
||||
|
||||
// ITANIUM: CXXConstructor=u{{.*}}[mangled=_ZN1uC2Ev]
|
||||
// ITANIUM: CXXDestructor=~u{{.*}}[mangled=_ZN1uD2Ev] [mangled=_ZN1uD1Ev]
|
||||
// ITANIUM: CXXDestructor=~u{{.*}}[mangled=_ZN1uD2Ev] [mangled=_ZN1uD1Ev] [mangled=_ZN1uD0Ev]
|
||||
|
||||
// MACHO: CXXConstructor=u{{.*}}[mangled=__ZN1uC2Ev]
|
||||
// MACHO: CXXDestructor=~u{{.*}}[mangled=__ZN1uD2Ev] [mangled=__ZN1uD1Ev]
|
||||
// MACHO: CXXDestructor=~u{{.*}}[mangled=__ZN1uD2Ev] [mangled=__ZN1uD1Ev] [mangled=__ZN1uD0Ev]
|
||||
|
||||
// MSVC: CXXConstructor=u{{.*}}[mangled=??0u@@QAE@XZ]
|
||||
// MSVC: CXXDestructor=~u{{.*}}[mangled=??1u@@UAE@XZ]
|
||||
|
|
|
@ -4025,8 +4025,7 @@ CXStringSet *clang_Cursor_getCXXManglings(CXCursor C) {
|
|||
Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Base));
|
||||
if (Ctx.getTargetInfo().getCXXABI().isItaniumFamily()) {
|
||||
Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Complete));
|
||||
|
||||
if (!DD->isVirtual())
|
||||
if (DD->isVirtual())
|
||||
Manglings.emplace_back(getMangledStructor(M, DL, DD, Dtor_Deleting));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue