aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorDaniel Sanders <daniel_l_sanders@apple.com>2018-09-21 16:32:49 +0000
committerDaniel Sanders <daniel_l_sanders@apple.com>2018-09-21 16:32:49 +0000
commitf8ecb22dcb2c8efdfcd351940a842469f339dedc (patch)
treeaff2b6718dce6112d4442c12a1076e4af4194bc7 /clang/lib/CodeGen/CodeGenModule.cpp
parent0807e94951f89fb62aca94bab3de9908a197cae0 (diff)
downloadllvm-f8ecb22dcb2c8efdfcd351940a842469f339dedc.zip
llvm-f8ecb22dcb2c8efdfcd351940a842469f339dedc.tar.gz
llvm-f8ecb22dcb2c8efdfcd351940a842469f339dedc.tar.bz2
[tblgen] Fix undefined behaviour when assigning integers to large bits<n>'s
This code: bits<96> X = 0; was triggering undefined behaviour since it iterates over bits 0..95 and tests them against the IntInit using 1LL << I. This patch resolves the undefined behaviour by continuing to treat the IntInit as a 64-bit value and simply causing all bit tests in excess of 64-bits to report false. As a result, bits<96> X = -1; will be equivalent to: bits<96> X; let X{0-63} = -1; let X{64-95} = 0; llvm-svn: 342744
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions