Introduce float_const_operation

This adds class float_const_operation, an operation holding a
floating-point constant.  Unlike most other new operations, this one
requires a custom 'dump' method.

gdb/ChangeLog
2021-03-08  Tom Tromey  <tom@tromey.com>

	* expprint.c (float_const_operation::dump): New method.
	* expop.h (float_data): New typedef.
	(class float_const_operation): New.
This commit is contained in:
Tom Tromey
2021-03-08 07:27:57 -07:00
parent 75f9892d43
commit cae26a0cb0
3 changed files with 56 additions and 0 deletions

View File

@ -1283,4 +1283,12 @@ dump_for_expression (struct ui_file *stream, int depth,
fprintf_filtered (stream, "\n");
}
void
float_const_operation::dump (struct ui_file *stream, int depth) const
{
fprintf_filtered (stream, _("%*sFloat: "), depth, "");
print_floating (m_data.data (), m_type, stream);
fprintf_filtered (stream, "\n");
}
} /* namespace expr */