[LLVMdev] Casting.h illness
Gabor Greif
gabor at mac.com
Thu Jul 22 10:57:40 PDT 2010
Am 22.07.2010 um 00:21 schrieb Chris Lattner:
> On Jul 21, 2010, at 12:49 PM, Eugene Toder wrote:
>> Is this a recommended approach/good style/good idea to use
>> dyn_cast_or_null<X>(I) instead of dyn_cast_or_null<X>(*I)? (And other
>> is and cast functions).
>
> We generally don't want auto-dereference. There is some special
> magic for unwrapping Uses etc though. Is this what you're in
> contact with Gabor?
>
> -Chris
>
I agree with Chris, that auto-dereferencing is a bad thing (esp.
because of the gothcas I detailed).
I checked in a bunch of fixes to remove auto-dereferencing.
Maybe we should get rid of the type simplifier for (const_)
use_iterator? Sabre what do you think?
There is one thing that is still irritating me:
dyn_cast_or_null and cast_or_null have different interfaces. Should
these be made consistent?
Cheers,
Gabor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100722/5dc6bed9/attachment.html>
More information about the llvm-dev
mailing list