Skip to content

Commit 9c4b1fc

Browse files
committed
gccrs: Add missing lang item declarations for core 1.49
gcc/rust/ChangeLog: * util/rust-lang-item.h (LangItem::Kind): Add lang item declarations for missing lang items required for core 1.49 compilation. * util/rust-lang-item.cc (LangItem::lang_items): Ditto. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
1 parent 7620b4e commit 9c4b1fc

2 files changed

Lines changed: 20 additions & 0 deletions

File tree

gcc/rust/util/rust-lang-item.cc

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,16 @@ const BiMap<std::string, LangItem::Kind> Rust::LangItem::lang_items = {{
149149
{"va_list", Kind::VA_LIST},
150150
{"pin", Kind::PIN},
151151
{"unpin", Kind::UNPIN},
152+
153+
{"panic", Kind::PANIC},
154+
{"panic_info", Kind::PANIC_INFO},
155+
{"panic_location", Kind::PANIC_LOCATION},
156+
{"panic_bounds_check", Kind::PANIC_BOUNDS_CHECK},
157+
{"panic_str", Kind::PANIC_STR},
158+
{"align_offset", Kind::ALIGN_OFFSET},
159+
{"new_unchecked", Kind::NEW_UNCHECKED},
160+
{"from_generator", Kind::FROM_GENERATOR},
161+
{"get_context", Kind::GET_CONTEXT},
152162
}};
153163

154164
tl::optional<LangItem::Kind>

gcc/rust/util/rust-lang-item.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,16 @@ class LangItem
187187
VA_LIST,
188188
PIN,
189189
UNPIN,
190+
191+
PANIC,
192+
PANIC_INFO,
193+
PANIC_LOCATION,
194+
PANIC_BOUNDS_CHECK,
195+
PANIC_STR,
196+
ALIGN_OFFSET,
197+
NEW_UNCHECKED,
198+
FROM_GENERATOR,
199+
GET_CONTEXT,
190200
};
191201

192202
static const BiMap<std::string, Kind> lang_items;

0 commit comments

Comments
 (0)