mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 17:43:57 +00:00
Fix a refacto that broke the clang-on-clang build.
llvm-svn: 95994
This commit is contained in:
parent
554003f481
commit
0760481f26
@ -1924,8 +1924,6 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
|
||||
if (!MD->isVirtual())
|
||||
continue;
|
||||
|
||||
bool ShouldAddEntryForMethod = true;
|
||||
|
||||
// Check if this method overrides a method in the primary base.
|
||||
if (const CXXMethodDecl *OverriddenMD =
|
||||
OverridesMethodInPrimaryBase(MD, PrimaryBases)) {
|
||||
@ -1948,14 +1946,10 @@ void CGVtableInfo::ComputeMethodVtableIndices(const CXXRecordDecl *RD) {
|
||||
}
|
||||
|
||||
// We don't need to add an entry for this method.
|
||||
ShouldAddEntryForMethod = false;
|
||||
break;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
if (!ShouldAddEntryForMethod)
|
||||
continue;
|
||||
|
||||
if (const CXXDestructorDecl *DD = dyn_cast<CXXDestructorDecl>(MD)) {
|
||||
if (MD->isImplicit()) {
|
||||
assert(!ImplicitVirtualDtor &&
|
||||
|
@ -1,6 +1,8 @@
|
||||
// RUN: %clang_cc1 %s -emit-llvm -o - | FileCheck %s
|
||||
|
||||
// PR5021
|
||||
namespace PR5021 {
|
||||
|
||||
struct A {
|
||||
virtual void f(char);
|
||||
};
|
||||
@ -16,4 +18,21 @@ struct B : virtual A {
|
||||
|
||||
void f(B * b) {
|
||||
b->f();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
namespace Test1 {
|
||||
struct A {
|
||||
virtual ~A();
|
||||
};
|
||||
|
||||
struct B : A {
|
||||
virtual ~B();
|
||||
virtual void f();
|
||||
};
|
||||
|
||||
void f(B *b) {
|
||||
b->f();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user