diff options
Diffstat (limited to 'lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | lib/CodeGen/CGExprCXX.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/CGExprCXX.cpp b/lib/CodeGen/CGExprCXX.cpp index 5521c0f8ce..9ce90c0ce8 100644 --- a/lib/CodeGen/CGExprCXX.cpp +++ b/lib/CodeGen/CGExprCXX.cpp @@ -63,14 +63,14 @@ static bool canDevirtualizeMemberFunctionCalls(ASTContext &Context, if (Context.getLangOptions().AppleKext) return false; - // If the member function has the "final" attribute, we know that it can't be + // If the member function is marked 'final', we know that it can't be // overridden and can therefore devirtualize it. - if (MD->hasAttr<FinalAttr>()) + if (MD->isMarkedFinal()) return true; - // Similarly, if the class itself has the "final" attribute it can't be - // overridden and we can therefore devirtualize the member function call. - if (MD->getParent()->hasAttr<FinalAttr>()) + // Similarly, if the class itself is marked 'final' it can't be overridden + // and we can therefore devirtualize the member function call. + if (MD->getParent()->isMarkedFinal()) return true; if (const DeclRefExpr *DRE = dyn_cast<DeclRefExpr>(Base)) { |