This patch extracts the RTTI part of llvm::ErrorInfo into its own class
(RTTIExtends) so that it can be used in other non-error hierarchies, and makes
it compatible with the existing LLVM RTTI function templates (isa, cast,
dyn_cast, dyn_cast_or_null) by adding the classof method.
Differential Revision: https://reviews.llvm.org/D39111
Before we learned about :doc:, we used :ref: and put a dummy link at the
top of each page. Don't do that anymore.
This fixes PR14891 as a special case.
llvm-svn: 172162
* Fix confusing explanation regarding abstract classes.
* Clarify auto-upcasting and why `Shape` doesn't need a `classof()`.
* Add section `Rules of Thumb` with some quick summary tips.
llvm-svn: 165768
Recent changes to isa<>/dyn_cast<> have made unnecessary those classof()
of the form:
static bool classof(const Foo *) { return true; }
Accordingly, remove mention of such classof() from the documentation.
llvm-svn: 165766
This document describes how to set up LLVM-style RTTI for a class
hierarchy. Surprisingly, this was not previously documented.
Also, link it into ProgrammersManual.html.
llvm-svn: 165293