diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-06-19 19:49:13 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-19 19:49:13 +0000 |
commit | ace501018b5a3eedc545711814aad14149d16395 (patch) | |
tree | 3038f4f97e6091e4affedf98a2010593c41c2416 /gcc/rust | |
parent | a0c1c0b4001f68c2f4827e65ec23e21fedc2a88d (diff) | |
parent | 8dd844ad0ab6378e6f6317dd93883bc8f642e642 (diff) | |
download | gcc-ace501018b5a3eedc545711814aad14149d16395.zip gcc-ace501018b5a3eedc545711814aad14149d16395.tar.gz gcc-ace501018b5a3eedc545711814aad14149d16395.tar.bz2 |
Merge #505
505: DWARF for Rust primitive types r=philberty a=tromey
I found a couple of small bugs in the DWARF that is emitted for primitive types.
These two patches fix these.
Co-authored-by: Tom Tromey <tom@tromey.com>
Diffstat (limited to 'gcc/rust')
-rw-r--r-- | gcc/rust/rust-gcc.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc index ed89c94..3158c11 100644 --- a/gcc/rust/rust-gcc.cc +++ b/gcc/rust/rust-gcc.cc @@ -1,5 +1,5 @@ // rust-gcc.cc -- Rust frontend to gcc IR. -// Copyright (C) 2011-2020 Free Software Foundation, Inc. +// Copyright (C) 2011-2021 Free Software Foundation, Inc. // Contributed by Ian Lance Taylor, Google. // forked from gccgo @@ -217,10 +217,8 @@ public: Btype *wchar_type () { - // i think this is meant to be 32 bit from - // https://www.unicode.org/versions/Unicode13.0.0/ch03.pdf#G7404 - int precision = 32; - tree wchar = make_unsigned_type (precision); + tree wchar = make_unsigned_type (32); + TYPE_STRING_FLAG (wchar) = 1; return this->make_type (wchar); } @@ -867,8 +865,6 @@ Gcc_backend::integer_type (bool is_unsigned, int bits) { if (bits == INT_TYPE_SIZE) type = unsigned_type_node; - else if (bits == CHAR_TYPE_SIZE) - type = unsigned_char_type_node; else if (bits == SHORT_TYPE_SIZE) type = short_unsigned_type_node; else if (bits == LONG_TYPE_SIZE) @@ -882,8 +878,6 @@ Gcc_backend::integer_type (bool is_unsigned, int bits) { if (bits == INT_TYPE_SIZE) type = integer_type_node; - else if (bits == CHAR_TYPE_SIZE) - type = signed_char_type_node; else if (bits == SHORT_TYPE_SIZE) type = short_integer_type_node; else if (bits == LONG_TYPE_SIZE) |