1 Commits

Author SHA1 Message Date
Pierre van Houtryve
0c96c65169
[clang][CodeGen] Fix crash on non-natural type in CheckAtomicAlignment (#141053)
In some specific scenarios, `Ptr.getElementType()` won't be a primitive
type or a vector of primitive types, and thus `getScalarSizeInBits()`
returns zero.

Use the datalayout to get the proper size of the type instead of making
an implicit assumption that the type is a simple primitive type.

Solves SWDEV-534184
2025-05-22 16:45:46 +02:00