diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2022-10-13 15:09:01 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-13 15:09:01 +0000 |
commit | 8cbcff46d34c998239dfa1792fe7459699658c62 (patch) | |
tree | 1e010a30309e8da10129996a2842f6cb09a111c7 /gcc | |
parent | 1a871569f66cdf1a0aabb3a50d5877a8b1c9db85 (diff) | |
parent | 0a9a3e826faa319a5c0e6d4ca273db2b735a6beb (diff) | |
download | gcc-8cbcff46d34c998239dfa1792fe7459699658c62.zip gcc-8cbcff46d34c998239dfa1792fe7459699658c62.tar.gz gcc-8cbcff46d34c998239dfa1792fe7459699658c62.tar.bz2 |
Merge #1584
1584: Add missing lang item mappings r=philberty a=philberty
Adds the missing fn_once lang item and the missing rust-call abi option.
Co-authored-by: Philip Herron <philip.herron@embecosm.com>
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/rust/util/rust-abi.cc | 2 | ||||
-rw-r--r-- | gcc/rust/util/rust-lang-item.h | 9 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-abi.cc b/gcc/rust/util/rust-abi.cc index 6477c37..36abb21 100644 --- a/gcc/rust/util/rust-abi.cc +++ b/gcc/rust/util/rust-abi.cc @@ -23,6 +23,8 @@ get_abi_from_string (const std::string &abi) { if (abi.compare ("rust") == 0) return Rust::ABI::RUST; + else if (abi.compare ("rust-call") == 0) + return Rust::ABI::RUST; else if (abi.compare ("rust-intrinsic") == 0) return Rust::ABI::INTRINSIC; else if (abi.compare ("C") == 0) diff --git a/gcc/rust/util/rust-lang-item.h b/gcc/rust/util/rust-lang-item.h index 9d1ee90..a50f139 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>"; |