aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/APInt.cpp
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2007-02-25 19:26:01 +0000
committerReid Spencer <rspencer@reidspencer.com>2007-02-25 19:26:01 +0000
commitc68c2243dcb716bc117f41aa543ca8a41046df41 (patch)
treec0815024cb9479fc19a320483ed5c70d0173a880 /lib/Support/APInt.cpp
parent1fa3d9ef93578970b2e0506104b96c3ffaa42bcf (diff)
Fix clearUnusedBits to not depend on "undefined behavior" of >> operator
when the bit size is equal to the word size. This happens to work out okay on x86, but might not on other platforms. The change just detects when there are no bits to clear (because BitWidth is a multiple of the word size) and returns early. Also, move some comments from .cpp file into header. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34602 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Support/APInt.cpp')
0 files changed, 0 insertions, 0 deletions