]> git.ipfire.org Git - thirdparty/gcc.git/commit
lang-items: Cleanup parsing and lookups of lang items.
authorArthur Cohen <arthur.cohen@embecosm.com>
Tue, 27 Feb 2024 12:35:50 +0000 (13:35 +0100)
committerCohenArthur <arthur.cohen@embecosm.com>
Thu, 29 Feb 2024 15:52:44 +0000 (15:52 +0000)
commite9de5b410da43cb2ac5f9865756153648e6f078b
treebaae5c1180b8fccafa02e67e89dee059f5368d80
parent4e51e84d86629fa57ad8ac9849c4d582f442bb94
lang-items: Cleanup parsing and lookups of lang items.

gcc/rust/ChangeLog:

* Make-lang.in: Compile new rust-lang-item.o.
* util/rust-lang-item.h: Split into header and source.
* util/rust-lang-item.cc: Cleanup parsing of lang items by using a hashmap
and returning optional values, cleanup handling of exhaustive lang item
lookups.
* hir/rust-ast-lower-base.cc (ASTLoweringBase::handle_lang_item_attribute): Use
new optional API.
gcc/rust/Make-lang.in
gcc/rust/hir/rust-ast-lower-base.cc
gcc/rust/util/rust-lang-item.cc [new file with mode: 0644]
gcc/rust/util/rust-lang-item.h