summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/CodeMetrics.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-09-07 04:24:31 +0000
committerHans Wennborg <hans@hanshq.net>2014-09-07 04:24:31 +0000
commit44e27464181168faa2b2c4a6e92797ab96215cac (patch)
tree7123c5b670053d3fab4222c34a36bf0728d4b5a0 /llvm/lib/Analysis/CodeMetrics.cpp
parent9a891052482642a0bec64f8b32eaf44018fee3b7 (diff)
downloadbcm5719-llvm-44e27464181168faa2b2c4a6e92797ab96215cac.tar.gz
bcm5719-llvm-44e27464181168faa2b2c4a6e92797ab96215cac.zip
BumpPtrAllocator: do the size check without moving any pointers
Instead of aligning and moving the CurPtr forward, and then comparing with End, simply calculate how much space is needed, and compare that to how much is available. Hopefully this avoids any doubts about comparing addresses possibly derived from past the end of the slab array, overflowing, etc. Also add a test where aligning CurPtr would move it past End. llvm-svn: 217330
Diffstat (limited to 'llvm/lib/Analysis/CodeMetrics.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud