Make DataLayout Non-Optional in the Module
[oota-llvm.git] / lib / Transforms / IPO / MergeFunctions.cpp
index b91ebf2b96b03abcb9ff7a00b94a82c803b62bf5..71c53efb584935d89183c69cbc69fc49668099ad 100644 (file)
@@ -1212,8 +1212,7 @@ bool MergeFunctions::doSanityCheck(std::vector<WeakVH> &Worklist) {
 
 bool MergeFunctions::runOnModule(Module &M) {
   bool Changed = false;
-  DataLayoutPass *DLP = getAnalysisIfAvailable<DataLayoutPass>();
-  DL = DLP ? &DLP->getDataLayout() : nullptr;
+  DL = &M.getDataLayout();
 
   for (Module::iterator I = M.begin(), E = M.end(); I != E; ++I) {
     if (!I->isDeclaration() && !I->hasAvailableExternallyLinkage())