mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-11-22 16:42:40 +00:00
Implementation of __intrinsic_assert (#2155)
Co-authored-by: m new <michael.burzan@outlook.de>
This commit is contained in:
1 parent
5ef6e9b6a0
commit
82f8556890
6 files changed
+55
-1
No files matched your search
@@ -40,7 +40,8 @@ auto IntrinsicExpression::FindIntrinsic(std::string_view name,
|
||||
{"int_left_shift", Intrinsic::IntLeftShift},
|
||||
{"int_right_shift", Intrinsic::IntRightShift},
|
||||
{"str_eq", Intrinsic::StrEq},
|
||||
{"str_compare", Intrinsic::StrCompare}});
|
||||
{"str_compare", Intrinsic::StrCompare},
|
||||
{"assert", Intrinsic::Assert}});
|
||||
name.remove_prefix(std::strlen("__intrinsic_"));
|
||||
auto it = intrinsic_map.find(name);
|
||||
if (it == intrinsic_map.end()) {
|
||||
@@ -80,6 +81,8 @@ auto IntrinsicExpression::name() const -> std::string_view {
|
||||
return "__intrinsic_str_eq";
|
||||
case IntrinsicExpression::Intrinsic::StrCompare:
|
||||
return "__intrinsic_str_compare";
|
||||
case IntrinsicExpression::Intrinsic::Assert:
|
||||
return "__intrinsic_assert";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user