diff options
author | Philip Herron <philip.herron@embecosm.com> | 2022-10-12 12:25:52 +0100 |
---|---|---|
committer | Arthur Cohen <arthur.cohen@embecosm.com> | 2023-02-21 12:36:33 +0100 |
commit | f49e252824131e2c31de372d3155a458415bbe98 (patch) | |
tree | 92d0b1075b2d325720cf38c43490c0b7913a7f19 | |
parent | 13556413e3841460d88c7a63c8a3049399f6b28e (diff) | |
download | gcc-f49e252824131e2c31de372d3155a458415bbe98.zip gcc-f49e252824131e2c31de372d3155a458415bbe98.tar.gz gcc-f49e252824131e2c31de372d3155a458415bbe98.tar.bz2 |
gccrs: Add mappings for fn_once lang item
gcc/rust/ChangeLog:
* util/rust-lang-item.h: Add `fn_once` lang item.
-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 4d9dc8a..c7e0e5c8 100644 --- a/gcc/rust/util/rust-lang-item.h +++ b/gcc/rust/util/rust-lang-item.h @@ -73,6 +73,9 @@ public: MUT_PTR, CONST_SLICE_PTR, + // functions + FN_ONCE, + UNKNOWN, }; @@ -218,6 +221,10 @@ public: { return ItemType::CONST_SLICE_PTR; } + else if (item.compare ("fn_once") == 0) + { + return ItemType::FN_ONCE; + } return ItemType::UNKNOWN; } @@ -296,6 +303,8 @@ public: return "mut_ptr"; case CONST_SLICE_PTR: return "const_slice_ptr"; + case FN_ONCE: + return "fn_once"; case UNKNOWN: return "<UNKNOWN>"; |