From c892f35815566a97ab25a30cedeb66c5b9265d61 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Thu, 25 Aug 2022 13:15:04 +0200 Subject: [PATCH] deps: V8: fix debug build This is a (very) partial cherry-pick of upstream change v8/v8@f8fddd6b13 that fixes the following debug mode build error with clang: ../deps/v8/src/codegen/register.h:29:48: error: member reference base type 'RegListBase' is not a structure or union int num_different_regs = RegListBase{regs...}.Count(); Fixes: https://github.com/nodejs/node/issues/44371 PR-URL: https://github.com/nodejs/node/pull/44392 Reviewed-By: Joyee Cheung Reviewed-By: Jiawen Geng Reviewed-By: Colin Ihrig Reviewed-By: James M Snell Reviewed-By: Zeyu "Alex" Yang Reviewed-By: Rafael Gonzaga --- deps/v8/src/codegen/register.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deps/v8/src/codegen/register.h b/deps/v8/src/codegen/register.h index e36e4d1e9af81d..ef5f6dfcf7c85c 100644 --- a/deps/v8/src/codegen/register.h +++ b/deps/v8/src/codegen/register.h @@ -26,7 +26,8 @@ template ...> || std::conjunction_v...>>> inline constexpr bool AreAliased(RegTypes... regs) { - int num_different_regs = RegListBase{regs...}.Count(); + using FirstRegType = std::tuple_element_t<0, std::tuple>; + int num_different_regs = RegListBase{regs...}.Count(); int num_given_regs = (... + (regs.is_valid() ? 1 : 0)); return num_different_regs < num_given_regs; }