aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Object/COFFObjectFile.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2015-06-24 05:59:19 +0000
committerJustin Bogner <mail@justinbogner.com>2015-06-24 05:59:19 +0000
commitc97c48aadcf3e2091b6380bfc6b873fbf3909021 (patch)
treef3abcccbbd7e46eb33d969c951e9f43adb833038 /llvm/lib/Object/COFFObjectFile.cpp
parentddf71fc3708b9187fdfb38b086b1ee0d4e98825c (diff)
downloadllvm-c97c48aadcf3e2091b6380bfc6b873fbf3909021.zip
llvm-c97c48aadcf3e2091b6380bfc6b873fbf3909021.tar.gz
llvm-c97c48aadcf3e2091b6380bfc6b873fbf3909021.tar.bz2
SystemZ: Rephrase this allOnes calculation to avoid UB
This allOnes function hits undefined behaviour if Count is greater than 64, but we can avoid that and simplify the calculation by just saturating if such a value is passed in. This comes up under ubsan becauseRxSBGOperands is sometimes created with values that are 128 bits wide. Somebody more familiar with this code should probably look into whether that's expected, as a 64 bit mask may or may not be appropriate for such types. llvm-svn: 240520
Diffstat (limited to 'llvm/lib/Object/COFFObjectFile.cpp')
0 files changed, 0 insertions, 0 deletions