aboutsummaryrefslogtreecommitdiffstats
path: root/gcc-4.6/gcc/cp/mangle.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc-4.6/gcc/cp/mangle.c')
-rw-r--r--gcc-4.6/gcc/cp/mangle.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/gcc-4.6/gcc/cp/mangle.c b/gcc-4.6/gcc/cp/mangle.c
index 9e9ced648..3f9996b64 100644
--- a/gcc-4.6/gcc/cp/mangle.c
+++ b/gcc-4.6/gcc/cp/mangle.c
@@ -1790,11 +1790,6 @@ write_type (tree type)
if (find_substitution (type))
return;
- /* According to the C++ ABI, some library classes are passed the
- same as the scalar type of their single member and use the same
- mangling. */
- if (TREE_CODE (type) == RECORD_TYPE && TYPE_TRANSPARENT_AGGR (type))
- type = TREE_TYPE (first_field (type));
if (write_CV_qualifiers_for_type (type) > 0)
/* If TYPE was CV-qualified, we just wrote the qualifiers; now
@@ -1814,6 +1809,12 @@ write_type (tree type)
/* See through any typedefs. */
type = TYPE_MAIN_VARIANT (type);
+ /* According to the C++ ABI, some library classes are passed the
+ same as the scalar type of their single member and use the same
+ mangling. */
+ if (TREE_CODE (type) == RECORD_TYPE && TYPE_TRANSPARENT_AGGR (type))
+ type = TREE_TYPE (first_field (type));
+
if (TYPE_PTRMEM_P (type))
write_pointer_to_member_type (type);
else