[ItaniumABI] NFC changes

llvm-svn: 290677
This commit is contained in:
Piotr Padlewski 2016-12-28 18:26:08 +00:00
parent 25bb130628
commit a587ca51d5
1 changed files with 3 additions and 2 deletions

View File

@ -366,11 +366,12 @@ public:
void emitCXXStructor(const CXXMethodDecl *MD, StructorType Type) override;
private:
bool hasAnyUsedVirtualInlineFunction(const CXXRecordDecl *RD) const {
bool hasAnyVirtualInlineFunction(const CXXRecordDecl *RD) const {
const auto &VtableLayout =
CGM.getItaniumVTableContext().getVTableLayout(RD);
for (const auto &VtableComponent : VtableLayout.vtable_components()) {
// Skip empty slot.
if (!VtableComponent.isUsedFunctionPointerKind())
continue;
@ -1687,7 +1688,7 @@ bool ItaniumCXXABI::canSpeculativelyEmitVTable(const CXXRecordDecl *RD) const {
// then we are safe to emit available_externally copy of vtable.
// FIXME we can still emit a copy of the vtable if we
// can emit definition of the inline functions.
return !hasAnyUsedVirtualInlineFunction(RD) && !isVTableHidden(RD);
return !hasAnyVirtualInlineFunction(RD) && !isVTableHidden(RD);
}
static llvm::Value *performTypeAdjustment(CodeGenFunction &CGF,
Address InitialPtr,