Commit 50ca694d by Jim Wilson Committed by Jim Wilson

Fix i686-pc-cygwin build failure.

	gcc/
	PR bootstrap/81521
	* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
	for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.

From-SVN: r250529
parent df7c5241
2017-07-25 Jim Wilson <jim.wilson@linaro.org> 2017-07-25 Jim Wilson <jim.wilson@linaro.org>
PR bootstrap/81521
* config/i386/winnt-cxx.c (i386_pe_adjust_class_at_definition): Look
for FUNCTION_DECLs in TYPE_FIELDS rather than TYPE_METHODS.
2017-07-25 Jim Wilson <jim.wilson@linaro.org>
* config/i386/gstabs.h: Delete. * config/i386/gstabs.h: Delete.
* config/i386/openbsd.h, config/i386/t-openbsd: Likewise. * config/i386/openbsd.h, config/i386/t-openbsd: Likewise.
......
...@@ -127,7 +127,8 @@ i386_pe_adjust_class_at_definition (tree t) ...@@ -127,7 +127,8 @@ i386_pe_adjust_class_at_definition (tree t)
for (thunk = DECL_THUNKS (member); thunk; for (thunk = DECL_THUNKS (member); thunk;
thunk = TREE_CHAIN (thunk)) thunk = TREE_CHAIN (thunk))
maybe_add_dllexport (thunk); maybe_add_dllexport (thunk);
} }
/* Check vtables */ /* Check vtables */
for (member = CLASSTYPE_VTABLES (t); for (member = CLASSTYPE_VTABLES (t);
member; member = DECL_CHAIN (member)) member; member = DECL_CHAIN (member))
...@@ -145,14 +146,11 @@ i386_pe_adjust_class_at_definition (tree t) ...@@ -145,14 +146,11 @@ i386_pe_adjust_class_at_definition (tree t)
That is just right since out-of class declarations can only be a That is just right since out-of class declarations can only be a
definition. */ definition. */
/* Check static VAR_DECL's. */ /* Check FUNCTION_DECL's and static VAR_DECL's. */
for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member)) for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL) if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllimport (member); maybe_add_dllimport (member);
else if (TREE_CODE (member) == FUNCTION_DECL)
/* Check FUNCTION_DECL's. */
for (member = TYPE_METHODS (t); member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == FUNCTION_DECL)
{ {
tree thunk; tree thunk;
maybe_add_dllimport (member); maybe_add_dllimport (member);
...@@ -161,10 +159,11 @@ i386_pe_adjust_class_at_definition (tree t) ...@@ -161,10 +159,11 @@ i386_pe_adjust_class_at_definition (tree t)
for (thunk = DECL_THUNKS (member); thunk; for (thunk = DECL_THUNKS (member); thunk;
thunk = DECL_CHAIN (thunk)) thunk = DECL_CHAIN (thunk))
maybe_add_dllimport (thunk); maybe_add_dllimport (thunk);
} }
/* Check vtables */ /* Check vtables */
for (member = CLASSTYPE_VTABLES (t); member; member = DECL_CHAIN (member)) for (member = CLASSTYPE_VTABLES (t);
member; member = DECL_CHAIN (member))
if (TREE_CODE (member) == VAR_DECL) if (TREE_CODE (member) == VAR_DECL)
maybe_add_dllimport (member); maybe_add_dllimport (member);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment