summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/Loads.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2015-03-03 22:01:13 +0000
committerMehdi Amini <mehdi.amini@apple.com>2015-03-03 22:01:13 +0000
commit9a9738f6e5ecbd45bb2bc105d37570f045717152 (patch)
tree607649fe7f2d6f54383c72f31b0b4648c7cca6e7 /llvm/lib/Analysis/Loads.cpp
parent1dbe2e3dc4368a1985decfb180bd8e7290cd9f8e (diff)
downloadbcm5719-llvm-9a9738f6e5ecbd45bb2bc105d37570f045717152.tar.gz
bcm5719-llvm-9a9738f6e5ecbd45bb2bc105d37570f045717152.zip
Remove getDataLayout() from Instruction/GlobalValue/BasicBlock/Function
Summary: This does not conceptually belongs here. Instead provide a shortcut getModule() that provides access to the DataLayout. Reviewers: chandlerc, echristo Reviewed By: echristo Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D8027 From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 231147
Diffstat (limited to 'llvm/lib/Analysis/Loads.cpp')
-rw-r--r--llvm/lib/Analysis/Loads.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/Loads.cpp b/llvm/lib/Analysis/Loads.cpp
index 5042eb9777a..aaaf75f3015 100644
--- a/llvm/lib/Analysis/Loads.cpp
+++ b/llvm/lib/Analysis/Loads.cpp
@@ -19,6 +19,7 @@
#include "llvm/IR/GlobalVariable.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/LLVMContext.h"
+#include "llvm/IR/Module.h"
#include "llvm/IR/Operator.h"
using namespace llvm;
@@ -178,7 +179,7 @@ Value *llvm::FindAvailableLoadedValue(Value *Ptr, BasicBlock *ScanBB,
// Try to get the DataLayout for this module. This may be null, in which case
// the optimizations will be limited.
- const DataLayout *DL = ScanBB->getDataLayout();
+ const DataLayout *DL = ScanBB->getModule()->getDataLayout();
// Try to get the store size for the type.
uint64_t AccessSize = DL ? DL->getTypeStoreSize(AccessTy)
OpenPOWER on IntegriCloud