diff options
author | Dan Gohman <dan433584@gmail.com> | 2013-01-31 02:00:45 +0000 |
---|---|---|
committer | Dan Gohman <dan433584@gmail.com> | 2013-01-31 02:00:45 +0000 |
commit | a070d2a0355c4993240b5206ebc1d517c151331d (patch) | |
tree | 54ab242655acfe79ed7e42f8576b0f6135433567 /include/llvm/Analysis | |
parent | 8ed701da9aa388c078cc6aecac2fe355974c90d2 (diff) |
Change GetPointerBaseWithConstantOffset's DataLayout argument from a
reference to a pointer, so that it can handle the case where DataLayout
is not available and behave conservatively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174024 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/ValueTracking.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ValueTracking.h b/include/llvm/Analysis/ValueTracking.h index 875c47dc6b..b5b8bfe590 100644 --- a/include/llvm/Analysis/ValueTracking.h +++ b/include/llvm/Analysis/ValueTracking.h @@ -117,10 +117,10 @@ namespace llvm { /// it can be expressed as a base pointer plus a constant offset. Return the /// base and offset to the caller. Value *GetPointerBaseWithConstantOffset(Value *Ptr, int64_t &Offset, - const DataLayout &TD); + const DataLayout *TD); static inline const Value * GetPointerBaseWithConstantOffset(const Value *Ptr, int64_t &Offset, - const DataLayout &TD) { + const DataLayout *TD) { return GetPointerBaseWithConstantOffset(const_cast<Value*>(Ptr), Offset,TD); } |