Skip to content

Commit 19173cd

Browse files
joyeecheungStefanStojanovic
authored andcommitted
Make TagRange build without __builtin_unreachable
Guard the call with V8_HAS_BUILTIN_UNREACHABLE, if it's not available in the toolchain, skip the compiler hint so it still compiles. Co-Authored-By: StefanStojanovic <[email protected]> Refs: nodejs/node#61898 Change-Id: Ided07825644ffdd5b6aa7c6fa7f39ae3e62d2535 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8517724 Commit-Queue: Joyee Cheung <[email protected]> Reviewed-by: Michael Lippautz <[email protected]> Cr-Commit-Position: refs/heads/main@{#110422}
1 parent 10f20af commit 19173cd

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎include/v8-internal.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,7 @@ struct TagRange {
532532

533533
// Construct the inclusive tag range [first, last].
534534
constexpr TagRange(Tag first, Tag last) : first(first), last(last) {
535-
#ifdef V8_ENABLE_CHECKS
535+
#if defined(V8_ENABLE_CHECKS) && V8_HAS_BUILTIN_UNREACHABLE
536536
// This would typically be a DCHECK, but that's not available here.
537537
if (first > last) __builtin_unreachable(); // Invalid tag range.
538538
#endif

0 commit comments

Comments
 (0)