diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2013-08-22 11:25:11 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2013-08-22 11:25:11 +0000 |
commit | f73826bef09fcc38d2db7b69baf0b8a45c9788f8 (patch) | |
tree | e753a61c30eb9246f6cdd6a467573e35e628120f /unittests/Support/MemoryBufferTest.cpp | |
parent | 4efbeb2700506fa1cbbca5e487b57eaad05c60ed (diff) | |
download | llvm-f73826bef09fcc38d2db7b69baf0b8a45c9788f8.tar.gz llvm-f73826bef09fcc38d2db7b69baf0b8a45c9788f8.tar.bz2 llvm-f73826bef09fcc38d2db7b69baf0b8a45c9788f8.tar.xz |
Add a new helper method to Value to strip in-bounds constant offsets of
pointers, but accumulate the offset into an APInt in the process of
stripping it.
This is a pretty handy thing to have, such as when trying to determine
if two pointers are at some constant relative offset. I'll be committing
a patch shortly to use it for exactly that purpose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189000 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'unittests/Support/MemoryBufferTest.cpp')
0 files changed, 0 insertions, 0 deletions