aboutsummaryrefslogtreecommitdiff
path: root/gcc/lto-cgraph.c
diff options
context:
space:
mode:
authorIlya Enkovich <ilya.enkovich@intel.com>2015-05-15 09:48:13 +0000
committerIlya Enkovich <ienkovich@gcc.gnu.org>2015-05-15 09:48:13 +0000
commit2662516181b774ace565b4672cfe3cd32728cd7c (patch)
treed72c875913b9711c25ff4f0e8c52dae658108ccc /gcc/lto-cgraph.c
parent2c1f37b57aa599b80d3be5feb8be12db1f6441c6 (diff)
downloadgcc-2662516181b774ace565b4672cfe3cd32728cd7c.zip
gcc-2662516181b774ace565b4672cfe3cd32728cd7c.tar.gz
gcc-2662516181b774ace565b4672cfe3cd32728cd7c.tar.bz2
ipa-chkp.h (chkp_wrap_function): New.
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. From-SVN: r223216
Diffstat (limited to 'gcc/lto-cgraph.c')
-rw-r--r--gcc/lto-cgraph.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/lto-cgraph.c b/gcc/lto-cgraph.c
index ac50e4b..b306c28 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);
+ }
}
}