aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorRainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>2011-08-18 14:47:46 +0000
committerRainer Orth <ro@gcc.gnu.org>2011-08-18 14:47:46 +0000
commit5b880ea61c107da98ea87a5ffad4520445d60007 (patch)
tree15183626c4d31ca839660bc4750300b8ed0ef58d /gcc/cp/mangle.c
parent901ebcdf97fefd24e464f98593bfa6dc741d4525 (diff)
downloadgcc-5b880ea61c107da98ea87a5ffad4520445d60007.zip
gcc-5b880ea61c107da98ea87a5ffad4520445d60007.tar.gz
gcc-5b880ea61c107da98ea87a5ffad4520445d60007.tar.bz2
Keep tm, div_t, ldiv_t, lconv mangling on Solaris (PR libstdc++-v3/1773)
Co-Authored-By: Marc Glisse <marc.glisse@normalesup.org> From-SVN: r177863
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index eb3f144..53d4bc6 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -747,6 +747,11 @@ write_encoding (const tree decl)
static tree
decl_mangling_context (tree decl)
{
+ tree tcontext = targetm.cxx.decl_mangling_context (decl);
+
+ if (tcontext != NULL_TREE)
+ return tcontext;
+
if (TREE_CODE (decl) == TYPE_DECL
&& LAMBDA_TYPE_P (TREE_TYPE (decl)))
{
@@ -857,7 +862,7 @@ write_name (tree decl, const int ignore_local_scope)
static void
write_unscoped_name (const tree decl)
{
- tree context = CP_DECL_CONTEXT (decl);
+ tree context = decl_mangling_context (decl);
MANGLE_TRACE_TREE ("unscoped-name", decl);