[LLVMdev] dyn_cast vs. dynamic_cast
Chris Lattner
clattner at apple.com
Sat Nov 13 11:49:15 PST 2010
On Nov 12, 2010, at 5:57 PM, Óscar Fuentes wrote:
> Trevor Harmon <Trevor.W.Harmon at nasa.gov> writes:
>
> [snip]
>> Could someone
>> please explain why I should use dyn_cast instead of dynamic_cast? (I
>> thought all classes have v-tables...) Thanks,
>
> For reducing executable size, LLVM builds with RTTI disabled where
> possible.
dyn_cast is also much much faster than dynamic_cast, which is really important because llvm uses dyn_cast all over the place.
-Chris
More information about the llvm-dev
mailing list