aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog8
-rw-r--r--gcc/cp/mangle.c7
2 files changed, 14 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index f95040f..f0c0193 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,11 @@
+2011-08-18 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ Marc Glisse <marc.glisse@normalesup.org>
+
+ PR libstdc++-v3/1773
+ * mangle.c (decl_mangling_context): Call
+ targetm.cxx.decl_mangling_context.
+ (write_unscoped_name): Use decl_mangling_context.
+
2011-08-18 Dodji Seketeli <dodji@redhat.com>
PR c++/45625
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);