diff options
author | ienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-15 09:48:13 +0000 |
---|---|---|
committer | ienkovich <ienkovich@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-05-15 09:48:13 +0000 |
commit | 9664a7783c9891c38e93c152d014730ac3073e29 (patch) | |
tree | d72c875913b9711c25ff4f0e8c52dae658108ccc /gcc/lto-cgraph.c | |
parent | d86dfeae72d25ab41a4e9fbdeaedda0a4f64611b (diff) | |
download | gcc-9664a7783c9891c38e93c152d014730ac3073e29.tar.gz |
gcc/
* ipa-chkp.h (chkp_wrap_function): New.
* ipa-chkp.c (chkp_wrap_function): Remove 'static'.
(chkp_wrap_function_name): New.
(chkp_build_instrumented_fndecl): Use chkp_wrap_function_name
to get wrapper name.
* lto-cgraph.c: Include ipa-chkp.h.
(input_cgraph_1): Avoid alias chain for wrappers.
gcc/testsuite/
* gcc.dg/lto/chkp-wrap-asm-name_0.c: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223216 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r-- | gcc/lto-cgraph.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c index ac50e4bbd24..b306c28d37b 100644 --- a/gcc/lto-cgraph.c +++ b/gcc/lto-cgraph.c @@ -80,6 +80,7 @@ along with GCC; see the file COPYING3. If not see #include "pass_manager.h" #include "ipa-utils.h" #include "omp-low.h" +#include "ipa-chkp.h" /* True when asm nodes has been output. */ bool asm_nodes_output = false; @@ -1616,10 +1617,13 @@ input_cgraph_1 (struct lto_file_decl_data *file_data, cnode->instrumented_version->instrumented_version = cnode; } - /* Restore decl names reference. */ - IDENTIFIER_TRANSPARENT_ALIAS (DECL_ASSEMBLER_NAME (cnode->decl)) = 1; - TREE_CHAIN (DECL_ASSEMBLER_NAME (cnode->decl)) - = DECL_ASSEMBLER_NAME (cnode->orig_decl); + /* Restore decl names reference except for wrapper functions. */ + if (!chkp_wrap_function (cnode->orig_decl)) + { + tree name = DECL_ASSEMBLER_NAME (cnode->decl); + IDENTIFIER_TRANSPARENT_ALIAS (name) = 1; + TREE_CHAIN (name) = DECL_ASSEMBLER_NAME (cnode->orig_decl); + } } } |