diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-03-10 13:27:38 +0000 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2022-03-10 16:45:49 +0000 |
commit | a1b065050ba0e19f42d11046e70b1edae33f71e8 (patch) | |
tree | 27841fdf840fde00fb461b334bdd80ca64a95d3f /gcc | |
parent | 77a49507446b67a6c207b4e4fec3639f536b9eca (diff) | |
download | gcc-a1b065050ba0e19f42d11046e70b1edae33f71e8.zip gcc-a1b065050ba0e19f42d11046e70b1edae33f71e8.tar.gz gcc-a1b065050ba0e19f42d11046e70b1edae33f71e8.tar.bz2 |
Add const_ptr lang item mappings
const_ptr is a lang item used as part of the slice implemenation this
adds it to our mappings so we do not error with an unknown lang item.
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-lang-item.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h index cade09d..d2765bf 100644 --- a/gcc/rust/util/rust-lang-item.h +++ b/gcc/rust/util/rust-lang-item.h @@ -68,6 +68,9 @@ public: RANGE_INCLUSIVE, RANGE_TO_INCLUSIVE, + // https://github.com/rust-lang/rust/blob/master/library/core/src/ptr/const_ptr.rs + CONST_PTR, + UNKNOWN, }; @@ -201,6 +204,10 @@ public: { return ItemType::RANGE_TO_INCLUSIVE; } + else if (item.compare ("const_ptr") == 0) + { + return ItemType::CONST_PTR; + } return ItemType::UNKNOWN; } @@ -273,6 +280,8 @@ public: return "RangeInclusive"; case RANGE_TO_INCLUSIVE: return "RangeToInclusive"; + case CONST_PTR: + return "const_ptr"; case UNKNOWN: return "<UNKNOWN>"; |