aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Frontend
diff options
context:
space:
mode:
authorHenry Yu <hazyfish@outlook.com>2023-03-29 00:06:06 -0700
committerPeter Rong <PeterRong96@gmail.com>2023-03-29 00:09:11 -0700
commitfc1ffb4c0ea886bf37a2169db3d9270eb600d9fc (patch)
tree91a060df079c0a402b466db6b4e6c55c3a6c751b /clang/lib/Frontend
parent98286a04ef0af46279cf11b1e2c133e978d4224f (diff)
downloadllvm-fc1ffb4c0ea886bf37a2169db3d9270eb600d9fc.zip
llvm-fc1ffb4c0ea886bf37a2169db3d9270eb600d9fc.tar.gz
llvm-fc1ffb4c0ea886bf37a2169db3d9270eb600d9fc.tar.bz2
[AsmPrinter] Fix Crash when Emitting Global Constant of small bit width when targeting Big Endian arch
For Big Endian, the function `emitGlobalConstantLargeInt` tries to right shift `Realigned` by an amount `ExtraBitSize` in place. However, if the constant to emit has a bit width less than 64 and the bit width is not a multiple of 8, the shift amount will be greater than the bit width of `Realigned`, which causes assertion error described in issue [[ https://github.com/llvm/llvm-project/issues/59055 | issue #59055 ]]. This patch fixes the issue by avoiding right shift when bit width is under 64 to avoid the assertion error. Reviewed By: Peter Differential Revision: https://reviews.llvm.org/D138246
Diffstat (limited to 'clang/lib/Frontend')
0 files changed, 0 insertions, 0 deletions