aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-backend.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-11 15:04:26 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-13 09:54:47 +0000
commit3ae8d55860cbe95f80d5e5c76ca71883dbde0e10 (patch)
tree3fc0385c18fe11a4ceb8ae34ad3c208f027efebb /gcc/rust/rust-backend.h
parentfac8276f737351afbde34a85f2b6c224b400313b (diff)
downloadgcc-3ae8d55860cbe95f80d5e5c76ca71883dbde0e10.zip
gcc-3ae8d55860cbe95f80d5e5c76ca71883dbde0e10.tar.gz
gcc-3ae8d55860cbe95f80d5e5c76ca71883dbde0e10.tar.bz2
Add char type
This might need changes in the Lexer to allow for wchar_t to be preserved. Addresses #85
Diffstat (limited to 'gcc/rust/rust-backend.h')
-rw-r--r--gcc/rust/rust-backend.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index 50e8728..c673e52 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -98,6 +98,12 @@ public:
// Get the unnamed boolean type.
virtual Btype *bool_type () = 0;
+ // Get the char type
+ virtual Btype *char_type () = 0;
+
+ // Get the wchar type
+ virtual Btype *wchar_type () = 0;
+
// Get the Host pointer size in bits
virtual int get_pointer_size () = 0;
@@ -294,6 +300,9 @@ public:
// Return an expression for the string value VAL.
virtual Bexpression *string_constant_expression (const std::string &val) = 0;
+ // Get a char literal
+ virtual Bexpression *wchar_constant_expression (wchar_t c) = 0;
+
// Return an expression for the boolean value VAL.
virtual Bexpression *boolean_constant_expression (bool val) = 0;