[cfe-commits] [Request for approval] Allow clang library applications to get specializations

Peter Collingbourne peter at pcc.me.uk
Fri Jul 30 08:55:43 PDT 2010


On Tue, Jul 27, 2010 at 10:29:14PM +0300, Argyrios Kyrtzidis wrote:
> On Jul 27, 2010, at 10:17 PM, Peter Collingbourne wrote:
> > On Tue, Jul 27, 2010 at 10:00:24PM +0300, Argyrios Kyrtzidis wrote:
> >> On Jul 27, 2010, at 9:55 PM, Peter Collingbourne wrote:
> >>> Another possibility would be to expose an iterator
> >>> specs_begin()..specs_end() over the set of specialisations.  This way
> >>> we don't need to copy the vector and the client still doesn't need
> >>> to care how the specialisation list is stored.
> >>
> >> Sounds good. I'd suggest that the iterator is a class wrapping the FoldingSet's iterator and making sure to return the latest redeclaration, what do you think ?
> > 
> > Agreed.  For consistency we can also have the FunctionTemplateDecl's
> > specialisation iterator produce FunctionDecls instead of
> > FunctionTemplateSpecializationInfos.
> 
> Yes, that'd be great.

Done, please see the attached patches.  I also decided to include
some refactoring for the find*Specialization member functions.
OK to commit?

Thanks,
-- 
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Introduce-RedeclarableTemplateDecl-SpecEntryTraits.patch
Type: text/x-diff
Size: 1589 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100730/e07db3af/attachment.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Refactor-find-Specialization-functions-using-SpecEnt.patch
Type: text/x-diff
Size: 4454 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100730/e07db3af/attachment-0001.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-Add-specialisation-iterators-for-Class-Function-Temp.patch
Type: text/x-diff
Size: 3930 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20100730/e07db3af/attachment-0002.patch>


More information about the cfe-commits mailing list