It's the first time I implement the helper stuff for a cast<>/isa<> magic. It'd if someone familiar with that kind of magic can have a second look just in case. Thanks, Timur http://llvm-reviews.chandlerc.com/D1807