[llvm] r206375 - [LCG] Stop playing fast and loose with reference members and assignment.

Chandler Carruth chandlerc at gmail.com
Thu Apr 17 00:35:37 PDT 2014


On Wed, Apr 16, 2014 at 4:13 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> On 2014-Apr-16, at 4:14, Chandler Carruth <chandlerc at gmail.com> wrote:
>
> > Author: chandlerc
> > Date: Wed Apr 16 06:14:28 2014
> > New Revision: 206375
> >
> > URL: http://llvm.org/viewvc/llvm-project?rev=206375&view=rev
> > Log:
> > [LCG] Stop playing fast and loose with reference members and assignment.
> > It doesn't work. I'm still cleaning up all the places where I blindly
> > followed this pattern. There are more to come in this code too.
> >
> > As a benefit, this lets the default copy and move operations Just Work.
> >
> > Modified:
> >    llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
> >
> > Modified: llvm/trunk/include/llvm/Analysis/LazyCallGraph.h
> > URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/LazyCallGraph.h?rev=206375&r1=206374&r2=206375&view=diff
> >
> ==============================================================================
> > --- llvm/trunk/include/llvm/Analysis/LazyCallGraph.h (original)
> > +++ llvm/trunk/include/llvm/Analysis/LazyCallGraph.h Wed Apr 16 06:14:28
> 2014
> > @@ -119,25 +119,18 @@ public:
> >     /// \brief Nonce type to select the constructor for the end iterator.
> >     struct IsAtEndT {};
> >
> > -    LazyCallGraph &G;
> > +    LazyCallGraph *G;
>
> Is it useful to add a default constructor?  It's feasible now.


I don't currently have a use case for that. *all* of the constructors are
private, and only accessible via the friend classes' begin and end methods.

Certainly, if it comes up, adding one would be fine IMO.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140417/c603bfb7/attachment.html>


More information about the llvm-commits mailing list