Skip to content

Commit 63b61dd

Browse files
committed
[32-bit Linux] Align _GenericContext to 8 bytes
A static assert fires around GenericContext not quite being the correct size for 32-bit. Aligning _GenericContext addresses this problem. swift/include/swift/AST/Decl.h: 1541 static_assert(sizeof(_GenericContext) + sizeof(DeclContext) == 1542: sizeof(GenericContext), "Please add fields to _GenericContext");
1 parent cafa822 commit 63b61dd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/swift/AST/Decl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,7 +1462,7 @@ class alignas(RequirementRepr) TrailingWhereClause final :
14621462
};
14631463

14641464
// A private class for forcing exact field layout.
1465-
class _GenericContext {
1465+
class alignas(8) _GenericContext {
14661466
// Not really public. See GenericContext.
14671467
public:
14681468
GenericParamList *GenericParams = nullptr;

0 commit comments

Comments
 (0)