[cfe-commits] r90327 - in /cfe/trunk: include/clang/AST/DeclCXX.h lib/AST/DeclCXX.cpp lib/AST/RecordLayoutBuilder.cpp lib/Sema/Sema.h lib/Sema/SemaDecl.cpp lib/Sema/SemaDeclCXX.cpp lib/Sema/SemaExprCXX.cpp test/SemaCXX/implicit-virtual-member-functions.cpp

Fariborz Jahanian fjahanian at apple.com
Wed Dec 2 09:39:52 PST 2009


On Dec 2, 2009, at 9:15 AM, Anders Carlsson wrote:

> Author: andersca
> Date: Wed Dec  2 11:15:43 2009
> New Revision: 90327
>
> URL: http://llvm.org/viewvc/llvm-project?rev=90327&view=rev
> Log:
> In Sema, whenever we think that a function is going to cause a  
> vtable to be generated, we mark any virtual implicit member  
> functions as referenced.
>
> Added:
>
> +void Sema::MaybeMarkVirtualImplicitMembersReferenced(SourceLocation  
> Loc,
> +                                                     CXXMethodDecl  
> *MD) {
> +  // Ignore dependent types.
> +  if (MD->isDependentContext())
> +    return;
> +
> +  CXXRecordDecl *RD = MD->getParent();
> +  const ASTRecordLayout &Layout = Context.getASTRecordLayout(RD);

This, I believe, is the first use of getASTRecordLayout in Sema. Is  
there any other way to get the
key function without resorting to this overhead?

- Fariborz

>



More information about the cfe-commits mailing list