このページを編集する際は,編集に関する方針に従ってください.[]
概要[]
引数[]
- pretty_printer * pp
- text_info *text
- const char *spec
- int precision
- bool wide
- bool set_locus
- bool hash
実装[]
1379 /* Default tree printer. Handles declarations only. */
1380 static bool
1381 default_tree_printer (pretty_printer * pp, text_info *text, const char *spec,
1382 int precision, bool wide, bool set_locus, bool hash)
1383 {
1384 tree t;
1385
1386 /* FUTURE: %+x should set the locus. */
1387 if (precision != 0 || wide || hash)
1388 return false;
1389
1390 switch (*spec)
1391 {
1392 case 'D':
1393 t = va_arg (*text->args_ptr, tree);
1394 if (DECL_DEBUG_EXPR_IS_FROM (t) && DECL_DEBUG_EXPR (t))
1395 t = DECL_DEBUG_EXPR (t);
1396 break;
1397
1398 case 'F':
1399 case 'T':
1400 t = va_arg (*text->args_ptr, tree);
1401 break;
1402
1403 default:
1404 return false;
1405 }
1406
1407 if (set_locus && text->locus)
1408 *text->locus = DECL_SOURCE_LOCATION (t);
1409
1410 if (DECL_P (t))
1411 {
1412 const char *n = DECL_NAME (t)
1413 ? lang_hooks.decl_printable_name (t, 2)
1414 : "<anonymous>";
1415 pp_string (pp, n);
1416 }
1417 else
1418 dump_generic_node (pp, t, 0, 0, 0);
1419
1420 return true;
1421 }