diff options
author | Nikita Popov <npopov@redhat.com> | 2022-07-22 16:10:37 +0200 |
---|---|---|
committer | Nikita Popov <npopov@redhat.com> | 2022-07-25 10:18:27 +0200 |
commit | fb7caa3c7b53a4362139afe0158f297a891cc17b (patch) | |
tree | 67146cc90e73e015b24dd55790d0a8d9e4a39d2f /llvm/lib/FileCheck/FileCheck.cpp | |
parent | cbcdb5248db7feecb01307fb9334bfea282cd47e (diff) | |
download | llvm-fb7caa3c7b53a4362139afe0158f297a891cc17b.zip llvm-fb7caa3c7b53a4362139afe0158f297a891cc17b.tar.gz llvm-fb7caa3c7b53a4362139afe0158f297a891cc17b.tar.bz2 |
[AsmPrinter] Reject ptrtoint to larger size in lowerConstant()
When using a ptrtoint to a size larger than the pointer width in a
global initializer, we currently create a ptr & low_bit_mask style
MCExpr, which will later result in a relocation error during object
file emission.
This patch rejects the constant expression already during
lowerConstant(), which results in a much clearer error message
that references the constant expression at fault.
This fixes https://github.com/llvm/llvm-project/issues/56400,
for certain definitions of "fix".
Differential Revision: https://reviews.llvm.org/D130366
Diffstat (limited to 'llvm/lib/FileCheck/FileCheck.cpp')
0 files changed, 0 insertions, 0 deletions