[llvm-commits] CallbackVH implementation

Chris Lattner clattner at apple.com
Sat May 2 13:32:25 PDT 2009


On May 2, 2009, at 1:13 PM, Dan Gohman wrote:

> This is really useful. In a local tree I've converted the
> ScalarEvolution
> analysis to use CallbackVH and it works quite well.  It allows makes
> some really tricky code that handled some involved
> ReplaceAllUsesWith situations simply unnecessary :-).
>
> Can CallbackVH's copy constructor be made protected instead of
> public? That ought to limit the range of possible trouble at least.   
> The
> destructor can probably also be protected.

That makes sense to me.  Dan, if you want to build on it, please feel  
free to commit the callbackvh patch for Jeffrey,

-Chris

>
>
> Thanks,
>
> Dan
>
> On Apr 29, 2009, at 4:24 PM, Jeffrey Yasskin wrote:
>
>> Let me know if you had different names or an entirely different
>> interface in mind.
>>
>> I'm a little skeptical of the public copy constructor on CallbackVH,
>> since it'll slice off any subclass-specific data, but that may not be
>> a big deal in actual use.
>>
>> Jeffrey
>> <CallbackVH.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list