Skip to content

[clang][bytecode] long double on arm64 darwin is 8 bytes (NFC)#209930

Merged
hnrklssn merged 1 commit into
llvm:mainfrom
hnrklssn:bos-long-double
Jul 16, 2026
Merged

[clang][bytecode] long double on arm64 darwin is 8 bytes (NFC)#209930
hnrklssn merged 1 commit into
llvm:mainfrom
hnrklssn:bos-long-double

Conversation

@hnrklssn

Copy link
Copy Markdown
Member

This test was failing on arm64 darwin targets. Generalise the #if so that the win32 branch is also taken by arm64 darwin.

rdar://182340494

This test was failing on arm64 darwin targets. Generalise the #if so
that the win32 branch is also taken by arm64 darwin.

rdar://182340494
@hnrklssn
hnrklssn requested review from dyung and tbaederr July 16, 2026 00:33
@llvmorg-github-actions llvmorg-github-actions Bot added clang Clang issues not falling into any other category clang:bytecode Issues for the clang bytecode constexpr interpreter labels Jul 16, 2026
@llvmorg-github-actions

Copy link
Copy Markdown

@llvm/pr-subscribers-clang

Author: Henrik G. Olsson (hnrklssn)

Changes

This test was failing on arm64 darwin targets. Generalise the #if so that the win32 branch is also taken by arm64 darwin.

rdar://182340494


Full diff: https://github.com/llvm/llvm-project/pull/209930.diff

1 Files Affected:

  • (modified) clang/test/AST/ByteCode/builtin-object-size.cpp (+1-1)
diff --git a/clang/test/AST/ByteCode/builtin-object-size.cpp b/clang/test/AST/ByteCode/builtin-object-size.cpp
index 69534025fe3f4..31b95990f658c 100644
--- a/clang/test/AST/ByteCode/builtin-object-size.cpp
+++ b/clang/test/AST/ByteCode/builtin-object-size.cpp
@@ -61,7 +61,7 @@ namespace Padding {
   void foo() {
       LongDouble3Vec v1, v2;
 #if __SIZEOF_SIZE_T__ == 8
-#if !defined(_WIN32)
+#if __SIZEOF_LONG_DOUBLE__ == 16
       static_assert(__builtin_object_size(&v1, 0) == 64);
 #else
       static_assert(__builtin_object_size(&v1, 0) == 32);

@dyung dyung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm and I think this is more reliable. Thanks for fixing this!

@hnrklssn
hnrklssn merged commit d4676e6 into llvm:main Jul 16, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clang:bytecode Issues for the clang bytecode constexpr interpreter clang Clang issues not falling into any other category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants