decl2.c (import_export_class): Never export/import vtables with inline key functions.
* decl2.c (import_export_class): Never export/import vtables with inline key functions. From-SVN: r84493
This commit is contained in:
parent
8242b64a88
commit
30bf22a0ee
2 changed files with 13 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-07-10 Mike Stump <mrs@apple.com>
|
||||
|
||||
* decl2.c (import_export_class): Never export/import vtables
|
||||
with inline key functions.
|
||||
|
||||
2004-07-09 Steven Bosscher <stevenb@suse.de>
|
||||
|
||||
* typeck.c (c_expand_asm_operands): Remove.
|
||||
|
|
|
@ -1501,7 +1501,14 @@ import_export_class (tree ctype)
|
|||
&& TYPE_POLYMORPHIC_P (ctype))
|
||||
{
|
||||
tree method = CLASSTYPE_KEY_METHOD (ctype);
|
||||
if (method)
|
||||
|
||||
/* If weak symbol support is not available, then we must be
|
||||
careful not to emit the vtable when the key function is
|
||||
inline. An inline function can be defined in multiple
|
||||
translation units. If we were to emit the vtable in each
|
||||
translation unit containing a definition, we would get
|
||||
multiple definition errors at link-time. */
|
||||
if (method && (flag_weak || ! DECL_DECLARED_INLINE_P (method)))
|
||||
import_export = (DECL_REALLY_EXTERN (method) ? -1 : 1);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue