[LLVMdev] dyn_cast vs. dynamic_cast
Trevor Harmon
Trevor.W.Harmon at nasa.gov
Fri Nov 12 17:36:45 PST 2010
LLVM has a relatively large number of proprietary replacements for
standard C++ functions and classes. One of these is dyn_cast to
replace dynamic_cast. The two calls appear to be semantically
equivalent; the only difference that I can see is that dyn_cast
reportedly works on classes that have no v-table [1]. Could someone
please explain why I should use dyn_cast instead of dynamic_cast? (I
thought all classes have v-tables...) Thanks,
Trevor
[1] http://llvm.org/docs/ProgrammersManual.html#isa
More information about the llvm-dev
mailing list