aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Mitchell <mark@codesourcery.com>2001-04-03 23:37:53 +0000
committerMark Mitchell <mmitchel@gcc.gnu.org>2001-04-03 23:37:53 +0000
commit92788413ad4c6769b91a7da55253be0f1ae4571e (patch)
tree433f4e46bc016e6ff1deaece2134f220fbacf134
parentcf54a76769cc64a792e48c2a87db2b48428cab41 (diff)
downloadgcc-92788413ad4c6769b91a7da55253be0f1ae4571e.zip
gcc-92788413ad4c6769b91a7da55253be0f1ae4571e.tar.gz
gcc-92788413ad4c6769b91a7da55253be0f1ae4571e.tar.bz2
decl2.c (import_export_decl): Don't call import_export_class when processing an inline member function.
* decl2.c (import_export_decl): Don't call import_export_class when processing an inline member function. * semantics.c (expand_body): Call import_export_decl before emitting inline functions. From-SVN: r41066
-rw-r--r--gcc/cp/ChangeLog7
-rw-r--r--gcc/cp/decl2.c30
-rw-r--r--gcc/cp/semantics.c5
3 files changed, 28 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 0db7144..6439776 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,10 @@
+2001-04-03 Mark Mitchell <mark@codesourcery.com>
+
+ * decl2.c (import_export_decl): Don't call import_export_class
+ when processing an inline member function.
+ * semantics.c (expand_body): Call import_export_decl before
+ emitting inline functions.
+
2001-03-28 Richard Henderson <rth@redhat.com>
IA-64 ABI Exception Handling:
diff --git a/gcc/cp/decl2.c b/gcc/cp/decl2.c
index 35c8ca7..38db639 100644
--- a/gcc/cp/decl2.c
+++ b/gcc/cp/decl2.c
@@ -2672,21 +2672,23 @@ import_export_decl (decl)
}
else if (DECL_FUNCTION_MEMBER_P (decl))
{
- tree ctype = DECL_CONTEXT (decl);
- import_export_class (ctype);
- if (CLASSTYPE_INTERFACE_KNOWN (ctype)
- && ! DECL_THIS_INLINE (decl))
+ if (!DECL_THIS_INLINE (decl))
{
- DECL_NOT_REALLY_EXTERN (decl)
- = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
- || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
- && !DECL_VINDEX (decl)));
-
- /* Always make artificials weak. */
- if (DECL_ARTIFICIAL (decl) && flag_weak)
- comdat_linkage (decl);
- else
- maybe_make_one_only (decl);
+ tree ctype = DECL_CONTEXT (decl);
+ import_export_class (ctype);
+ if (CLASSTYPE_INTERFACE_KNOWN (ctype))
+ {
+ DECL_NOT_REALLY_EXTERN (decl)
+ = ! (CLASSTYPE_INTERFACE_ONLY (ctype)
+ || (DECL_THIS_INLINE (decl) && ! flag_implement_inlines
+ && !DECL_VINDEX (decl)));
+
+ /* Always make artificials weak. */
+ if (DECL_ARTIFICIAL (decl) && flag_weak)
+ comdat_linkage (decl);
+ else
+ maybe_make_one_only (decl);
+ }
}
else
comdat_linkage (decl);
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 6990e2c..ced8c51 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2448,6 +2448,11 @@ expand_body (fn)
return;
}
+ /* Compute the appropriate object-file linkage for inline
+ functions. */
+ if (DECL_INLINE (fn))
+ import_export_decl (fn);
+
/* Emit any thunks that should be emitted at the same time as FN. */
emit_associated_thunks (fn);