Chris Lattner
2005-Apr-22 05:13 UTC
[LLVMdev] isa and friends as an alternative to dynamic cast?
On Thu, 21 Apr 2005, Jeff Cohen wrote:> That's a good point.I think there are some issues with doing this (e.g. EH doesn't work, so the very few places we use it would have to be modified), but other than that I fully support the idea. -Chris> Evan Jones wrote: > >> On Thu, 2005-21-04 at 19:43 -0700, Reid Spencer wrote: >> >>> In case it wasn't obvious from Misha's answer, the main reason for >>> doing this is speed. RTTI is not very quick. >>> >> >> Right. This is why I was somewhat suprized to see the "isa" facilities >> included in LLVM without also disabling rtti. It will reduce the memory >> footprint a fair bit if you do disable it, at least based on my >> experience with other C++ projects. >> >> Evan Jones >> >> >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >> >> >> > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev >-Chris -- http://nondot.org/sabre/ http://llvm.cs.uiuc.edu/
Jeff Cohen
2005-Apr-24 02:46 UTC
[LLVMdev] isa and friends as an alternative to dynamic cast?
This may be the case with GCC, but VC++ allows exception handling to be enabled while RTTI is disabled. According to VC++ documentation, RTTI is needed only to support dynamic_cast, the typeid operator, and the type_info class. Chris Lattner wrote:> On Thu, 21 Apr 2005, Jeff Cohen wrote: > >> That's a good point. > > > I think there are some issues with doing this (e.g. EH doesn't work, > so the very few places we use it would have to be modified), but other > than that I fully support the idea. > > -Chris
Jeff Cohen
2005-Apr-24 03:12 UTC
[LLVMdev] isa and friends as an alternative to dynamic cast?
As far as I can tell, exceptions work just fine without RTTI when using gcc 3.4.2. dynamic_cast, on the hand, crashes without RTTI (no compilation error or warning is generated). Jeff Cohen wrote:> This may be the case with GCC, but VC++ allows exception handling to > be enabled while RTTI is disabled. According to VC++ documentation, > RTTI is needed only to support dynamic_cast, the typeid operator, and > the type_info class. > > Chris Lattner wrote: > >> On Thu, 21 Apr 2005, Jeff Cohen wrote: >> >>> That's a good point. >> >> >> >> I think there are some issues with doing this (e.g. EH doesn't work, >> so the very few places we use it would have to be modified), but >> other than that I fully support the idea. >> >> -Chris > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://mail.cs.uiuc.edu/mailman/listinfo/llvmdev > >
Apparently Analagous Threads
- [LLVMdev] isa and friends as an alternative to dynamic cast?
- [LLVMdev] isa and friends as an alternative to dynamic cast?
- [LLVMdev] isa and friends as an alternative to dynamic cast?
- [LLVMdev] isa and friends as an alternative to dynamic cast?
- RuntimeDyLdCOFF and RTTI on Windows