Skip to content

Commit b913d76

Browse files
committed
Add builtin unreachable intrinsic mapping
This demonstrates how we can add in the simple intrinsics in a single patch. Addresses #658
1 parent 3c69d97 commit b913d76

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

gcc/rust/backend/rust-compile-intrinsic.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,11 @@ class SimpleIntrinsics
108108

109109
define_builtin ("sqrtf32", BUILT_IN_SQRTF, "__builtin_sqrtf", "sqrtf",
110110
math_function_type_f32, builtin_const);
111+
112+
define_builtin ("unreachable", BUILT_IN_UNREACHABLE,
113+
"__builtin_unreachable", NULL,
114+
build_function_type (void_type_node, void_list_node),
115+
builtin_const | builtin_noreturn);
111116
}
112117

113118
// Define a builtin function. BCODE is the builtin function code

0 commit comments

Comments
 (0)