aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/util/rust-hir-map.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-11-25 12:37:12 +0100
committerCohenArthur <arthur.cohen@embecosm.com>2024-11-28 12:35:46 +0000
commit10cc6e8e6c32025b4fd19d02ac0ec3f1029639da (patch)
treed8c0baace8738a617824264a3800d85fffbbc9f1 /gcc/rust/util/rust-hir-map.h
parent1d5f710bfb25857a4e0a8011080513074b64334e (diff)
downloadgcc-10cc6e8e6c32025b4fd19d02ac0ec3f1029639da.zip
gcc-10cc6e8e6c32025b4fd19d02ac0ec3f1029639da.tar.gz
gcc-10cc6e8e6c32025b4fd19d02ac0ec3f1029639da.tar.bz2
mappings: Move lang_item definitions to .cc
gcc/rust/ChangeLog: * util/rust-hir-map.h: Move definitions from header... * util/rust-hir-map.cc: ...to source file.
Diffstat (limited to 'gcc/rust/util/rust-hir-map.h')
-rw-r--r--gcc/rust/util/rust-hir-map.h18
1 files changed, 2 insertions, 16 deletions
diff --git a/gcc/rust/util/rust-hir-map.h b/gcc/rust/util/rust-hir-map.h
index c07f254..10ca71c 100644
--- a/gcc/rust/util/rust-hir-map.h
+++ b/gcc/rust/util/rust-hir-map.h
@@ -256,22 +256,8 @@ public:
return it->second;
}
- void insert_lang_item (LangItem::Kind item_type, DefId id)
- {
- auto it = lang_item_mappings.find (item_type);
- rust_assert (it == lang_item_mappings.end ());
-
- lang_item_mappings[item_type] = id;
- }
-
- tl::optional<DefId &> lookup_lang_item (LangItem::Kind item_type)
- {
- auto it = lang_item_mappings.find (item_type);
- if (it == lang_item_mappings.end ())
- return tl::nullopt;
-
- return it->second;
- }
+ void insert_lang_item (LangItem::Kind item_type, DefId id);
+ tl::optional<DefId &> lookup_lang_item (LangItem::Kind item_type);
// This will fatal_error when this lang item does not exist
DefId get_lang_item (LangItem::Kind item_type, location_t locus);