зеркало из https://github.com/microsoft/clang-1.git
Use the right GlobalDecl type for destructors.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@81398 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
39da0b8145
Коммит
3fec4c605e
|
@ -972,7 +972,13 @@ public:
|
|||
}
|
||||
|
||||
void AddMethod(const CXXMethodDecl *MD, bool MorallyVirtual, Index_t Offset) {
|
||||
llvm::Constant *m = wrap(CGM.GetAddrOfFunction(GlobalDecl(MD), Ptr8Ty));
|
||||
GlobalDecl GD;
|
||||
if (const CXXDestructorDecl *Dtor = dyn_cast<CXXDestructorDecl>(MD))
|
||||
GD = GlobalDecl(Dtor, Dtor_Complete);
|
||||
else
|
||||
GD = GlobalDecl(MD);
|
||||
|
||||
llvm::Constant *m = wrap(CGM.GetAddrOfFunction(GD, Ptr8Ty));
|
||||
// If we can find a previously allocated slot for this, reuse it.
|
||||
if (OverrideMethod(MD, m, MorallyVirtual, Offset))
|
||||
return;
|
||||
|
|
Загрузка…
Ссылка в новой задаче