[PATCH] D21580: IR: Introduce Module::global_objects().

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 22 11:44:32 PDT 2016


On Wed, Jun 22, 2016 at 11:36 AM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> On 22 June 2016 at 12:37, Peter Collingbourne <peter at pcc.me.uk> wrote:
> > pcc added inline comments.
> >
> > ================
> > Comment at: include/llvm/IR/Module.h:610
> > @@ -609,1 +609,3 @@
> >
> > +  template<class IType, class GIType, class GOType, class MType>
> > +  class global_object_iterator_t {
> > ----------------
> > rafael wrote:
> >> Why do you need the template?
> >>
> >> MType is always Module, for example.
> > It may be either `Module` or `const Module`. The other parameters are
> similar (see `{,const_}global_object_iterator` below).
>
> Is that the preferred way to do it? I see that DenseMap has a "bool
> IsConst" template parameter. It is a bit more verbose but less
> confusing IMHO.
>

I see. Agreed, I'll make that change then.

Thanks,
-- 
-- 
Peter
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160622/57e07921/attachment.html>


More information about the llvm-commits mailing list