From f89e0424b8903438179f4a2f16dddd5e5bdc814e Mon Sep 17 00:00:00 2001 From: Anders Carlsson Date: Sun, 23 Jan 2011 21:07:30 +0000 Subject: Get rid of the [[final]] C++0x attribute. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@124083 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/CGExprCXX.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/CodeGen/CGExprCXX.cpp') 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()) + 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()) + // 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(Base)) { -- cgit v1.2.3