diff options
author | Pierre van Houtryve <pierre.vanhoutryve@amd.com> | 2025-05-22 16:45:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-05-22 16:45:46 +0200 |
commit | 0c96c65169d65a4f7220be5b07c42237c6880911 (patch) | |
tree | 6a72031c51782dcd23a9f1d7a75dd325b48ec542 /llvm/lib/CodeGen/PatchableFunction.cpp | |
parent | 1f0c1784118da963dce825de7a07da672fe5de57 (diff) | |
download | llvm-0c96c65169d65a4f7220be5b07c42237c6880911.zip llvm-0c96c65169d65a4f7220be5b07c42237c6880911.tar.gz llvm-0c96c65169d65a4f7220be5b07c42237c6880911.tar.bz2 |
[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
Diffstat (limited to 'llvm/lib/CodeGen/PatchableFunction.cpp')
0 files changed, 0 insertions, 0 deletions