ipa-devirt.c (maybe_record_node): Ignore all non-methods (including cxa_pure_virtual).
* ipa-devirt.c (maybe_record_node): Ignore all non-methods (including cxa_pure_virtual). From-SVN: r209391
This commit is contained in:
parent
9dba4b5565
commit
88f592e3f4
2 changed files with 15 additions and 8 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2014-04-14 Jan Hubicka <hubicka@ucw.cz>
|
||||||
|
|
||||||
|
* ipa-devirt.c (maybe_record_node): Ignore all non-methods (including
|
||||||
|
cxa_pure_virtual).
|
||||||
|
|
||||||
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
|
2014-04-14 Paolo Carlini <paolo.carlini@oracle.com>
|
||||||
|
|
||||||
* tree.h (TYPE_IDENTIFIER): Declare.
|
* tree.h (TYPE_IDENTIFIER): Declare.
|
||||||
|
|
|
@ -611,7 +611,12 @@ maybe_record_node (vec <cgraph_node *> &nodes,
|
||||||
bool *completep)
|
bool *completep)
|
||||||
{
|
{
|
||||||
struct cgraph_node *target_node;
|
struct cgraph_node *target_node;
|
||||||
enum built_in_function fcode;
|
|
||||||
|
/* cxa_pure_virtual and __builtin_unreachable do not need to be added into
|
||||||
|
list of targets; the runtime effect of calling them is undefined.
|
||||||
|
Only "real" virtual methods should be accounted. */
|
||||||
|
if (target && TREE_CODE (TREE_TYPE (target)) != METHOD_TYPE)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!can_refer)
|
if (!can_refer)
|
||||||
{
|
{
|
||||||
|
@ -624,17 +629,14 @@ maybe_record_node (vec <cgraph_node *> &nodes,
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target
|
if (!target)
|
||||||
/* Those are used to mark impossible scenarios. */
|
|
||||||
|| (fcode = DECL_FUNCTION_CODE (target))
|
|
||||||
== BUILT_IN_UNREACHABLE
|
|
||||||
|| fcode == BUILT_IN_TRAP)
|
|
||||||
return;
|
return;
|
||||||
|
|
||||||
target_node = cgraph_get_node (target);
|
target_node = cgraph_get_node (target);
|
||||||
|
|
||||||
if (target_node != NULL
|
if (target_node != NULL
|
||||||
&& (TREE_PUBLIC (target)
|
&& ((TREE_PUBLIC (target)
|
||||||
|
|| DECL_EXTERNAL (target))
|
||||||
|| target_node->definition)
|
|| target_node->definition)
|
||||||
&& symtab_real_symbol_p (target_node))
|
&& symtab_real_symbol_p (target_node))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue