forked from OSchip/llvm-project
Refine construction vtables; they don't include bits that don't have
virtual bases unless they are morally virtual. llvm-svn: 87071
This commit is contained in:
parent
76a06074eb
commit
fa81808a11
clang/lib/CodeGen
|
@ -585,6 +585,11 @@ public:
|
||||||
if (!RD->isDynamicClass())
|
if (!RD->isDynamicClass())
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
// Construction vtable don't need parts that have no virtual bases and
|
||||||
|
// aren't morally virtual.
|
||||||
|
if ((LayoutClass != Class) && RD->getNumVBases() == 0 && !MorallyVirtual)
|
||||||
|
return 0;
|
||||||
|
|
||||||
const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD);
|
const ASTRecordLayout &Layout = CGM.getContext().getASTRecordLayout(RD);
|
||||||
const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBase();
|
const CXXRecordDecl *PrimaryBase = Layout.getPrimaryBase();
|
||||||
const bool PrimaryBaseWasVirtual = Layout.getPrimaryBaseWasVirtual();
|
const bool PrimaryBaseWasVirtual = Layout.getPrimaryBaseWasVirtual();
|
||||||
|
|
Loading…
Reference in New Issue