summaryrefslogtreecommitdiff
path: root/lib/Analysis/Loads.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Analysis/Loads.cpp')
-rw-r--r--lib/Analysis/Loads.cpp3
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;