This repository was archived by the owner on Nov 1, 2021. It is now read-only.
File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -366,11 +366,12 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI {
366
366
void emitCXXStructor (const CXXMethodDecl *MD, StructorType Type) override ;
367
367
368
368
private:
369
- bool hasAnyUsedVirtualInlineFunction (const CXXRecordDecl *RD) const {
369
+ bool hasAnyVirtualInlineFunction (const CXXRecordDecl *RD) const {
370
370
const auto &VtableLayout =
371
371
CGM.getItaniumVTableContext ().getVTableLayout (RD);
372
372
373
373
for (const auto &VtableComponent : VtableLayout.vtable_components ()) {
374
+ // Skip empty slot.
374
375
if (!VtableComponent.isUsedFunctionPointerKind ())
375
376
continue ;
376
377
@@ -1687,7 +1688,7 @@ bool ItaniumCXXABI::canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const {
1687
1688
// then we are safe to emit available_externally copy of vtable.
1688
1689
// FIXME we can still emit a copy of the vtable if we
1689
1690
// can emit definition of the inline functions.
1690
- return !hasAnyUsedVirtualInlineFunction (RD) && !isVTableHidden (RD);
1691
+ return !hasAnyVirtualInlineFunction (RD) && !isVTableHidden (RD);
1691
1692
}
1692
1693
static llvm::Value *performTypeAdjustment (CodeGenFunction &CGF,
1693
1694
Address InitialPtr,
You can’t perform that action at this time.
0 commit comments