aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
diff options
context:
space:
mode:
authorEvgeniy Brevnov <ybrevnov@azul.com>2020-12-04 16:53:17 +0700
committerEvgeniy Brevnov <ybrevnov@azul.com>2020-12-08 16:53:37 +0700
commit2d1b024d06b2a81f1c35193a998a864be09e2ae8 (patch)
treedbca66916e007e1515f50f375857d6a3047d45fa /llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp
parent80766ecc65096deeb4ff6f03562dcad94c54b862 (diff)
downloadllvm-2d1b024d06b2a81f1c35193a998a864be09e2ae8.zip
llvm-2d1b024d06b2a81f1c35193a998a864be09e2ae8.tar.gz
llvm-2d1b024d06b2a81f1c35193a998a864be09e2ae8.tar.bz2
[DSE][NFC] Need to be carefull mixing signed and unsigned types
Currently in some places we use signed type to represent size of an access and put explicit casts from unsigned to signed. For example: int64_t EarlierSize = int64_t(Loc.Size.getValue()); Even though it doesn't loos bits (immidiatly) it may overflow and we end up with negative size. Potentially that cause later code to work incorrectly. A simple expample is a check that size is not negative. I think it would be safer and clearer if we use unsigned type for the size and handle it appropriately. Reviewed By: fhahn Differential Revision: https://reviews.llvm.org/D92648
Diffstat (limited to 'llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp')
0 files changed, 0 insertions, 0 deletions