本文整理汇总了C++中dump_maybe_newline函数的典型用法代码示例。如果您正苦于以下问题:C++ dump_maybe_newline函数的具体用法?C++ dump_maybe_newline怎么用?C++ dump_maybe_newline使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了dump_maybe_newline函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: dump_pointer
void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
di->column += 15;
}
示例2: queue_and_dump_index
void
queue_and_dump_index (dump_info_p di, const char *field, const_tree t, int flags)
{
unsigned int index;
splay_tree_node n;
/* If there's no node, just return. This makes for fewer checks in
our callers. */
if (!t)
return;
/* See if we've already queued or dumped this node. */
n = splay_tree_lookup (di->nodes, (splay_tree_key) t);
if (n)
index = ((dump_node_info_p) n->value)->index;
else
/* If we haven't, add it to the queue. */
index = queue (di, t, flags);
/* Print the index of the node. */
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: ", field);
di->column += 6;
dump_index (di, index);
}
示例3: dump_int
void
dump_int (dump_info_p di, const char *field, int i)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7d ", field, i);
di->column += 14;
}
示例4: dump_pointer
void
dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-8" HOST_WIDE_INT_PRINT "x ", field,
(unsigned HOST_WIDE_INT) (uintptr_t) ptr);
di->column += 15;
}
示例5: gcc_dump_int
void
gcc_dump_int (dump_info_p di, const char *field, int i)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7d ", field, i);
astTreeBuilder->addIntProperty(field,i);
di->column += 14;
}
示例6: gcc_dump_pointer
void
gcc_dump_pointer (dump_info_p di, const char *field, void *ptr)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-8lx ", field, (unsigned long) ptr);
astTreeBuilder->addULongProperty(field,(unsigned long) ptr);
di->column += 15;
}
示例7: dump_fixed
static void
dump_fixed (dump_info_p di, const char *field, const FIXED_VALUE_TYPE *f)
{
char buf[32];
fixed_to_decimal (buf, f, sizeof (buf));
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %s ", field, buf);
di->column += strlen (buf) + 7;
}
示例8: dump_real
static void
dump_real (dump_info_p di, const char *field, const REAL_VALUE_TYPE *r)
{
char buf[32];
real_to_decimal (buf, r, sizeof (buf), 0, true);
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %s ", field, buf);
di->column += strlen (buf) + 7;
}
示例9: dump_string_field
void
dump_string_field (dump_info_p di, const char *field, const char *string)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7s ", field, string);
if (strlen (string) > 7)
di->column += 6 + strlen (string) + 1;
else
di->column += 14;
}
示例10: dump_string
void
dump_string (dump_info_p di, const char *string)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-13s ", string);
if (strlen (string) > 13)
di->column += strlen (string) + 1;
else
di->column += 14;
}
示例11: gcc_dump_string_field
void
gcc_dump_string_field (dump_info_p di, const char *field, const char *string)
{
dump_maybe_newline (di);
fprintf (di->stream, "%-4s: %-7s ", field, string);
astTreeBuilder->addStringProperty(field,string);
if (strlen (string) > 7)
di->column += 6 + strlen (string) + 1;
else
di->column += 14;
}
示例12: gcc_dump_string
void
gcc_dump_string (dump_info_p di, const char *string)
{
//why call this?
dump_maybe_newline (di);
fprintf (di->stream, "%-13s ", string);
astTreeBuilder->addString(string);
if (strlen (string) > 13)
di->column += strlen (string) + 1;
else
di->column += 14;
}
示例13: dequeue_and_dump
//.........这里部分代码省略.........
break;
case tcc_expression:
case tcc_reference:
case tcc_statement:
case tcc_vl_exp:
/* These nodes are handled explicitly below. */
break;
default:
gcc_unreachable ();
}
}
else if (DECL_P (t))
{
expanded_location xloc;
/* All declarations have names. */
if (DECL_NAME (t))
dump_child ("name", DECL_NAME (t));
if (DECL_ASSEMBLER_NAME_SET_P (t)
&& DECL_ASSEMBLER_NAME (t) != DECL_NAME (t))
dump_child ("mngl", DECL_ASSEMBLER_NAME (t));
if (DECL_ABSTRACT_ORIGIN (t))
dump_child ("orig", DECL_ABSTRACT_ORIGIN (t));
/* And types. */
queue_and_dump_type (di, t);
dump_child ("scpe", DECL_CONTEXT (t));
/* And a source position. */
xloc = expand_location (DECL_SOURCE_LOCATION (t));
if (xloc.file)
{
const char *filename = lbasename (xloc.file);
dump_maybe_newline (di);
fprintf (di->stream, "srcp: %s:%-6d ", filename,
xloc.line);
di->column += 6 + strlen (filename) + 8;
}
/* And any declaration can be compiler-generated. */
if (CODE_CONTAINS_STRUCT (TREE_CODE (t), TS_DECL_COMMON)
&& DECL_ARTIFICIAL (t))
dump_string_field (di, "note", "artificial");
if (DECL_CHAIN (t) && !dump_flag (di, TDF_SLIM, NULL))
dump_child ("chain", DECL_CHAIN (t));
}
else if (code_class == tcc_type)
{
/* All types have qualifiers. */
int quals = lang_hooks.tree_dump.type_quals (t);
if (quals != TYPE_UNQUALIFIED)
{
fprintf (di->stream, "qual: %c%c%c ",
(quals & TYPE_QUAL_CONST) ? 'c' : ' ',
(quals & TYPE_QUAL_VOLATILE) ? 'v' : ' ',
(quals & TYPE_QUAL_RESTRICT) ? 'r' : ' ');
di->column += 14;
}
/* All types have associated declarations. */
dump_child ("name", TYPE_NAME (t));
/* All types have a main variant. */
if (TYPE_MAIN_VARIANT (t) != t)
dump_child ("unql", TYPE_MAIN_VARIANT (t));