Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 715c2ef

Browse files
committed
[ItaniumABI] NFC changes
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@290677 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent b9a778b commit 715c2ef

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: lib/CodeGen/ItaniumCXXABI.cpp

+3-2
Original file line numberDiff line numberDiff line change
@@ -366,11 +366,12 @@ class ItaniumCXXABI : public CodeGen::CGCXXABI {
366366
void emitCXXStructor(const CXXMethodDecl *MD, StructorType Type) override;
367367

368368
private:
369-
bool hasAnyUsedVirtualInlineFunction(const CXXRecordDecl *RD) const {
369+
bool hasAnyVirtualInlineFunction(const CXXRecordDecl *RD) const {
370370
const auto &VtableLayout =
371371
CGM.getItaniumVTableContext().getVTableLayout(RD);
372372

373373
for (const auto &VtableComponent : VtableLayout.vtable_components()) {
374+
// Skip empty slot.
374375
if (!VtableComponent.isUsedFunctionPointerKind())
375376
continue;
376377

@@ -1687,7 +1688,7 @@ bool ItaniumCXXABI::canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const {
16871688
// then we are safe to emit available_externally copy of vtable.
16881689
// FIXME we can still emit a copy of the vtable if we
16891690
// can emit definition of the inline functions.
1690-
return !hasAnyUsedVirtualInlineFunction(RD) && !isVTableHidden(RD);
1691+
return !hasAnyVirtualInlineFunction(RD) && !isVTableHidden(RD);
16911692
}
16921693
static llvm::Value *performTypeAdjustment(CodeGenFunction &CGF,
16931694
Address InitialPtr,

0 commit comments

Comments
 (0)