LLVM custom dynamic casting mechanism


I'm new to this list (but I've been already following cfe-dev), so hello everybody.

Is there some piece of documentation on how the custom dyn_cast<> work?
I'm using LLVM as the backend for an experimental compiler and I want to make it
work for my own classes in the front-end (clang also does this afaik).

Thank you,

You provide dyn_cast support by implementing a static ‘classof’ method in every class of your hierarchy. This document describes how to implement LLVM’s casting operators in detail: http://llvm.org/docs/HowToSetUpLLVMStyleRTTI.html