On Dec 2, 2009, at 9:39 AM, Fariborz Jahanian wrote: > > 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?
We do use getASTRecordLayout for sizeof, alignof and __builtin_offsetof already. We could put the key functions in a separate map, but I don't think it's worth it. Anders
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
