diff options
Diffstat (limited to 'gcc/rust/rust-gcc.cc')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index 74a8b52..23a91ad 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -333,6 +333,8 @@ public: Bexpression *wchar_constant_expression (wchar_t c); + Bexpression *char_constant_expression (char c); + Bexpression *boolean_constant_expression (bool val); Bexpression *real_part_expression (Bexpression *bcomplex, Location); @@ -1557,6 +1559,13 @@ Gcc_backend::wchar_constant_expression (wchar_t c) return this->make_expression (ret); } +Bexpression * +Gcc_backend::char_constant_expression (char c) +{ + tree ret = build_int_cst (this->char_type ()->get_tree (), c); + return this->make_expression (ret); +} + // Make a constant boolean expression. Bexpression * |