diff options
author | Bin Cheng <bin.cheng@linux.alibaba.com> | 2018-12-10 06:54:02 +0000 |
---|---|---|
committer | Bin Cheng <amker@gcc.gnu.org> | 2018-12-10 06:54:02 +0000 |
commit | 395bc8ad4b750607b040653ef1c799d18296e3ff (patch) | |
tree | 3bb05fba413cf3b42727d49e2914f6bfbe72b1fc /gcc | |
parent | a0abdf22b836f53a9ec943702734c039ac3488bd (diff) | |
download | gcc-395bc8ad4b750607b040653ef1c799d18296e3ff.zip gcc-395bc8ad4b750607b040653ef1c799d18296e3ff.tar.gz gcc-395bc8ad4b750607b040653ef1c799d18296e3ff.tar.bz2 |
* auto-profile.c (string_table::get_index_by_decl)
(function_instance::get_function_instance_by_decl): Avoid infinite
recursion by using DECL_FROM_INLINE.
From-SVN: r266942
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/auto-profile.c | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3711cf8..6ac767e 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-12-10 Bin Cheng <bin.cheng@linux.alibaba.com> + + * auto-profile.c (string_table::get_index_by_decl) + (function_instance::get_function_instance_by_decl): Avoid infinite + recursion by using DECL_FROM_INLINE. + 2018-12-09 John David Anglin <danglin@gcc.gnu.org> * config.gcc (hppa*-*-linux*): Add pa/t-pa to tmake_file. Define diff --git a/gcc/auto-profile.c b/gcc/auto-profile.c index f7ba32c..9316f4c 100644 --- a/gcc/auto-profile.c +++ b/gcc/auto-profile.c @@ -470,7 +470,7 @@ string_table::get_index_by_decl (tree decl) const ret = get_index (lang_hooks.dwarf_name (decl, 0)); if (ret != -1) return ret; - if (DECL_ABSTRACT_ORIGIN (decl) && DECL_ABSTRACT_ORIGIN (decl) != decl) + if (DECL_FROM_INLINE (decl)) return get_index_by_decl (DECL_ABSTRACT_ORIGIN (decl)); return -1; @@ -537,7 +537,7 @@ function_instance::get_function_instance_by_decl (unsigned lineno, if (ret != callsites.end ()) return ret->second; } - if (DECL_ABSTRACT_ORIGIN (decl)) + if (DECL_FROM_INLINE (decl)) return get_function_instance_by_decl (lineno, DECL_ABSTRACT_ORIGIN (decl)); return NULL; |