forked from OSchip/llvm-project
[NFC][unwind] Improve error message when a type has more than one RTTIs
The "dynamic_cast error 2" error can apparently happen when the same type (with RTTI) is defined in more than one translation unit, and those translation units are linked together. This is technically an ODR violation, but making the error message more obvious is still helpful. llvm-svn: 344052
This commit is contained in:
parent
22cccffa06
commit
dd1bed11d8
|
@ -674,7 +674,8 @@ __dynamic_cast(const void *static_ptr, const __class_type_info *static_type,
|
|||
info.path_dynamic_ptr_to_static_ptr == unknown)
|
||||
{
|
||||
syslog(LOG_ERR, "dynamic_cast error 2: One or more of the following type_info's "
|
||||
"has hidden visibility. They should all have public visibility. "
|
||||
"has hidden visibility or is defined in more than one translation "
|
||||
"unit. They should all have public visibility. "
|
||||
"%s, %s, %s.\n", static_type->name(), dynamic_type->name(),
|
||||
dst_type->name());
|
||||
// Redo the search comparing type_info's using strcmp
|
||||
|
|
Loading…
Reference in New Issue