mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-06 07:14:42 +01:00
Implementation of __intrinsic_assert (#2155)
Co-authored-by: m new <michael.burzan@outlook.de>
This commit is contained in:
@@ -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