Lines Matching refs:NODE
164 The BV_DELTA of each node gives the amount by which to adjust the
170 The BV_VCALL_INDEX of each node, if non-NULL, gives the vtable
193 #define VAR_OR_FUNCTION_DECL_CHECK(NODE) \
194 TREE_CHECK2(NODE,VAR_DECL,FUNCTION_DECL)
196 #define VAR_FUNCTION_OR_PARM_DECL_CHECK(NODE) \
197 TREE_CHECK3(NODE,VAR_DECL,FUNCTION_DECL,PARM_DECL)
199 #define VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK(NODE) \
200 TREE_CHECK4(NODE,VAR_DECL,FUNCTION_DECL,TYPE_DECL,TEMPLATE_DECL)
202 #define BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK(NODE) \
203 TREE_CHECK(NODE,BOUND_TEMPLATE_TEMPLATE_PARM)
206 #define NON_THUNK_FUNCTION_CHECK(NODE) __extension__ \
207 ({ __typeof(NODE) const __t = (NODE); \
213 #define THUNK_FUNCTION_CHECK(NODE) __extension__ \
214 ({ __typeof (NODE) const __t = (NODE); \
220 #define NON_THUNK_FUNCTION_CHECK(NODE) (NODE)
221 #define THUNK_FUNCTION_CHECK(NODE) (NODE)
237 keyword. C_RID_CODE (node) is then the RID_* value of the keyword,
242 #define LANG_IDENTIFIER_CAST(NODE) \
243 ((struct lang_identifier*)IDENTIFIER_NODE_CHECK (NODE))
265 #define IDENTIFIER_GLOBAL_VALUE(NODE) \
266 namespace_binding ((NODE), global_namespace)
267 #define SET_IDENTIFIER_GLOBAL_VALUE(NODE, VAL) \
268 set_namespace_binding ((NODE), global_namespace, (VAL))
269 #define IDENTIFIER_NAMESPACE_VALUE(NODE) \
270 namespace_binding ((NODE), current_namespace)
271 #define SET_IDENTIFIER_NAMESPACE_VALUE(NODE, VAL) \
272 set_namespace_binding ((NODE), current_namespace, (VAL))
274 #define CLEANUP_P(NODE) TREE_LANG_FLAG_0 (TRY_BLOCK_CHECK (NODE))
276 #define BIND_EXPR_TRY_BLOCK(NODE) \
277 TREE_LANG_FLAG_0 (BIND_EXPR_CHECK (NODE))
280 #define BIND_EXPR_BODY_BLOCK(NODE) \
281 TREE_LANG_FLAG_3 (BIND_EXPR_CHECK (NODE))
282 #define FUNCTION_NEEDS_BODY_BLOCK(NODE) \
283 (DECL_CONSTRUCTOR_P (NODE) || DECL_DESTRUCTOR_P (NODE))
285 #define STATEMENT_LIST_NO_SCOPE(NODE) \
286 TREE_LANG_FLAG_0 (STATEMENT_LIST_CHECK (NODE))
287 #define STATEMENT_LIST_TRY_BLOCK(NODE) \
288 TREE_LANG_FLAG_2 (STATEMENT_LIST_CHECK (NODE))
293 #define STMT_IS_FULL_EXPR_P(NODE) TREE_LANG_FLAG_1 ((NODE))
296 #define EXPR_STMT_STMT_EXPR_RESULT(NODE) \
297 TREE_LANG_FLAG_0 (EXPR_STMT_CHECK (NODE))
300 #define STMT_EXPR_NO_SCOPE(NODE) \
301 TREE_LANG_FLAG_0 (STMT_EXPR_CHECK (NODE))
317 /* Returns nonzero iff NODE is a declaration for the global function
319 #define DECL_MAIN_P(NODE) \
320 (DECL_EXTERN_C_FUNCTION_P (NODE) \
321 && DECL_NAME (NODE) != NULL_TREE \
322 && MAIN_NAME_P (DECL_NAME (NODE)) \
326 #define OVL_FUNCTION(NODE) \
327 (((struct tree_overload*)OVERLOAD_CHECK (NODE))->function)
328 #define OVL_CHAIN(NODE) TREE_CHAIN (NODE)
330 #define OVL_CURRENT(NODE) \
331 ((TREE_CODE (NODE) == OVERLOAD) ? OVL_FUNCTION (NODE) : (NODE))
332 #define OVL_NEXT(NODE) \
333 ((TREE_CODE (NODE) == OVERLOAD) ? TREE_CHAIN (NODE) : NULL_TREE)
336 is not important for this node. */
337 #define OVL_USED(NODE) TREE_USED (NODE)
345 /* Returns true iff NODE is a BASELINK. */
346 #define BASELINK_P(NODE) \
347 (TREE_CODE (NODE) == BASELINK)
349 #define BASELINK_BINFO(NODE) \
350 (((struct tree_baselink*) BASELINK_CHECK (NODE))->binfo)
353 #define BASELINK_FUNCTIONS(NODE) \
354 (((struct tree_baselink*) BASELINK_CHECK (NODE))->functions)
358 #define BASELINK_ACCESS_BINFO(NODE) \
359 (((struct tree_baselink*) BASELINK_CHECK (NODE))->access_binfo)
365 #define BASELINK_OPTYPE(NODE) \
366 (TREE_CHAIN (BASELINK_CHECK (NODE)))
368 #define BASELINK_QUALIFIED_P(NODE) \
369 TREE_LANG_FLAG_0 (BASELINK_CHECK (NODE))
397 #define IDENTIFIER_NAMESPACE_BINDINGS(NODE) \
398 (LANG_IDENTIFIER_CAST (NODE)->namespace_bindings)
399 #define IDENTIFIER_TEMPLATE(NODE) \
400 (LANG_IDENTIFIER_CAST (NODE)->class_template_info)
405 name lookup consists simply of pulling off the node at the front
409 #define IDENTIFIER_BINDING(NODE) \
410 (LANG_IDENTIFIER_CAST (NODE)->bindings)
416 #define IDENTIFIER_TYPE_VALUE(NODE) identifier_type_value (NODE)
417 #define REAL_IDENTIFIER_TYPE_VALUE(NODE) TREE_TYPE (NODE)
418 #define SET_IDENTIFIER_TYPE_VALUE(NODE,TYPE) (TREE_TYPE (NODE) = (TYPE))
419 #define IDENTIFIER_HAS_TYPE_VALUE(NODE) (IDENTIFIER_TYPE_VALUE (NODE) ? 1 : 0)
421 #define IDENTIFIER_LABEL_VALUE(NODE) \
422 (LANG_IDENTIFIER_CAST (NODE)->label_value)
423 #define SET_IDENTIFIER_LABEL_VALUE(NODE, VALUE) \
424 IDENTIFIER_LABEL_VALUE (NODE) = (VALUE)
428 #define IDENTIFIER_VIRTUAL_P(NODENODE)
432 #define IDENTIFIER_OPNAME_P(NODE) TREE_LANG_FLAG_2 (NODE)
436 #define IDENTIFIER_TYPENAME_P(NODE) \
437 TREE_LANG_FLAG_4 (NODE)
441 #define IDENTIFIER_CTOR_OR_DTOR_P(NODE) \
442 TREE_LANG_FLAG_3 (NODE)
456 #define DEFARG_TOKENS(NODE) \
457 (((struct tree_default_arg *)DEFAULT_ARG_CHECK (NODE))->tokens)
458 #define DEFARG_INSTANTIATIONS(NODE) \
459 (((struct tree_default_arg *)DEFAULT_ARG_CHECK (NODE))->instantiations)
470 #define STATIC_ASSERT_CONDITION(NODE) \
471 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->condition)
476 #define STATIC_ASSERT_MESSAGE(NODE) \
477 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->message)
480 #define STATIC_ASSERT_SOURCE_LOCATION(NODE) \
481 (((struct tree_static_assert *)STATIC_ASSERT_CHECK (NODE))->location)
522 #define TRAIT_EXPR_TYPE1(NODE) \
523 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->type1)
525 #define TRAIT_EXPR_TYPE2(NODE) \
526 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->type2)
529 #define TRAIT_EXPR_KIND(NODE) \
530 (((struct tree_trait_expr *)TRAIT_EXPR_CHECK (NODE))->kind)
749 /* Node to indicate default access. This must be distinct from the
814 active template parameters. Each node in the list represents one
817 TREE_PURPOSE of each node. The parameters for that level are
948 /* True if NODE is an erroneous expression. */
950 #define error_operand_p(NODE) \
951 ((NODE) == error_mark_node \
952 || ((NODE) && TREE_TYPE ((NODE)) == error_mark_node))
963 #define TYPE_IDENTIFIER(NODE) (DECL_NAME (TYPE_NAME (NODE)))
964 #define TYPE_LINKAGE_IDENTIFIER(NODE) \
965 (TYPE_IDENTIFIER (TYPE_MAIN_VARIANT (NODE)))
966 #define TYPE_NAME_STRING(NODE) (IDENTIFIER_POINTER (TYPE_IDENTIFIER (NODE)))
967 #define TYPE_NAME_LENGTH(NODE) (IDENTIFIER_LENGTH (TYPE_IDENTIFIER (NODE)))
969 /* Nonzero if NODE has no name for linkage purposes. */
970 #define TYPE_ANONYMOUS_P(NODE) \
971 (TAGGED_TYPE_P (NODE) && ANON_AGGRNAME_P (TYPE_LINKAGE_IDENTIFIER (NODE)))
974 #define TYPE_MAIN_DECL(NODE) (TYPE_STUB_DECL (TYPE_MAIN_VARIANT (NODE)))
1010 #define TYPE_FOR_JAVA(NODE) TYPE_LANG_FLAG_3 (NODE)
1014 #define TYPE_DEPENDENT_P(NODE) TYPE_LANG_FLAG_0 (NODE)
1018 #define TYPE_DEPENDENT_P_VALID(NODE) TYPE_LANG_FLAG_6(NODE)
1021 #define CP_TYPE_CONST_P(NODE) \
1022 ((cp_type_quals (NODE) & TYPE_QUAL_CONST) != 0)
1025 #define CP_TYPE_VOLATILE_P(NODE) \
1026 ((cp_type_quals (NODE) & TYPE_QUAL_VOLATILE) != 0)
1029 #define CP_TYPE_RESTRICT_P(NODE) \
1030 ((cp_type_quals (NODE) & TYPE_QUAL_RESTRICT) != 0)
1036 #define CP_TYPE_CONST_NON_VOLATILE_P(NODE) \
1037 ((cp_type_quals (NODE) & (TYPE_QUAL_CONST | TYPE_QUAL_VOLATILE)) \
1040 #define FUNCTION_ARG_CHAIN(NODE) \
1041 TREE_CHAIN (TYPE_ARG_TYPES (TREE_TYPE (NODE)))
1045 #define FUNCTION_FIRST_USER_PARMTYPE(NODE) \
1046 skip_artificial_parms_for ((NODE), TYPE_ARG_TYPES (TREE_TYPE (NODE)))
1049 #define FUNCTION_FIRST_USER_PARM(NODE) \
1050 skip_artificial_parms_for ((NODE), DECL_ARGUMENTS (NODE))
1204 #define LANG_TYPE_CLASS_CHECK(NODE) __extension__ \
1205 ({ struct lang_type *lt = TYPE_LANG_SPECIFIC (NODE); \
1210 #define LANG_TYPE_PTRMEM_CHECK(NODE) __extension__ \
1211 ({ struct lang_type *lt = TYPE_LANG_SPECIFIC (NODE); \
1218 #define LANG_TYPE_CLASS_CHECK(NODE) (&TYPE_LANG_SPECIFIC (NODE)->u.c)
1219 #define LANG_TYPE_PTRMEM_CHECK(NODE) (&TYPE_LANG_SPECIFIC (NODE)->u.ptrmem)
1228 #define CLASSTYPE_INLINE_FRIENDS(NODE) CLASSTYPE_PURE_VIRTUALS (NODE)
1231 #define TYPE_GETS_DELETE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->gets_delete)
1232 #define TYPE_GETS_REG_DELETE(NODE) (TYPE_GETS_DELETE (NODE) & 1)
1234 /* Nonzero if `new NODE[x]' should cause the allocation of extra
1236 #define TYPE_VEC_NEW_USES_COOKIE(NODE) \
1237 (CLASS_TYPE_P (NODE) \
1238 && LANG_TYPE_CLASS_CHECK (NODE)->vec_new_uses_cookie)
1240 /* Nonzero means that this _CLASSTYPE node defines ways of converting
1242 #define TYPE_HAS_CONVERSION(NODE) \
1243 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_type_conversion)
1245 /* Nonzero means that NODE (a class type) has a default constructor --
1247 #define CLASSTYPE_LAZY_DEFAULT_CTOR(NODE) \
1248 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_default_ctor)
1250 /* Nonzero means that NODE (a class type) has a copy constructor --
1252 #define CLASSTYPE_LAZY_COPY_CTOR(NODE) \
1253 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_copy_ctor)
1255 /* Nonzero means that NODE (a class type) has an assignment operator
1257 #define CLASSTYPE_LAZY_ASSIGNMENT_OP(NODE) \
1258 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_assignment_op)
1260 /* Nonzero means that NODE (a class type) has a destructor -- but that
1262 #define CLASSTYPE_LAZY_DESTRUCTOR(NODE) \
1263 (LANG_TYPE_CLASS_CHECK (NODE)->lazy_destructor)
1265 /* Nonzero means that this _CLASSTYPE node overloads operator=(X&). */
1266 #define TYPE_HAS_ASSIGN_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_assign_ref)
1268 /* True iff the class type NODE has an "operator =" whose parameter
1270 #define TYPE_HAS_CONST_ASSIGN_REF(NODE) \
1271 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_const_assign_ref)
1273 /* Nonzero means that this _CLASSTYPE node has an X(X&) constructor. */
1274 #define TYPE_HAS_INIT_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->h.has_init_ref)
1275 #define TYPE_HAS_CONST_INIT_REF(NODE) \
1276 (LANG_TYPE_CLASS_CHECK (NODE)->has_const_init_ref)
1279 #define TYPE_HAS_LIST_CTOR(NODE) \
1280 (LANG_TYPE_CLASS_CHECK (NODE)->has_list_ctor)
1284 #define TYPE_HAS_NEW_OPERATOR(NODE) \
1285 (LANG_TYPE_CLASS_CHECK (NODE)->has_new)
1288 #define TYPE_HAS_ARRAY_NEW_OPERATOR(NODE) \
1289 (LANG_TYPE_CLASS_CHECK (NODE)->has_array_new)
1293 #define TYPE_BEING_DEFINED(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->being_defined)
1296 #define TYPE_MARKED_P(NODE) TREE_LANG_FLAG_6 (TYPE_CHECK (NODE))
1298 /* Nonzero if the class NODE has multiple paths to the same (virtual)
1300 #define CLASSTYPE_DIAMOND_SHAPED_P(NODE) \
1301 (LANG_TYPE_CLASS_CHECK(NODE)->diamond_shaped)
1303 /* Nonzero if the class NODE has multiple instances of the same base
1305 #define CLASSTYPE_REPEATED_BASE_P(NODE) \
1306 (LANG_TYPE_CLASS_CHECK(NODE)->repeated_base)
1311 #define CLASSTYPE_KEY_METHOD(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->key_method)
1325 #define CLASSTYPE_METHOD_VEC(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->methods)
1331 #define CLASSTYPE_DECL_LIST(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->decl_list)
1343 /* A FUNCTION_DECL or OVERLOAD for the constructors for NODE. These
1345 #define CLASSTYPE_CONSTRUCTORS(NODE) \
1346 (VEC_index (tree, CLASSTYPE_METHOD_VEC (NODE), CLASSTYPE_CONSTRUCTOR_SLOT))
1348 /* A FUNCTION_DECL for the destructor for NODE. These are the
1352 #define CLASSTYPE_DESTRUCTORS(NODE) \
1353 (CLASSTYPE_METHOD_VEC (NODE) \
1354 ? VEC_index (tree, CLASSTYPE_METHOD_VEC (NODE), CLASSTYPE_DESTRUCTOR_SLOT) \
1360 #define CLASSTYPE_NESTED_UTDS(NODE) \
1361 (LANG_TYPE_CLASS_CHECK (NODE)->nested_udts)
1363 /* Nonzero if NODE has a primary base class, i.e., a base class with
1365 #define CLASSTYPE_HAS_PRIMARY_BASE_P(NODE) \
1366 (CLASSTYPE_PRIMARY_BINFO (NODE) != NULL_TREE)
1371 #define CLASSTYPE_PRIMARY_BINFO(NODE) \
1372 (LANG_TYPE_CLASS_CHECK (NODE)->primary_base)
1378 #define CLASSTYPE_VBASECLASSES(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->vbases)
1380 /* The type corresponding to NODE when NODE is used as a base class,
1381 i.e., NODE without virtual base classes. */
1383 #define CLASSTYPE_AS_BASE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->as_base)
1385 /* True iff NODE is the CLASSTYPE_AS_BASE version of some type. */
1387 #define IS_FAKE_BASE_TYPE(NODE) \
1388 (TREE_CODE (NODE) == RECORD_TYPE \
1389 && TYPE_CONTEXT (NODE) && CLASS_TYPE_P (TYPE_CONTEXT (NODE)) \
1390 && CLASSTYPE_AS_BASE (TYPE_CONTEXT (NODE)) == (NODE))
1394 #define CLASSTYPE_SIZE(NODE) TYPE_SIZE (CLASSTYPE_AS_BASE (NODE))
1395 #define CLASSTYPE_SIZE_UNIT(NODE) TYPE_SIZE_UNIT (CLASSTYPE_AS_BASE (NODE))
1396 #define CLASSTYPE_ALIGN(NODE) TYPE_ALIGN (CLASSTYPE_AS_BASE (NODE))
1397 #define CLASSTYPE_USER_ALIGN(NODE) TYPE_USER_ALIGN (CLASSTYPE_AS_BASE (NODE))
1399 /* The alignment of NODE, without its virtual bases, in bytes. */
1400 #define CLASSTYPE_ALIGN_UNIT(NODE) \
1401 (CLASSTYPE_ALIGN (NODE) / BITS_PER_UNIT)
1405 #define TYPE_JAVA_INTERFACE(NODE) \
1406 (LANG_TYPE_CLASS_CHECK (NODE)->java_interface)
1411 #define CLASSTYPE_PURE_VIRTUALS(NODE) \
1412 (LANG_TYPE_CLASS_CHECK (NODE)->pure_virtuals)
1415 #define TYPE_HAS_DEFAULT_CONSTRUCTOR(NODE) \
1416 (LANG_TYPE_CLASS_CHECK (NODE)->h.has_default_ctor)
1419 #define CLASSTYPE_HAS_MUTABLE(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_mutable)
1420 #define TYPE_HAS_MUTABLE_P(NODE) (cp_has_mutable_p (NODE))
1423 #define CLASSTYPE_NON_POD_P(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->non_pod_class)
1428 #define CLASSTYPE_NON_ZERO_INIT_P(NODE) \
1429 (LANG_TYPE_CLASS_CHECK (NODE)->non_zero_init)
1432 #define CLASSTYPE_EMPTY_P(NODE) \
1433 (LANG_TYPE_CLASS_CHECK (NODE)->empty_p)
1437 #define CLASSTYPE_NEARLY_EMPTY_P(NODE) \
1438 (LANG_TYPE_CLASS_CHECK (NODE)->nearly_empty_p)
1441 #define CLASSTYPE_CONTAINS_EMPTY_CLASS_P(NODE) \
1442 (LANG_TYPE_CLASS_CHECK (NODE)->contains_empty_class_p)
1447 #define CLASSTYPE_FRIEND_CLASSES(NODE) \
1448 (LANG_TYPE_CLASS_CHECK (NODE)->friend_classes)
1451 #define CLASSTYPE_BEFRIENDING_CLASSES(NODE) \
1452 (LANG_TYPE_CLASS_CHECK (NODE)->befriending_classes)
1454 /* Say whether this node was declared as a "class" or a "struct". */
1455 #define CLASSTYPE_DECLARED_CLASS(NODE) \
1456 (LANG_TYPE_CLASS_CHECK (NODE)->declared_class)
1460 #define CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE) \
1461 (TYPE_LANG_SPECIFIC (NODE) \
1462 ? LANG_TYPE_CLASS_CHECK (NODE)->h.const_needs_init : 0)
1463 #define SET_CLASSTYPE_READONLY_FIELDS_NEED_INIT(NODE, VALUE) \
1464 (LANG_TYPE_CLASS_CHECK (NODE)->h.const_needs_init = (VALUE))
1468 #define CLASSTYPE_REF_FIELDS_NEED_INIT(NODE) \
1469 (TYPE_LANG_SPECIFIC (NODE) \
1470 ? LANG_TYPE_CLASS_CHECK (NODE)->h.ref_needs_init : 0)
1471 #define SET_CLASSTYPE_REF_FIELDS_NEED_INIT(NODE, VALUE) \
1472 (LANG_TYPE_CLASS_CHECK (NODE)->h.ref_needs_init = (VALUE))
1476 #define CLASSTYPE_INTERFACE_ONLY(NODE) \
1477 (LANG_TYPE_CLASS_CHECK (NODE)->interface_only)
1484 #define CLASSTYPE_INTERFACE_KNOWN(NODE) \
1485 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown == 0)
1487 #define CLASSTYPE_INTERFACE_UNKNOWN(NODE) \
1488 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown)
1490 #define SET_CLASSTYPE_INTERFACE_UNKNOWN_X(NODE,X) \
1491 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = !!(X))
1492 #define SET_CLASSTYPE_INTERFACE_UNKNOWN(NODE) \
1493 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = 1)
1494 #define SET_CLASSTYPE_INTERFACE_KNOWN(NODE) \
1495 (LANG_TYPE_CLASS_CHECK (NODE)->interface_unknown = 0)
1497 /* Nonzero if a _DECL node requires us to output debug info for this class. */
1498 #define CLASSTYPE_DEBUG_REQUESTED(NODE) \
1499 (LANG_TYPE_CLASS_CHECK (NODE)->debug_requested)
1505 #define BINFO_VTABLE_PATH_MARKED(NODE) BINFO_FLAG_1 (NODE)
1529 #define BINFO_DEPENDENT_BASE_P(NODE) BINFO_FLAG_3 (NODE)
1534 #define BINFO_LOST_PRIMARY_P(NODE) BINFO_FLAG_4 (NODE)
1537 #define BINFO_PRIMARY_P(NODE) BINFO_FLAG_5(NODE)
1540 #define IDENTIFIER_MARKED(NODE) TREE_LANG_FLAG_0 (NODE)
1544 NODE. The PURPOSE of each element is a FUNCTION_DECL for a virtual
1546 vcall offset for that function is stored, when NODE is a virtual
1548 #define CLASSTYPE_VCALL_INDICES(NODE) \
1549 (LANG_TYPE_CLASS_CHECK (NODE)->vcall_indices)
1551 /* The various vtables for the class NODE. The primary vtable will be
1553 #define CLASSTYPE_VTABLES(NODE) \
1554 (LANG_TYPE_CLASS_CHECK (NODE)->vtables)
1559 #define CLASSTYPE_TYPEINFO_VAR(NODE) \
1560 (LANG_TYPE_CLASS_CHECK (NODE)->typeinfo_var)
1567 #define BV_DELTA(NODE) (TREE_PURPOSE (NODE))
1572 #define BV_VCALL_INDEX(NODE) (TREE_TYPE (NODE))
1575 #define BV_FN(NODE) (TREE_VALUE (NODE))
1583 #define TYPE_RAISES_EXCEPTIONS(NODE) TYPE_LANG_SLOT_1 (NODE)
1586 #define TYPE_NOTHROW_P(NODE) \
1587 (TYPE_RAISES_EXCEPTIONS (NODE) \
1588 && TREE_VALUE (TYPE_RAISES_EXCEPTIONS (NODE)) == NULL_TREE)
1591 #define NAMESPACE_LEVEL(NODE) \
1592 (DECL_LANG_SPECIFIC (NODE)->decl_flags.u.level)
1601 #define CAN_HAVE_FULL_LANG_DECL_P(NODE) \
1602 (!(TREE_CODE (NODE) == FIELD_DECL \
1603 || TREE_CODE (NODE) == VAR_DECL \
1604 || TREE_CODE (NODE) == CONST_DECL \
1605 || TREE_CODE (NODE) == USING_DECL))
1721 #define LANG_DECL_U2_CHECK(NODE, TF) __extension__ \
1722 ({ struct lang_decl *lt = DECL_LANG_SPECIFIC (NODE); \
1729 #define LANG_DECL_U2_CHECK(NODE, TF) \
1730 (&DECL_LANG_SPECIFIC (NODE)->decl_flags.u2)
1743 #define DECL_LANGUAGE(NODE) \
1744 (DECL_LANG_SPECIFIC (NODE) \
1745 ? DECL_LANG_SPECIFIC (NODE)->decl_flags.language \
1746 : (TREE_CODE (NODE) == FUNCTION_DECL \
1749 /* Set the language linkage for NODE to LANGUAGE. */
1750 #define SET_DECL_LANGUAGE(NODE, LANGUAGE) \
1751 (DECL_LANG_SPECIFIC (NODE)->decl_flags.language = (LANGUAGE))
1754 #define DECL_CONSTRUCTOR_P(NODE) \
1755 (DECL_LANG_SPECIFIC (NODE)->decl_flags.constructor_attr)
1757 /* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a complete
1759 #define DECL_COMPLETE_CONSTRUCTOR_P(NODE) \
1760 (DECL_CONSTRUCTOR_P (NODE) \
1761 && DECL_NAME (NODE) == complete_ctor_identifier)
1763 /* Nonzero if NODE (a FUNCTION_DECL) is a constructor for a base
1765 #define DECL_BASE_CONSTRUCTOR_P(NODE) \
1766 (DECL_CONSTRUCTOR_P (NODE) \
1767 && DECL_NAME (NODE) == base_ctor_identifier)
1769 /* Nonzero if NODE
1772 #define DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P(NODE) \
1773 (DECL_CONSTRUCTOR_P (NODE) && !DECL_CLONED_FUNCTION_P (NODE))
1775 /* Nonzero if NODE (a FUNCTION_DECL) is a copy constructor. */
1776 #define DECL_COPY_CONSTRUCTOR_P(NODE) \
1777 (DECL_CONSTRUCTOR_P (NODE) && copy_fn_p (NODE) > 0)
1779 /* Nonzero if NODE (a FUNCTION_DECL) is a move constructor. */
1780 #define DECL_MOVE_CONSTRUCTOR_P(NODE) \
1781 (DECL_CONSTRUCTOR_P (NODE) && move_fn_p (NODE))
1783 /* Nonzero if NODE is a destructor. */
1784 #define DECL_DESTRUCTOR_P(NODE) \
1785 (DECL_LANG_SPECIFIC (NODE)->decl_flags.destructor_attr)
1787 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor, but not the
1790 #define DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P(NODE) \
1791 (DECL_DESTRUCTOR_P (NODE) && !DECL_CLONED_FUNCTION_P (NODE))
1793 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
1795 #define DECL_COMPLETE_DESTRUCTOR_P(NODE) \
1796 (DECL_DESTRUCTOR_P (NODE) \
1797 && DECL_NAME (NODE) == complete_dtor_identifier)
1799 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a base
1801 #define DECL_BASE_DESTRUCTOR_P(NODE) \
1802 (DECL_DESTRUCTOR_P (NODE) \
1803 && DECL_NAME (NODE) == base_dtor_identifier)
1805 /* Nonzero if NODE (a FUNCTION_DECL) is a destructor for a complete
1807 #define DECL_DELETING_DESTRUCTOR_P(NODE) \
1808 (DECL_DESTRUCTOR_P (NODE) \
1809 && DECL_NAME (NODE) == deleting_dtor_identifier)
1811 /* Nonzero if NODE (a FUNCTION_DECL) is a cloned constructor or
1813 #define DECL_CLONED_FUNCTION_P(NODE) \
1814 ((TREE_CODE (NODE) == FUNCTION_DECL \
1815 || TREE_CODE (NODE) == TEMPLATE_DECL) \
1816 && DECL_LANG_SPECIFIC (NODE) \
1817 && !DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p \
1818 && DECL_CLONED_FUNCTION (NODE) != NULL_TREE)
1822 #define DECL_CLONED_FUNCTION(NODE) \
1823 (DECL_LANG_SPECIFIC (NON_THUNK_FUNCTION_CHECK(NODE))->u.f.u5.cloned_function)
1840 /* Nonzero if NODE has DECL_DISCRIMINATOR and not DECL_ACCESS. */
1841 #define DECL_DISCRIMINATOR_P(NODE) \
1842 (TREE_CODE (NODE) == VAR_DECL \
1843 && DECL_FUNCTION_SCOPE_P (NODE))
1846 #define DECL_DISCRIMINATOR(NODE) (LANG_DECL_U2_CHECK (NODE, 1)->discriminator)
1848 /* Nonzero if the VTT parm has been added to NODE. */
1849 #define DECL_HAS_VTT_PARM_P(NODE) \
1850 (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_vtt_parm_p)
1852 /* Nonzero if NODE is a FUNCTION_DECL for which a VTT parameter is
1854 #define DECL_NEEDS_VTT_PARM_P(NODE) \
1855 (CLASSTYPE_VBASECLASSES (DECL_CONTEXT (NODE)) \
1856 && (DECL_BASE_CONSTRUCTOR_P (NODE) \
1857 || DECL_BASE_DESTRUCTOR_P (NODE)))
1859 /* Nonzero if NODE is a user-defined conversion operator. */
1860 #define DECL_CONV_FN_P(NODE) \
1861 (DECL_NAME (NODE) && IDENTIFIER_TYPENAME_P (DECL_NAME (NODE)))
1868 /* Nonzero if NODE, which is a TEMPLATE_DECL, is a template
1871 #define DECL_TEMPLATE_CONV_FN_P(NODE) \
1872 (DECL_LANG_SPECIFIC (NODE)->decl_flags.template_conv_p)
1874 /* Set the overloaded operator code for NODE to CODE. */
1875 #define SET_OVERLOADED_OPERATOR_CODE(NODE, CODE) \
1876 (DECL_LANG_SPECIFIC (NODE)->u.f.operator_code = (CODE))
1878 /* If NODE is an overloaded operator, then this returns the TREE_CODE
1881 whether or not NODE is an assignment operator. If NODE is not an
1884 to test whether or not NODE is an overloaded operator. */
1885 #define DECL_OVERLOADED_OPERATOR_P(NODE) \
1886 (IDENTIFIER_OPNAME_P (DECL_NAME (NODE)) \
1887 ? DECL_LANG_SPECIFIC (NODE)->u.f.operator_code : ERROR_MARK)
1889 /* Nonzero if NODE is an assignment operator (including += and such). */
1890 #define DECL_ASSIGNMENT_OPERATOR_P(NODE) \
1891 (DECL_LANG_SPECIFIC (NODE)->decl_flags.assignment_operator_p)
1896 #define DECL_HAS_IN_CHARGE_PARM_P(NODE) \
1897 (DECL_LANG_SPECIFIC (NODE)->decl_flags.has_in_charge_parm_p)
1900 #define DECL_IS_BUILTIN_CONSTANT_P(NODE) \
1901 (TREE_CODE (NODE) == FUNCTION_DECL \
1902 && DECL_BUILT_IN_CLASS (NODE) == BUILT_IN_NORMAL \
1903 && DECL_FUNCTION_CODE (NODE) == BUILT_IN_CONSTANT_P)
1906 in) as a member in a RECORD_TYPE or UNION_TYPE node. It is also for
1910 #define DECL_IN_AGGR_P(NODE) (DECL_LANG_FLAG_3 (NODE))
1916 #define DECL_INITIALIZED_P(NODE) \
1917 (TREE_LANG_FLAG_1 (VAR_DECL_CHECK (NODE)))
1920 #define DECL_NONTRIVIALLY_INITIALIZED_P(NODE) \
1921 (TREE_LANG_FLAG_3 (VAR_DECL_CHECK (NODE)))
1925 #define DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P(NODE) \
1926 (TREE_LANG_FLAG_2 (VAR_DECL_CHECK (NODE)))
1939 #define DECL_INTEGRAL_CONSTANT_VAR_P(NODE) \
1940 (TREE_CODE (NODE) == VAR_DECL \
1941 && CP_TYPE_CONST_NON_VOLATILE_P (TREE_TYPE (NODE)) \
1942 && INTEGRAL_OR_ENUMERATION_TYPE_P (TREE_TYPE (NODE)) \
1943 && DECL_INITIALIZED_BY_CONSTANT_EXPRESSION_P (NODE))
1953 #define DECL_FRIEND_P(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.friend_attr)
1956 #define DECL_BEFRIENDING_CLASSES(NODE) \
1957 (DECL_LANG_SPECIFIC (NODE)->u.f.befriending_classes)
1961 #define DECL_STATIC_FUNCTION_P(NODE) \
1962 (DECL_LANG_SPECIFIC (NODE)->decl_flags.static_function)
1966 #define DECL_NONSTATIC_MEMBER_FUNCTION_P(NODE) \
1967 (TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE)
1971 #define DECL_FUNCTION_MEMBER_P(NODE) \
1972 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) || DECL_STATIC_FUNCTION_P (NODE))
1976 #define DECL_CONST_MEMFUNC_P(NODE) \
1977 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1979 (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
1983 #define DECL_VOLATILE_MEMFUNC_P(NODE) \
1984 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1986 (TYPE_ARG_TYPES (TREE_TYPE (NODE))))))
1989 #define DECL_NONSTATIC_MEMBER_P(NODE) \
1990 (DECL_NONSTATIC_MEMBER_FUNCTION_P (NODE) \
1991 || TREE_CODE (NODE) == FIELD_DECL)
1995 #define DECL_MUTABLE_P(NODE) (DECL_LANG_FLAG_0 (NODE))
1999 #define DECL_NONCONVERTING_P(NODE) \
2000 (DECL_LANG_SPECIFIC (NODE)->decl_flags.nonconverting)
2004 #define DECL_PURE_VIRTUAL_P(NODE) \
2005 (DECL_LANG_SPECIFIC (NODE)->decl_flags.pure_virtual)
2007 /* True (in a FUNCTION_DECL) if NODE is a virtual function that is an
2011 #define DECL_INVALID_OVERRIDER_P(NODE) \
2012 (DECL_LANG_FLAG_4 (NODE))
2014 /* The thunks associated with NODE, a FUNCTION_DECL. */
2015 #define DECL_THUNKS(NODE) \
2016 (DECL_LANG_SPECIFIC (NODE)->u.f.context)
2018 /* Nonzero if NODE is a thunk, rather than an ordinary function. */
2019 #define DECL_THUNK_P(NODE) \
2020 (TREE_CODE (NODE) == FUNCTION_DECL \
2021 && DECL_LANG_SPECIFIC (NODE) \
2022 && DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p)
2024 /* Set DECL_THUNK_P for node. */
2025 #define SET_DECL_THUNK_P(NODE, THIS_ADJUSTING) \
2026 (DECL_LANG_SPECIFIC (NODE)->decl_flags.thunk_p = 1, \
2027 DECL_LANG_SPECIFIC (NODE)->u.f.u3sel = 1, \
2028 DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p = (THIS_ADJUSTING))
2030 /* Nonzero if NODE is a this pointer adjusting thunk. */
2031 #define DECL_THIS_THUNK_P(NODE) \
2032 (DECL_THUNK_P (NODE) && DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p)
2034 /* Nonzero if NODE is a result pointer adjusting thunk. */
2035 #define DECL_RESULT_THUNK_P(NODE) \
2036 (DECL_THUNK_P (NODE) && !DECL_LANG_SPECIFIC (NODE)->decl_flags.this_thunk_p)
2038 /* Nonzero if NODE is a FUNCTION_DECL, but not a thunk. */
2039 #define DECL_NON_THUNK_FUNCTION_P(NODE) \
2040 (TREE_CODE (NODE) == FUNCTION_DECL && !DECL_THUNK_P (NODE))
2042 /* Nonzero if NODE is `extern "C"'. */
2043 #define DECL_EXTERN_C_P(NODE) \
2044 (DECL_LANGUAGE (NODE) == lang_c)
2046 /* Nonzero if NODE is an `extern "C"' function. */
2047 #define DECL_EXTERN_C_FUNCTION_P(NODE) \
2048 (DECL_NON_THUNK_FUNCTION_P (NODE) && DECL_EXTERN_C_P (NODE))
2052 #define DECL_REPO_AVAILABLE_P(NODE) \
2053 (DECL_LANG_SPECIFIC (NODE)->decl_flags.repo_available_p)
2057 #define DECL_PRETTY_FUNCTION_P(NODE) \
2058 (TREE_LANG_FLAG_0 (VAR_DECL_CHECK (NODE)))
2062 #define DECL_CLASS_CONTEXT(NODE) \
2063 (DECL_CLASS_SCOPE_P (NODE) ? DECL_CONTEXT (NODE) : NULL_TREE)
2071 #define DECL_FRIEND_CONTEXT(NODE) \
2072 ((DECL_FRIEND_P (NODE) && !DECL_FUNCTION_MEMBER_P (NODE)) \
2073 ? DECL_LANG_SPECIFIC (NODE)->u.f.context \
2076 /* Set the DECL_FRIEND_CONTEXT for NODE to CONTEXT. */
2077 #define SET_DECL_FRIEND_CONTEXT(NODE, CONTEXT) \
2078 (DECL_LANG_SPECIFIC (NODE)->u.f.context = (CONTEXT))
2081 #define CP_DECL_CONTEXT(NODE) \
2082 (DECL_CONTEXT (NODE) ? DECL_CONTEXT (NODE) : global_namespace)
2083 #define CP_TYPE_CONTEXT(NODE) \
2084 (TYPE_CONTEXT (NODE) ? TYPE_CONTEXT (NODE) : global_namespace)
2085 #define FROB_CONTEXT(NODE) ((NODE) == global_namespace ? NULL_TREE : (NODE))
2087 /* 1 iff NODE has namespace scope, including the global namespace. */
2088 #define DECL_NAMESPACE_SCOPE_P(NODE) \
2089 (!DECL_TEMPLATE_PARM_P (NODE) \
2090 && TREE_CODE (CP_DECL_CONTEXT (NODE)) == NAMESPACE_DECL)
2092 /* 1 iff NODE is a class member. */
2093 #define DECL_CLASS_SCOPE_P(NODE) \
2094 (DECL_CONTEXT (NODE) && TYPE_P (DECL_CONTEXT (NODE)))
2096 #define TYPE_CLASS_SCOPE_P(NODE) \
2097 (TYPE_CONTEXT (NODE) && TYPE_P (TYPE_CONTEXT (NODE)))
2099 /* 1 iff NODE is function-local. */
2100 #define DECL_FUNCTION_SCOPE_P(NODE) \
2101 (DECL_CONTEXT (NODE) \
2102 && TREE_CODE (DECL_CONTEXT (NODE)) == FUNCTION_DECL)
2104 /* 1 iff VAR_DECL node NODE is a type-info decl. This flag is set for
2106 #define DECL_TINFO_P(NODE) TREE_LANG_FLAG_4 (VAR_DECL_CHECK (NODE))
2108 /* 1 iff VAR_DECL node NODE is virtual table or VTT. */
2109 #define DECL_VTABLE_OR_VTT_P(NODE) TREE_LANG_FLAG_5 (VAR_DECL_CHECK (NODE))
2114 #define DECL_CONSTRUCTION_VTABLE_P(NODE) \
2115 TREE_LANG_FLAG_6 (VAR_DECL_CHECK (NODE))
2117 /* 1 iff NODE is function-local, but for types. */
2118 #define LOCAL_CLASS_P(NODE) \
2119 (decl_function_context (TYPE_MAIN_DECL (NODE)) != NULL_TREE)
2124 #define DECL_NAMESPACE_USING(NODE) DECL_VINDEX (NAMESPACE_DECL_CHECK (NODE))
2128 #define DECL_NAMESPACE_USERS(NODE) DECL_INITIAL (NAMESPACE_DECL_CHECK (NODE))
2132 #define DECL_NAMESPACE_ASSOCIATIONS(NODE) \
2133 (NAMESPACE_DECL_CHECK (NODE)->decl_non_common.saved_tree)
2137 #define DECL_NAMESPACE_ALIAS(NODE) \
2138 DECL_ABSTRACT_ORIGIN (NAMESPACE_DECL_CHECK (NODE))
2139 #define ORIGINAL_NAMESPACE(NODE) \
2140 (DECL_NAMESPACE_ALIAS (NODE) ? DECL_NAMESPACE_ALIAS (NODE) : (NODE))
2142 /* Nonzero if NODE is the std namespace. */
2143 #define DECL_NAMESPACE_STD_P(NODE) \
2144 (TREE_CODE (NODE) == NAMESPACE_DECL \
2145 && CP_DECL_CONTEXT (NODE) == global_namespace \
2146 && DECL_NAME (NODE) == std_identifier)
2150 #define TREE_INDIRECT_USING(NODE) (TREE_LIST_CHECK (NODE)->base.lang_flag_0)
2154 #define ATTR_IS_DEPENDENT(NODE) (TREE_LIST_CHECK (NODE)->base.lang_flag_0)
2160 #define DECL_DEPENDENT_P(NODE) DECL_LANG_FLAG_0 (USING_DECL_CHECK (NODE))
2163 #define USING_DECL_SCOPE(NODE) TREE_TYPE (USING_DECL_CHECK (NODE))
2166 #define USING_DECL_DECLS(NODE) DECL_INITIAL (USING_DECL_CHECK (NODE))
2170 NODE) \
2171 (VAR_DECL_CHECK (NODE)->decl_with_vis.shadowed_for_var_p)
2175 #define DECL_SHADOWED_FOR_VAR(NODE) \
2176 (DECL_HAS_SHADOWED_FOR_VAR_P(NODE) ? decl_shadowed_for_var_lookup (NODE) : NULL)
2178 #define SET_DECL_SHADOWED_FOR_VAR(NODE, VAL) \
2179 (decl_shadowed_for_var_insert (NODE, VAL))
2184 #define DECL_PENDING_INLINE_P(NODE) \
2185 (DECL_LANG_SPECIFIC (NODE)->u.f.pending_inline_p)
2189 #define DECL_PENDING_INLINE_INFO(NODE) \
2190 (DECL_LANG_SPECIFIC (NODE)->u.f.u.pending_inline_info)
2194 #define DECL_SORTED_FIELDS(NODE) \
2195 (DECL_LANG_SPECIFIC (TYPE_DECL_CHECK (NODE))->u.f.u.sorted_fields)
2220 #define DECL_TEMPLATE_INFO(NODE) \
2221 (DECL_LANG_SPECIFIC (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK (NODE)) \
2227 #define DECL_ANON_UNION_VAR_P(NODE) \
2228 (DECL_LANG_FLAG_4 (VAR_DECL_CHECK (NODE)))
2231 #define CLASSTYPE_TEMPLATE_INFO(NODE) \
2232 (LANG_TYPE_CLASS_CHECK (RECORD_OR_UNION_CHECK (NODE))->template_info)
2238 #define ENUM_TEMPLATE_INFO(NODE) \
2239 (TYPE_LANG_SLOT_1 (ENUMERAL_TYPE_CHECK (NODE)))
2242 #define TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO(NODE) \
2243 (LANG_TYPE_CLASS_CHECK (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK (NODE)) \
2247 #define TYPE_TEMPLATE_INFO(NODE) \
2248 (TREE_CODE (NODE) == ENUMERAL_TYPE \
2249 ? ENUM_TEMPLATE_INFO (NODE) : \
2250 (TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM \
2251 ? TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO (NODE) : \
2252 (TYPE_LANG_SPECIFIC (NODE) \
2253 ? CLASSTYPE_TEMPLATE_INFO (NODE) \
2258 #define SET_TYPE_TEMPLATE_INFO(NODE, VAL) \
2259 (TREE_CODE (NODE) == ENUMERAL_TYPE \
2260 ? (ENUM_TEMPLATE_INFO (NODE) = (VAL)) \
2261 : (CLASSTYPE_TEMPLATE_INFO (NODE) = (VAL)))
2263 #define TI_TEMPLATE(NODE) (TREE_PURPOSE (NODE))
2264 #define TI_ARGS(NODE) (TREE_VALUE (NODE))
2265 #define TI_PENDING_TEMPLATE_FLAG(NODE) TREE_LANG_FLAG_1 (NODE)
2281 #define TMPL_ARGS_HAVE_MULTIPLE_LEVELS(NODE) \
2282 (NODE && TREE_VEC_LENGTH (NODE) && TREE_VEC_ELT (NODE, 0) \
2283 && TREE_CODE (TREE_VEC_ELT (NODE, 0)) == TREE_VEC)
2290 #define TMPL_ARGS_DEPTH(NODE) \
2291 (TMPL_ARGS_HAVE_MULTIPLE_LEVELS (NODE) ? TREE_VEC_LENGTH (NODE) : 1)
2308 /* Given a single level of template arguments in NODE, return the
2310 #define NUM_TMPL_ARGS(NODE) \
2311 (TREE_VEC_LENGTH (NODE))
2314 #define INNERMOST_TEMPLATE_ARGS(NODE) \
2315 (get_innermost_template_args ((NODE), 1))
2317 /* The number of levels of template parameters given by NODE. */
2318 #define TMPL_PARMS_DEPTH(NODE) \
2319 ((HOST_WIDE_INT) TREE_INT_CST_LOW (TREE_PURPOSE (NODE)))
2321 /* The TEMPLATE_DECL instantiated or specialized by NODE. This
2339 #define DECL_TI_TEMPLATE(NODE) TI_TEMPLATE (DECL_TEMPLATE_INFO (NODE))
2346 #define DECL_TI_ARGS(NODE) TI_ARGS (DECL_TEMPLATE_INFO (NODE))
2348 /* The TEMPLATE_DECL associated with NODE, a class type. Even if NODE
2357 #define CLASSTYPE_TI_TEMPLATE(NODE) TI_TEMPLATE (CLASSTYPE_TEMPLATE_INFO (NODE))
2358 #define CLASSTYPE_TI_ARGS(NODE) TI_ARGS (CLASSTYPE_TEMPLATE_INFO (NODE))
2370 #define TYPE_TI_TEMPLATE(NODE) \
2371 (TI_TEMPLATE (TYPE_TEMPLATE_INFO (NODE)))
2374 #define TYPE_TI_ARGS(NODE) \
2375 (TI_ARGS (TYPE_TEMPLATE_INFO (NODE)))
2377 #define INNERMOST_TEMPLATE_PARMS(NODE) TREE_VALUE (NODE)
2379 /* Nonzero if NODE (a TEMPLATE_DECL) is a member template, in the
2381 #define DECL_MEMBER_TEMPLATE_P(NODE) \
2382 (DECL_LANG_FLAG_1 (TEMPLATE_DECL_CHECK (NODE)))
2384 /* Nonzero if the NODE corresponds to the template parameters for a
2387 #define TEMPLATE_PARMS_FOR_INLINE(NODE) TREE_LANG_FLAG_1 (NODE)
2391 #define FUNCTION_PARAMETER_PACK_P(NODE) \
2392 (DECL_LANG_FLAG_1 (PARM_DECL_CHECK (NODE)))
2394 /* Determines if NODE is an expansion of one or more parameter packs,
2396 #define PACK_EXPANSION_P(NODE) \
2397 (TREE_CODE (NODE) == TYPE_PACK_EXPANSION \
2398 || TREE_CODE (NODE) == EXPR_PACK_EXPANSION)
2402 #define PACK_EXPANSION_PATTERN(NODE) \
2403 (TREE_CODE (NODE) == TYPE_PACK_EXPANSION? TREE_TYPE (NODE) \
2404 : TREE_OPERAND (NODE, 0))
2408 #define SET_PACK_EXPANSION_PATTERN(NODE,VALUE) \
2409 if (TREE_CODE (NODE) == TYPE_PACK_EXPANSION) \
2410 TREE_TYPE (NODE) = VALUE; \
2412 TREE_OPERAND (NODE, 0) = VALUE
2414 /* The list of parameter packs used in the PACK_EXPANSION_* node. The
2416 #define PACK_EXPANSION_PARAMETER_PACKS(NODE) TREE_CHAIN (NODE)
2419 #define ARGUMENT_PACK_P(NODE) \
2420 (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK \
2421 || TREE_CODE (NODE) == NONTYPE_ARGUMENT_PACK)
2425 #define ARGUMENT_PACK_ARGS(NODE) \
2426 (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK? TREE_TYPE (NODE) \
2427 : TREE_OPERAND (NODE, 0))
2431 #define SET_ARGUMENT_PACK_ARGS(NODE,VALUE) \
2432 if (TREE_CODE (NODE) == TYPE_ARGUMENT_PACK) \
2433 TREE_TYPE (NODE) = VALUE; \
2435 TREE_OPERAND (NODE, 0) = VALUE
2443 #define ARGUMENT_PACK_INCOMPLETE_P(NODE) \
2444 TREE_LANG_FLAG_0 (ARGUMENT_PACK_ARGS (NODE))
2448 #define ARGUMENT_PACK_EXPLICIT_ARGS(NODE) \
2449 TREE_TYPE (ARGUMENT_PACK_ARGS (NODE))
2453 #define ARGUMENT_PACK_SELECT_FROM_PACK(NODE) \
2454 (((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->argument_pack)
2458 #define ARGUMENT_PACK_SELECT_INDEX(NODE) \
2459 (((struct tree_argument_pack_select *)ARGUMENT_PACK_SELECT_CHECK (NODE))->index)
2463 #define ARGUMENT_PACK_SELECT_ARG(NODE) \
2464 TREE_VEC_ELT (ARGUMENT_PACK_ARGS (ARGUMENT_PACK_SELECT_FROM_PACK (NODE)), \
2465 ARGUMENT_PACK_SELECT_INDEX (NODE));
2468 #define DECL_SAVED_FUNCTION_DATA(NODE) \
2469 (DECL_LANG_SPECIFIC (FUNCTION_DECL_CHECK (NODE)) \
2473 #define REFERENCE_REF_P(NODE) \
2474 TREE_LANG_FLAG_0 (INDIRECT_REF_CHECK (NODE))
2476 #define NEW_EXPR_USE_GLOBAL(NODE) \
2477 TREE_LANG_FLAG_0 (NEW_EXPR_CHECK (NODE))
2478 #define DELETE_EXPR_USE_GLOBAL(NODE) \
2479 TREE_LANG_FLAG_0 (DELETE_EXPR_CHECK (NODE))
2480 #define DELETE_EXPR_USE_VEC(NODE) \
2481 TREE_LANG_FLAG_1 (DELETE_EXPR_CHECK (NODE))
2485 #define COMPOUND_EXPR_OVERLOADED(NODE) \
2486 TREE_LANG_FLAG_0 (COMPOUND_EXPR_CHECK (NODE))
2490 #define KOENIG_LOOKUP_P(NODE) TREE_LANG_FLAG_0 (CALL_EXPR_CHECK (NODE))
2495 #define PAREN_STRING_LITERAL_P(NODE) \
2496 TREE_LANG_FLAG_0 (STRING_CST_CHECK (NODE))
2500 #define AGGR_INIT_VIA_CTOR_P(NODE) \
2501 TREE_LANG_FLAG_0 (AGGR_INIT_EXPR_CHECK (NODE))
2505 #define AGGR_INIT_ZERO_FIRST(NODE) \
2506 TREE_LANG_FLAG_2 (AGGR_INIT_EXPR_CHECK (NODE))
2512 #define AGGR_INIT_EXPR_FN(NODE) TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 1)
2513 #define AGGR_INIT_EXPR_SLOT(NODE) \
2514 TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 2)
2515 #define AGGR_INIT_EXPR_ARG(NODE, I) \
2516 TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), (I) + 3)
2517 #define aggr_init_expr_nargs(NODE) (VL_EXP_OPERAND_LENGTH(NODE) - 3)
2519 /* AGGR_INIT_EXPR_ARGP returns a pointer to the argument vector for NODE.
2520 We can't use &AGGR_INIT_EXPR_ARG (NODE, 0) because that will complain if
2525 #define AGGR_INIT_EXPR_ARGP(NODE) \
2526 (&(TREE_OPERAND (AGGR_INIT_EXPR_CHECK (NODE), 0)) + 3)
2539 arguments from AGGR_INIT_EXPR node EXP. */
2591 #define CLASSTYPE_IS_TEMPLATE(NODE) \
2592 (CLASSTYPE_TEMPLATE_INFO (NODE) \
2593 && !CLASSTYPE_USE_TEMPLATE (NODE) \
2594 && PRIMARY_TEMPLATE_P (CLASSTYPE_TI_TEMPLATE (NODE)))
2600 #define TYPENAME_TYPE_FULLNAME(NODE) (TYPENAME_TYPE_CHECK (NODE))->type.values
2603 #define TYPENAME_IS_ENUM_P(NODE) \
2604 (TREE_LANG_FLAG_0 (TYPENAME_TYPE_CHECK (NODE)))
2608 #define TYPENAME_IS_CLASS_P(NODE) \
2609 (TREE_LANG_FLAG_1 (TYPENAME_TYPE_CHECK (NODE)))
2612 #define TYPENAME_IS_RESOLVING_P(NODE) \
2613 (TREE_LANG_FLAG_2 (TYPENAME_TYPE_CHECK (NODE)))
2617 #define TREE_NEGATED_INT(NODE) TREE_LANG_FLAG_0 (INTEGER_CST_CHECK (NODE))
2623 #define TYPE_POLYMORPHIC_P(NODE) (TREE_LANG_FLAG_2 (NODE))
2626 #define TYPE_CONTAINS_VPTR_P(NODE) \
2627 (TYPE_POLYMORPHIC_P (NODE) || CLASSTYPE_VBASECLASSES (NODE))
2631 #define DECL_DEAD_FOR_LOCAL(NODE) DECL_LANG_FLAG_7 (VAR_DECL_CHECK (NODE))
2635 #define DECL_ERROR_REPORTED(NODE) DECL_LANG_FLAG_0 (VAR_DECL_CHECK (NODE))
2637 /* Nonzero if NODE is a FUNCTION_DECL (for a function with global
2639 #define DECL_LOCAL_FUNCTION_P(NODE) \
2640 DECL_LANG_FLAG_0 (FUNCTION_DECL_CHECK (NODE))
2642 /* Nonzero if NODE is a DECL which we know about but which has not
2646 #define DECL_ANTICIPATED(NODE) \
2647 (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.anticipated_p)
2649 /* Nonzero if NODE is a FUNCTION_DECL which was declared as a friend
2652 #define DECL_HIDDEN_FRIEND_P(NODE) \
2653 (DECL_LANG_SPECIFIC (DECL_COMMON_CHECK (NODE))->decl_flags.hidden_friend_p)
2800 #define TYPE_HAS_USER_CONSTRUCTOR(NODE) (TYPE_LANG_FLAG_1 (NODE))
2816 #define TREE_HAS_CONSTRUCTOR(NODE) (TREE_LANG_FLAG_4 (NODE))
2818 /* True if NODE is a brace-enclosed initializer. */
2819 #define BRACE_ENCLOSED_INITIALIZER_P(NODE) \
2820 (TREE_CODE (NODE) == CONSTRUCTOR && TREE_TYPE (NODE) == init_list_type_node)
2822 /* True if NODE is a compound-literal, i.e., a brace-enclosed
2824 #define COMPOUND_LITERAL_P(NODE) \
2825 (TREE_CODE (NODE) == CONSTRUCTOR && TREE_HAS_CONSTRUCTOR (NODE))
2827 #define EMPTY_CONSTRUCTOR_P(NODE) (TREE_CODE (NODE) == CONSTRUCTOR \
2829 CONSTRUCTOR_ELTS (NODE)) \
2830 && !TREE_HAS_CONSTRUCTOR (NODE))
2832 /* True if NODE is a init-list used as a direct-initializer, i.e.
2834 #define CONSTRUCTOR_IS_DIRECT_INIT(NODE) (TREE_LANG_FLAG_0 (CONSTRUCTOR_CHECK (NODE)))
2838 #define CLASSTYPE_NON_AGGREGATE(NODE) \
2839 (LANG_TYPE_CLASS_CHECK (NODE)->non_aggregate)
2840 #define TYPE_NON_AGGREGATE_CLASS(NODE) \
2841 (CLASS_TYPE_P (NODE) && CLASSTYPE_NON_AGGREGATE (NODE))
2844 #define TYPE_HAS_COMPLEX_ASSIGN_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_assign_ref)
2847 #define TYPE_HAS_COMPLEX_INIT_REF(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_init_ref)
2850 #define TYPE_HAS_COMPLEX_DFLT(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->has_complex_dflt)
2863 #define TYPE_HAS_TRIVIAL_DESTRUCTOR(NODE) \
2864 (!TYPE_HAS_NONTRIVIAL_DESTRUCTOR (NODE))
2866 /* Nonzero for _TYPE node means that this type does not have a trivial
2870 #define TYPE_HAS_NONTRIVIAL_DESTRUCTOR(NODE) \
2871 (TYPE_LANG_FLAG_4 (NODE))
2874 #define TYPE_HAS_TRIVIAL_DFLT(NODE) \
2875 (TYPE_HAS_DEFAULT_CONSTRUCTOR (NODE) && ! TYPE_HAS_COMPLEX_DFLT (NODE))
2879 #define TYPE_HAS_TRIVIAL_INIT_REF(NODE) \
2880 (TYPE_HAS_INIT_REF (NODE) && ! TYPE_HAS_COMPLEX_INIT_REF (NODE))
2884 #define TYPE_HAS_TRIVIAL_ASSIGN_REF(NODE) \
2885 (TYPE_HAS_ASSIGN_REF (NODE) && ! TYPE_HAS_COMPLEX_ASSIGN_REF (NODE))
2887 /* Returns true if NODE is a pointer-to-data-member. */
2888 #define TYPE_PTRMEM_P(NODE) \
2889 (TREE_CODE (NODE) == OFFSET_TYPE)
2890 /* Returns true if NODE is a pointer. */
2891 #define TYPE_PTR_P(NODE) \
2892 (TREE_CODE (NODE) == POINTER_TYPE)
2894 /* Returns true if NODE is an object type:
2902 #define TYPE_OBJ_P(NODE) \
2903 (TREE_CODE (NODE) != REFERENCE_TYPE \
2904 && TREE_CODE (NODE) != VOID_TYPE \
2905 && TREE_CODE (NODE) != FUNCTION_TYPE \
2906 && TREE_CODE (NODE) != METHOD_TYPE)
2908 /* Returns true if NODE is a pointer to an object. Keep these checks
2910 #define TYPE_PTROB_P(NODE) \
2911 (TYPE_PTR_P (NODE) && TYPE_OBJ_P (TREE_TYPE (NODE)))
2913 /* Returns true if NODE is a reference to an object. Keep these checks
2915 #define TYPE_REF_OBJ_P(NODE) \
2916 (TREE_CODE (NODE) == REFERENCE_TYPE && TYPE_OBJ_P (TREE_TYPE (NODE)))
2918 /* True if reference type NODE is an rvalue reference */
2919 #define TYPE_REF_IS_RVALUE(NODE) \
2920 TREE_LANG_FLAG_0 (REFERENCE_TYPE_CHECK (NODE))
2922 /* Returns true if NODE is a pointer to an object, or a pointer to
2924 #define TYPE_PTROBV_P(NODE) \
2925 (TYPE_PTR_P (NODE) \
2926 && !(TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE \
2927 || TREE_CODE (TREE_TYPE (NODE)) == METHOD_TYPE))
2929 /* Returns true if NODE is a pointer to function. */
2930 #define TYPE_PTRFN_P(NODE) \
2931 (TREE_CODE (NODE) == POINTER_TYPE \
2932 && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
2934 /* Returns true if NODE is a reference to function. */
2935 #define TYPE_REFFN_P(NODE) \
2936 (TREE_CODE (NODE) == REFERENCE_TYPE \
2937 && TREE_CODE (TREE_TYPE (NODE)) == FUNCTION_TYPE)
2939 /* Nonzero for _TYPE node means that this type is a pointer to member
2941 #define TYPE_PTRMEMFUNC_P(NODE) \
2942 (TREE_CODE (NODE) == RECORD_TYPE \
2943 && TYPE_LANG_SPECIFIC (NODE) \
2944 && TYPE_PTRMEMFUNC_FLAG (NODE))
2946 #define TYPE_PTRMEMFUNC_FLAG(NODE) \
2947 (LANG_TYPE_CLASS_CHECK (NODE)->ptrmemfunc_flag)
2949 /* Returns true if NODE is a pointer-to-member. */
2950 #define TYPE_PTR_TO_MEMBER_P(NODE) \
2951 (TYPE_PTRMEM_P (NODE) || TYPE_PTRMEMFUNC_P (NODE))
2955 #define PTRMEM_OK_P(NODE) \
2956 TREE_LANG_FLAG_0 (TREE_CHECK2 ((NODE), ADDR_EXPR, OFFSET_REF))
2961 #define TYPE_PTRMEMFUNC_FN_TYPE(NODE) \
2962 (TREE_TYPE (TYPE_FIELDS (NODE)))
2965 #define TYPE_PTRMEMFUNC_OBJECT_TYPE(NODE) \
2966 TYPE_METHOD_BASETYPE (TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (NODE)))
2970 #define TYPE_GET_PTRMEMFUNC_TYPE(NODE) \
2971 (TYPE_LANG_SPECIFIC (NODE) ? LANG_TYPE_PTRMEM_CHECK (NODE)->record : NULL)
2972 #define TYPE_SET_PTRMEMFUNC_TYPE(NODE, VALUE) \
2974 if (TYPE_LANG_SPECIFIC (NODE) == NULL) \
2976 TYPE_LANG_SPECIFIC (NODE) = GGC_CNEWVAR \
2978 TYPE_LANG_SPECIFIC (NODE)->u.ptrmem.h.is_lang_type_class = 0; \
2980 TYPE_LANG_SPECIFIC (NODE)->u.ptrmem.record = (VALUE); \
2988 #define TYPE_PTRMEM_CLASS_TYPE(NODE) \
2989 (TYPE_PTRMEM_P (NODE) \
2990 ? TYPE_OFFSET_BASETYPE (NODE) \
2991 : TYPE_PTRMEMFUNC_OBJECT_TYPE (NODE))
2994 #define TYPE_PTRMEM_POINTED_TO_TYPE(NODE) \
2995 (TYPE_PTRMEM_P (NODE) \
2996 ? TREE_TYPE (NODE) \
2997 : TREE_TYPE (TYPE_PTRMEMFUNC_FN_TYPE (NODE)))
3001 #define PTRMEM_CST_CLASS(NODE) \
3002 TYPE_PTRMEM_CLASS_TYPE (TREE_TYPE (PTRMEM_CST_CHECK (NODE)))
3006 #define PTRMEM_CST_MEMBER(NODE) (((ptrmem_cst_t)PTRMEM_CST_CHECK (NODE))->member)
3009 #define TYPEOF_TYPE_EXPR(NODE) (TYPEOF_TYPE_CHECK (NODE))->type.values
3012 #define DECLTYPE_TYPE_EXPR(NODE) (DECLTYPE_TYPE_CHECK (NODE))->type.values
3014 /* Whether the DECLTYPE_TYPE_EXPR of NODE was originally parsed as an
3017 #define DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P(NODE) \
3018 (DECLTYPE_TYPE_CHECK (NODE))->type.string_flag
3020 /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `extern' was
3023 #define DECL_THIS_EXTERN(NODE) \
3024 DECL_LANG_FLAG_2 (VAR_FUNCTION_OR_PARM_DECL_CHECK (NODE))
3026 /* Nonzero for VAR_DECL and FUNCTION_DECL node means that `static' was
3029 #define DECL_THIS_STATIC(NODE) \
3030 DECL_LANG_FLAG_6 (VAR_FUNCTION_OR_PARM_DECL_CHECK (NODE))
3032 /* Nonzero for FIELD_DECL node means that this field is a base class
3034 #define DECL_FIELD_IS_BASE(NODE) \
3035 DECL_LANG_FLAG_6 (FIELD_DECL_CHECK (NODE))
3040 #define ANON_AGGR_TYPE_P(NODE) \
3041 (CLASS_TYPE_P (NODE) && LANG_TYPE_CLASS_CHECK (NODE)->anon_aggr)
3042 #define SET_ANON_AGGR_TYPE_P(NODE) \
3043 (LANG_TYPE_CLASS_CHECK (NODE)->anon_aggr = 1)
3046 #define ANON_UNION_TYPE_P(NODE) \
3047 (TREE_CODE (NODE) == UNION_TYPE && ANON_AGGR_TYPE_P (NODE))
3053 #define TYPE_WAS_ANONYMOUS(NODE) (LANG_TYPE_CLASS_CHECK (NODE)->was_anonymous)
3057 /* The format of each node in the DECL_FRIENDLIST is as follows:
3062 #define DECL_FRIENDLIST(NODE) (DECL_INITIAL (NODE))
3067 each node is a type; the TREE_VALUE is the access granted for this
3071 protected_access_node will appear in the DECL_ACCESS for the node. */
3072 #define DECL_ACCESS(NODE) (LANG_DECL_U2_CHECK (NODE, 0)->access)
3075 #define DECL_GLOBAL_CTOR_P(NODE) \
3076 (DECL_LANG_SPECIFIC (NODE)->decl_flags.global_ctor_p)
3079 #define DECL_GLOBAL_DTOR_P(NODE) \
3080 (DECL_LANG_SPECIFIC (NODE)->decl_flags.global_dtor_p)
3084 /* The DECL_TEMPLATE_PARMS are a list. The TREE_PURPOSE of each node
3095 #define DECL_TEMPLATE_PARMS(NODE) DECL_NON_COMMON_CHECK (NODE)->decl_non_common.arguments
3096 #define DECL_INNERMOST_TEMPLATE_PARMS(NODE) \
3097 INNERMOST_TEMPLATE_PARMS (DECL_TEMPLATE_PARMS (NODE))
3098 #define DECL_NTPARMS(NODE) \
3099 TREE_VEC_LENGTH (DECL_INNERMOST_TEMPLATE_PARMS (NODE))
3101 #define DECL_TEMPLATE_RESULT(NODE) DECL_RESULT_FLD (NODE)
3112 In both cases, the TREE_PURPOSE of each node contains the arguments
3127 #define DECL_TEMPLATE_INSTANTIATIONS(NODE) DECL_VINDEX (NODE)
3155 example above.) The TREE_TYPE is the _TYPE node for the partial
3159 #define DECL_TEMPLATE_SPECIALIZATIONS(NODE) DECL_SIZE (NODE)
3163 #define DECL_TEMPLATE_PARM_P(NODE) \
3164 (DECL_LANG_FLAG_0 (NODE) \
3165 && (TREE_CODE (NODE) == CONST_DECL \
3166 || TREE_CODE (NODE) == PARM_DECL \
3167 || TREE_CODE (NODE) == TYPE_DECL \
3168 || TREE_CODE (NODE) == TEMPLATE_DECL))
3170 /* Mark NODE as a template parameter. */
3171 #define SET_DECL_TEMPLATE_PARM_P(NODE) \
3172 (DECL_LANG_FLAG_0 (NODE) = 1)
3174 /* Nonzero if NODE is a template template parameter. */
3175 #define DECL_TEMPLATE_TEMPLATE_PARM_P(NODE) \
3176 (TREE_CODE (NODE) == TEMPLATE_DECL && DECL_TEMPLATE_PARM_P (NODE))
3178 /* Nonzero if NODE is a TEMPLATE_DECL representing an
3179 UNBOUND_CLASS_TEMPLATE tree node. */
3180 #define DECL_UNBOUND_CLASS_TEMPLATE_P(NODE) \
3181 (TREE_CODE (NODE) == TEMPLATE_DECL && !DECL_TEMPLATE_RESULT (NODE))
3183 #define DECL_FUNCTION_TEMPLATE_P(NODE) \
3184 (TREE_CODE (NODE) == TEMPLATE_DECL \
3185 && !DECL_UNBOUND_CLASS_TEMPLATE_P (NODE) \
3186 && TREE_CODE (DECL_TEMPLATE_RESULT (NODE)) == FUNCTION_DECL)
3189 #define DECL_CLASS_TEMPLATE_P(NODE) \
3190 (TREE_CODE (NODE) == TEMPLATE_DECL \
3191 && !DECL_UNBOUND_CLASS_TEMPLATE_P (NODE) \
3192 && TREE_CODE (DECL_TEMPLATE_RESULT (NODE)) == TYPE_DECL \
3193 && !DECL_TEMPLATE_TEMPLATE_PARM_P (NODE))
3195 /* Nonzero if NODE which declares a type. */
3196 #define DECL_DECLARES_TYPE_P(NODE) \
3197 (TREE_CODE (NODE) == TYPE_DECL || DECL_CLASS_TEMPLATE_P (NODE))
3199 /* Nonzero if NODE is the typedef implicitly generated for a type when
3206 #define DECL_IMPLICIT_TYPEDEF_P(NODE) \
3207 (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_2 (NODE))
3208 #define SET_DECL_IMPLICIT_TYPEDEF_P(NODE) \
3209 (DECL_LANG_FLAG_2 (NODE) = 1)
3210 #define DECL_SELF_REFERENCE_P(NODE) \
3211 (TREE_CODE (NODE) == TYPE_DECL && DECL_LANG_FLAG_4 (NODE))
3212 #define SET_DECL_SELF_REFERENCE_P(NODE) \
3213 (DECL_LANG_FLAG_4 (NODE) = 1)
3220 #define DECL_PRIMARY_TEMPLATE(NODE) \
3221 (TREE_TYPE (DECL_INNERMOST_TEMPLATE_PARMS (NODE)))
3223 /* Returns nonzero if NODE is a primary template. */
3224 #define PRIMARY_TEMPLATE_P(NODE) (DECL_PRIMARY_TEMPLATE (NODE) == (NODE))
3226 /* Nonzero iff NODE is a specialization of a template. The value
3239 Note that NODE will be marked as a specialization even if the
3252 #define DECL_USE_TEMPLATE(NODE) (DECL_LANG_SPECIFIC (NODE)->decl_flags.use_template)
3255 #define CLASSTYPE_USE_TEMPLATE(NODE) \
3256 (LANG_TYPE_CLASS_CHECK (NODE)->use_template)
3258 /* True if NODE is a specialization of a primary template. */
3259 #define CLASSTYPE_SPECIALIZATION_OF_PRIMARY_TEMPLATE_P(NODE) \
3260 (CLASS_TYPE_P (NODE) \
3261 && CLASSTYPE_USE_TEMPLATE (NODE) \
3264 #define DECL_TEMPLATE_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) & 1)
3265 #define CLASSTYPE_TEMPLATE_INSTANTIATION(NODE) \
3266 (CLASSTYPE_USE_TEMPLATE (NODE) & 1)
3268 #define DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) == 2)
3269 #define SET_DECL_TEMPLATE_SPECIALIZATION(NODE) (DECL_USE_TEMPLATE (NODE) = 2)
3273 #define CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
3274 (CLASSTYPE_USE_TEMPLATE (NODE) == 2)
3275 #define SET_CLASSTYPE_TEMPLATE_SPECIALIZATION(NODE) \
3276 (CLASSTYPE_USE_TEMPLATE (NODE) = 2)
3278 #define DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 1)
3279 #define SET_DECL_IMPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 1)
3280 #define CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
3281 (CLASSTYPE_USE_TEMPLATE (NODE) == 1)
3282 #define SET_CLASSTYPE_IMPLICIT_INSTANTIATION(NODE) \
3283 (CLASSTYPE_USE_TEMPLATE (NODE) = 1)
3285 #define DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) == 3)
3286 #define SET_DECL_EXPLICIT_INSTANTIATION(NODE) (DECL_USE_TEMPLATE (NODE) = 3)
3287 #define CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
3288 (CLASSTYPE_USE_TEMPLATE (NODE) == 3)
3289 #define SET_CLASSTYPE_EXPLICIT_INSTANTIATION(NODE) \
3290 (CLASSTYPE_USE_TEMPLATE (NODE) = 3)
3311 #define DECL_TEMPLATE_INSTANTIATED(NODE) \
3312 DECL_LANG_FLAG_1 (VAR_OR_FUNCTION_DECL_CHECK (NODE))
3315 #define DECL_INTERFACE_KNOWN(NODE) DECL_LANG_FLAG_5 (NODE)
3324 #define DECL_NOT_REALLY_EXTERN(NODE) \
3325 (DECL_LANG_SPECIFIC (NODE)->decl_flags.not_really_extern)
3327 #define DECL_REALLY_EXTERN(NODE) \
3328 (DECL_EXTERNAL (NODE) && ! DECL_NOT_REALLY_EXTERN (NODE))
3391 /* For thunk NODE, this is the FUNCTION_DECL thunked to. It is
3393 #define THUNK_TARGET(NODE) \
3394 (DECL_LANG_SPECIFIC (NODE)->u.f.befriending_classes)
3398 #define QUALIFIED_NAME_IS_TEMPLATE(NODE) \
3399 (TREE_LANG_FLAG_0 (SCOPE_REF_CHECK (NODE)))
3403 #define OMP_ATOMIC_DEPENDENT_P(NODE) \
3404 (TREE_CODE (TREE_OPERAND (OMP_ATOMIC_CHECK (NODE), 0)) == INTEGER_CST)
3407 #define OMP_FOR_GIMPLIFYING_P(NODE) \
3408 (TREE_LANG_FLAG_0 (OMP_FOR_CHECK (NODE)))
3413 #define CP_OMP_CLAUSE_INFO(NODE) \
3414 TREE_TYPE (OMP_CLAUSE_RANGE_CHECK (NODE, OMP_CLAUSE_PRIVATE, \
3419 #define TRY_STMTS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 0)
3420 #define TRY_HANDLERS(NODE) TREE_OPERAND (TRY_BLOCK_CHECK (NODE), 1)
3422 #define EH_SPEC_STMTS(NODE) TREE_OPERAND (EH_SPEC_BLOCK_CHECK (NODE), 0)
3423 #define EH_SPEC_RAISES(NODE) TREE_OPERAND (EH_SPEC_BLOCK_CHECK (NODE), 1)
3425 #define USING_STMT_NAMESPACE(NODE) TREE_OPERAND (USING_STMT_CHECK (NODE), 0)
3428 #define FN_TRY_BLOCK_P(NODE) TREE_LANG_FLAG_3 (TRY_BLOCK_CHECK (NODE))
3429 #define HANDLER_PARMS(NODE) TREE_OPERAND (HANDLER_CHECK (NODE), 0)
3430 #define HANDLER_BODY(NODE) TREE_OPERAND (HANDLER_CHECK (NODE), 1)
3431 #define HANDLER_TYPE(NODE) TREE_TYPE (HANDLER_CHECK (NODE))
3435 #define CLEANUP_BODY(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 0)
3436 #define CLEANUP_EXPR(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 1)
3437 #define CLEANUP_DECL(NODE) TREE_OPERAND (CLEANUP_STMT_CHECK (NODE), 2)
3442 #define IF_COND(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 0)
3443 #define THEN_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 1)
3444 #define ELSE_CLAUSE(NODE) TREE_OPERAND (IF_STMT_CHECK (NODE), 2)
3448 #define WHILE_COND(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 0)
3449 #define WHILE_BODY(NODE) TREE_OPERAND (WHILE_STMT_CHECK (NODE), 1)
3453 #define DO_COND(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 0)
3454 #define DO_BODY(NODE) TREE_OPERAND (DO_STMT_CHECK (NODE), 1)
3459 #define FOR_INIT_STMT(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 0)
3460 #define FOR_COND(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 1)
3461 #define FOR_EXPR(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 2)
3462 #define FOR_BODY(NODE) TREE_OPERAND (FOR_STMT_CHECK (NODE), 3)
3464 #define SWITCH_STMT_COND(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 0)
3465 #define SWITCH_STMT_BODY(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 1)
3466 #define SWITCH_STMT_TYPE(NODE) TREE_OPERAND (SWITCH_STMT_CHECK (NODE), 2)
3469 #define STMT_EXPR_STMT(NODE) TREE_OPERAND (STMT_EXPR_CHECK (NODE), 0)
3473 #define EXPR_STMT_EXPR(NODE) TREE_OPERAND (EXPR_STMT_CHECK (NODE), 0)
3477 #define TARGET_EXPR_IMPLICIT_P(NODE) \
3478 TREE_LANG_FLAG_0 (TARGET_EXPR_CHECK (NODE))
3482 #define TARGET_EXPR_LIST_INIT_P(NODE) \
3483 TREE_LANG_FLAG_1 (TARGET_EXPR_CHECK (NODE))
3627 /* Node for "pointer to (virtual) function".
3898 #define TEMPLATE_PARM_INDEX_CAST(NODE) \
3899 ((template_parm_index*)TEMPLATE_PARM_INDEX_CHECK (NODE))
3900 #define TEMPLATE_PARM_IDX(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->index)
3901 #define TEMPLATE_PARM_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->level)
3902 #define TEMPLATE_PARM_DESCENDANTS(NODE) (TREE_CHAIN (NODE))
3903 #define TEMPLATE_PARM_ORIG_LEVEL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->orig_level)
3904 #define TEMPLATE_PARM_DECL(NODE) (TEMPLATE_PARM_INDEX_CAST (NODE)->decl)
3905 #define TEMPLATE_PARM_PARAMETER_PACK(NODE) \
3906 (TREE_LANG_FLAG_0 (TEMPLATE_PARM_INDEX_CHECK (NODE)))
3910 #define TEMPLATE_TYPE_PARM_INDEX(NODE) \
3911 (TREE_CHECK3 ((NODE), TEMPLATE_TYPE_PARM, TEMPLATE_TEMPLATE_PARM, \
3913 #define TEMPLATE_TYPE_IDX(NODE) \
3914 (TEMPLATE_PARM_IDX (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3915 #define TEMPLATE_TYPE_LEVEL(NODE) \
3916 (TEMPLATE_PARM_LEVEL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3917 #define TEMPLATE_TYPE_ORIG_LEVEL(NODE) \
3918 (TEMPLATE_PARM_ORIG_LEVEL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3919 #define TEMPLATE_TYPE_DECL(NODE) \
3920 (TEMPLATE_PARM_DECL (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3921 #define TEMPLATE_TYPE_PARAMETER_PACK(NODE) \
3922 (TEMPLATE_PARM_PARAMETER_PACK (TEMPLATE_TYPE_PARM_INDEX (NODE)))
3958 node. */
3959 #define TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL(NODE) \
3960 ((TREE_CODE (NODE) == BOUND_TEMPLATE_TEMPLATE_PARM) \
3961 ? TYPE_TI_TEMPLATE (NODE) \
3962 : TYPE_NAME (NODE))
4168 /* The original node. Can be either a DECL (for a function or static