aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/mangle.c
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2000-08-23 17:12:23 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2000-08-23 17:12:23 +0000
commit94350948fbd3d9e2157f2e39903c78ca0661a25b (patch)
tree3b18de0b9496900a925203d22eada82d35fb45e4 /gcc/cp/mangle.c
parente282c9c9f5ab1e633571d3ded6e15a81beb690cc (diff)
downloadgcc-94350948fbd3d9e2157f2e39903c78ca0661a25b.zip
gcc-94350948fbd3d9e2157f2e39903c78ca0661a25b.tar.gz
gcc-94350948fbd3d9e2157f2e39903c78ca0661a25b.tar.bz2
cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
* cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC. * mangle.c (write_function_type): Change prototype. (write_encoding): Don't mangle return types for constructors or destructors. (write_type): Adjust call to write_function_type. * pt.c (instantiate_template): Instantiate alternate entry points when instantiating the main function. From-SVN: r35916
Diffstat (limited to 'gcc/cp/mangle.c')
-rw-r--r--gcc/cp/mangle.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/gcc/cp/mangle.c b/gcc/cp/mangle.c
index c5601185..9ca7178 100644
--- a/gcc/cp/mangle.c
+++ b/gcc/cp/mangle.c
@@ -166,7 +166,7 @@ static void write_special_name_destructor PARAMS ((tree));
static void write_type PARAMS ((tree));
static int write_CV_qualifiers_for_type PARAMS ((tree));
static void write_builtin_type PARAMS ((tree));
-static void write_function_type PARAMS ((tree, int));
+static void write_function_type PARAMS ((tree));
static void write_bare_function_type PARAMS ((tree, int));
static void write_method_parms PARAMS ((tree, int));
static void write_class_enum_type PARAMS ((tree));
@@ -640,7 +640,10 @@ write_encoding (decl)
else
fn_type = TREE_TYPE (decl);
- write_bare_function_type (fn_type, decl_is_template_id (decl, NULL));
+ write_bare_function_type (fn_type,
+ (!DECL_CONSTRUCTOR_P (decl)
+ && !DECL_DESTRUCTOR_P (decl)
+ && decl_is_template_id (decl, NULL)));
}
}
@@ -1247,7 +1250,7 @@ write_type (type)
case FUNCTION_TYPE:
case METHOD_TYPE:
- write_function_type (type, 1);
+ write_function_type (type);
break;
case UNION_TYPE:
@@ -1431,15 +1434,14 @@ write_builtin_type (type)
}
/* Non-terminal <function-type>. NODE is a FUNCTION_TYPE or
- METHOD_TYPE. If INCLUDE_RETURN_TYPE is non-zero, the return type
- is mangled before the parameter types.
+ METHOD_TYPE. The return type is mangled before the parameter
+ types.
<function-type> ::= F [Y] <bare-function-type> E */
static void
-write_function_type (type, include_return_type)
+write_function_type (type)
tree type;
- int include_return_type;
{
MANGLE_TRACE_TREE ("function-type", type);
@@ -1456,7 +1458,7 @@ write_function_type (type, include_return_type)
extern "C" function_t f; // Vice versa.
See [dcl.link]. */
- write_bare_function_type (type, include_return_type);
+ write_bare_function_type (type, /*include_return_type_p=*/1);
write_char ('E');
}