Make DataLayout Non-Optional in the Module
[oota-llvm.git] / lib / Transforms / IPO / LowerBitSets.cpp
index f397c38a996714af5b28e8e2e845a1dc9b7c84d0..85a2ced85c594c1986008994a25b5af23f38aa61 100644 (file)
@@ -234,10 +234,7 @@ ModulePass *llvm::createLowerBitSetsPass() { return new LowerBitSets; }
 
 bool LowerBitSets::doInitialization(Module &Mod) {
   M = &Mod;
-
-  DL = M->getDataLayout();
-  if (!DL)
-    report_fatal_error("Data layout required");
+  DL = &Mod.getDataLayout();
 
   Int1Ty = Type::getInt1Ty(M->getContext());
   Int8Ty = Type::getInt8Ty(M->getContext());