Make DataLayout Non-Optional in the Module
[oota-llvm.git] / lib / Analysis / ScalarEvolution.cpp
index 9e4eb111c2e14d482f386ed8746d7d0f5aef36fc..8e0bffa52fd08c64320e834938f511806dfc05ec 100644 (file)
@@ -7956,8 +7956,7 @@ bool ScalarEvolution::runOnFunction(Function &F) {
   this->F = &F;
   AC = &getAnalysis<AssumptionCacheTracker>().getAssumptionCache(F);
   LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
-  DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
-  DL = DLP ? &DLP->getDataLayout() : nullptr;
+  DL = &F.getParent()->getDataLayout();
   TLI = &getAnalysis<TargetLibraryInfoWrapperPass>().getTLI();
   DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
   return false;