You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
int len;
int i;
expanded_location xloc;
+ enum tree_code code;
if (node == 0)
return;
-
- class = TREE_CODE_CLASS (TREE_CODE (node));
+
+ code = TREE_CODE (node);
+ class = TREE_CODE_CLASS (code);
/* Don't get too deep in nesting. If the user wants to see deeper,
it is easy to use the address of a lowest-level node
if (DECL_IGNORED_P (node))
fputs (" ignored", file);
if (DECL_ABSTRACT (node))
- fputs (" abstract", file);
- if (DECL_IN_SYSTEM_HEADER (node))
- fputs (" in_system_header", file);
- if (DECL_COMMON (node))
- fputs (" common", file);
+ fputs (" abstract", file);
if (DECL_EXTERNAL (node))
fputs (" external", file);
- if (DECL_WEAK (node))
- fputs (" weak", file);
- if (DECL_REGISTER (node) && TREE_CODE (node) != FIELD_DECL
- && TREE_CODE (node) != FUNCTION_DECL
- && TREE_CODE (node) != LABEL_DECL)
- fputs (" regdecl", file);
if (DECL_NONLOCAL (node))
fputs (" nonlocal", file);
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS))
+ {
+ if (DECL_WEAK (node))
+ fputs (" weak", file);
+ if (DECL_IN_SYSTEM_HEADER (node))
+ fputs (" in_system_header", file);
+ }
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL)
+ && TREE_CODE (node) != LABEL_DECL
+ && TREE_CODE (node) != FUNCTION_DECL
+ && DECL_REGISTER (node))
+ fputs (" regdecl", file);
if (TREE_CODE (node) == TYPE_DECL && TYPE_DECL_SUPPRESS_DEBUG (node))
fputs (" suppress-debug", file);
if (TREE_CODE (node) == VAR_DECL && DECL_IN_TEXT_SECTION (node))
fputs (" in-text-section", file);
- if (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL (node))
- fputs (" thread-local", file);
+ if (TREE_CODE (node) == VAR_DECL && DECL_COMMON (node))
+ fputs (" common", file);
+ if (TREE_CODE (node) == VAR_DECL && DECL_THREAD_LOCAL_P (node))
+ {
+ enum tls_model kind = DECL_TLS_MODEL (node);
+ switch (kind)
+ {
+ case TLS_MODEL_GLOBAL_DYNAMIC:
+ fputs (" tls-global-dynamic", file);
+ break;
+ case TLS_MODEL_LOCAL_DYNAMIC:
+ fputs (" tls-local-dynamic", file);
+ break;
+ case TLS_MODEL_INITIAL_EXEC:
+ fputs (" tls-initial-exec", file);
+ break;
+ case TLS_MODEL_LOCAL_EXEC:
+ fputs (" tls-local-exec", file);
+ break;
+ default:
+ gcc_unreachable ();
+ }
+ }
if (TREE_CODE (node) == PARM_DECL && DECL_TRANSPARENT_UNION (node))
fputs (" transparent-union", file);
if (DECL_VIRTUAL_P (node))
fputs (" virtual", file);
- if (DECL_DEFER_OUTPUT (node))
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_WITH_VIS) && DECL_DEFER_OUTPUT (node))
fputs (" defer-output", file);
if (DECL_PRESERVE_P (node))
}
print_node_brief (file, "context", DECL_CONTEXT (node), indent + 4);
+
print_node_brief (file, "attributes",
DECL_ATTRIBUTES (node), indent + 4);
- print_node_brief (file, "abstract_origin",
- DECL_ABSTRACT_ORIGIN (node), indent + 4);
-
- print_node (file, "arguments", DECL_ARGUMENTS (node), indent + 4);
- print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
+
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_WRTL))
+ {
+ print_node_brief (file, "abstract_origin",
+ DECL_ABSTRACT_ORIGIN (node), indent + 4);
+ }
+ if (CODE_CONTAINS_STRUCT (code, TS_DECL_NON_COMMON))
+ {
+ print_node (file, "arguments", DECL_ARGUMENT_FLD (node), indent + 4);
+ print_node (file, "result", DECL_RESULT_FLD (node), indent + 4);
+ }
print_node_brief (file, "initial", DECL_INITIAL (node), indent + 4);
lang_hooks.print_decl (file, node, indent);
if (TREE_CODE (node) == PARM_DECL)
{
print_node (file, "arg-type", DECL_ARG_TYPE (node), indent + 4);
- print_node (file, "arg-type-as-written",
- DECL_ARG_TYPE_AS_WRITTEN (node), indent + 4);
if (DECL_INCOMING_RTL (node) != 0)
{