Skip to content

Commit daf3ca8

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 daf3ca8

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

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

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,15 @@ 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+
{"align_offset", Kind::ALIGN_OFFSET},
158+
{"new_unchecked" , Kind::NEW_UNCHECKED},
159+
{"from_generator" , Kind::FROM_GENERATOR},
160+
{"get_context" , Kind::GET_CONTEXT},
152161
}};
153162

154163
tl::optional<LangItem::Kind>

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

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

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

0 commit comments

Comments
 (0)