Make DataLayout a plain object, not a pass.
[oota-llvm.git] / lib / Transforms / Utils / SimplifyInstructions.cpp
index b337e9d9e6c483de1aa3513f743990f63f49d0ec..b1e6865b1023391ed6cec943f1bd6c9bb0ed507e 100644 (file)
@@ -48,7 +48,8 @@ namespace {
       const DominatorTreeWrapperPass *DTWP =
           getAnalysisIfAvailable<DominatorTreeWrapperPass>();
       const DominatorTree *DT = DTWP ? &DTWP->getDomTree() : 0;
-      const DataLayout *DL = getAnalysisIfAvailable<DataLayout>();
+      DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
+      const DataLayout *DL = DLP ? &DLP->getDataLayout() : 0;
       const TargetLibraryInfo *TLI = &getAnalysis<TargetLibraryInfo>();
       SmallPtrSet<const Instruction*, 8> S1, S2, *ToSimplify = &S1, *Next = &S2;
       bool Changed = false;