GCC Bugzilla – Attachment 20663 Details for
Bug 43601
Enormous increase in DLL object files size in 4.5
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
don't emit dllexport'd inline functions
fix-bloat.diff (text/plain), 1.75 KB, created by
boqun li
on 2010-05-15 09:31:19 UTC
(
hide
)
Description:
don't emit dllexport'd inline functions
Filename:
MIME Type:
Creator:
boqun li
Created:
2010-05-15 09:31:19 UTC
Size:
1.75 KB
patch
obsolete
>--- gcc/tree.c 2010-04-02 00:18:08 +0800 revert some code to gcc-4.5-20090521, don't emit exported inline functions >+++ gcc/tree-2.c 2010-05-14 22:56:44 +0800 >@@ -5377,11 +5377,6 @@ > if (*no_add_attrs == false) > DECL_DLLIMPORT_P (node) = 1; > } >- else if (TREE_CODE (node) == FUNCTION_DECL >- && DECL_DECLARED_INLINE_P (node)) >- /* An exported function, even if inline, must be emitted. */ >- DECL_EXTERNAL (node) = 0; >- > /* Report error if symbol is not accessible at global scope. */ > if (!TREE_PUBLIC (node) > && (TREE_CODE (node) == VAR_DECL >--- gcc/cp/decl2.c 2010-03-24 06:29:54 +0800 >+++ gcc/cp/decl2-2.c 2010-05-14 23:00:42 +0800 >@@ -1782,10 +1782,6 @@ > || (DECL_ASSEMBLER_NAME_SET_P (decl) > && TREE_SYMBOL_REFERENCED (DECL_ASSEMBLER_NAME (decl)))) > return true; >- /* Functions marked "dllexport" must be emitted so that they are >- visible to other DLLs. */ >- if (lookup_attribute ("dllexport", DECL_ATTRIBUTES (decl))) >- return true; > /* Otherwise, DECL does not need to be emitted -- yet. A subsequent > reference to DECL might cause it to be emitted later. */ > return false; >--- gcc/cp/semantics.c 2010-04-02 02:48:34 +0800 >+++ gcc/cp/semantics-2.c 2010-05-14 23:14:04 +0800 >@@ -3447,10 +3447,8 @@ > > /* If the user wants us to keep all inline functions, then mark > this function as needed so that finish_file will make sure to >- output it later. Similarly, all dllexport'd functions must >- be emitted; there may be callers in other DLLs. */ >- if ((flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn)) >- || lookup_attribute ("dllexport", DECL_ATTRIBUTES (fn))) >+ output it later. */ >+ if (flag_keep_inline_functions && DECL_DECLARED_INLINE_P (fn)) > mark_needed (fn); > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 43601
:
20662
| 20663 |
22037
|
22038
|
22039
|
22040
|
22041
|
22042
|
22935