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 /lib/Analysis/Loads.cpp | |
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 'lib/Analysis/Loads.cpp')
-rw-r--r-- | lib/Analysis/Loads.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/Analysis/Loads.cpp b/lib/Analysis/Loads.cpp index 3158873caa..0902a39a9f 100644 --- a/lib/Analysis/Loads.cpp +++ b/lib/Analysis/Loads.cpp @@ -57,8 +57,7 @@ bool llvm::isSafeToLoadUnconditionally(Value *V, Instruction *ScanFrom, unsigned Align, const DataLayout *TD) { int64_t ByteOffset = 0; Value *Base = V; - if (TD) - Base = GetPointerBaseWithConstantOffset(V, ByteOffset, *TD); + Base = GetPointerBaseWithConstantOffset(V, ByteOffset, TD); if (ByteOffset < 0) // out of bounds return false; |