This patch changes the wording of two errors to make them more generic.
An attempt to use dynamic_cast while rtti is disabled, curently emits the error:
cannot use dynamic_cast with -fno-rtti
and a similar one for typeid.
This patch proposes to change that to:
use of dynamic_cast requires enabling RTTI
For targets where the default mode of RTTI is disabled, the current error
message is confusing because the user never used the -fno-rtti option.
This proposal is motivated by the PS4 compiler, whose default is to have RTTI
disabled. However, it is just as clear as the existing diagnostic, and it
may be applicable to other llvm compilers having the have the same default as the
PS4 compiler. It is also more appropriate in cases where the spelling of the
argument (to disable RTTI) is something other than -fno-rtti (for
example, /GR- is the switch to disable RTTI for cl).