[LLVMdev] LLVM custom dynamic casting mechanism
arcata at gmail.com
Sat Mar 16 07:29:10 PDT 2013
On Saturday, March 16, 2013, Nicola Gigante wrote:
> I'm new to this list (but I've been already following cfe-dev), so hello
> 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).
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:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev