Code cleanup around vdex.

1) Handle the vdex in dex2oat instead of compiler_driver
2) CHECK instead of DCHECK that we don't dexlayout with vdex.

Test: test.py
Change-Id: Idf7be59bb25708181e391d17128480659ac697e5
diff --git a/compiler/oat_test.cc b/compiler/oat_test.cc
index 55d0bd9..910d7a7 100644
--- a/compiler/oat_test.cc
+++ b/compiler/oat_test.cc
@@ -400,8 +400,7 @@
   if (kCompile) {
     TimingLogger timings2("OatTest::WriteRead", false, false);
     compiler_driver_->SetDexFilesForOatFile(class_linker->GetBootClassPath());
-    compiler_driver_->CompileAll(
-        class_loader, class_linker->GetBootClassPath(), /* verifier_deps */ nullptr, &timings2);
+    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), &timings2);
   }
 
   ScratchFile tmp_oat, tmp_vdex(tmp_oat, ".vdex");
@@ -415,8 +414,7 @@
   ASSERT_TRUE(success);
 
   if (kCompile) {  // OatWriter strips the code, regenerate to compare
-    compiler_driver_->CompileAll(
-        class_loader, class_linker->GetBootClassPath(), /* verifier_deps */ nullptr, &timings);
+    compiler_driver_->CompileAll(class_loader, class_linker->GetBootClassPath(), &timings);
   }
   std::unique_ptr<OatFile> oat_file(OatFile::Open(tmp_oat.GetFilename(),
                                                   tmp_oat.GetFilename(),
@@ -540,7 +538,7 @@
                                   soa.Decode<mirror::ClassLoader>(class_loader).Ptr());
   }
   compiler_driver_->SetDexFilesForOatFile(dex_files);
-  compiler_driver_->CompileAll(class_loader, dex_files, /* verifier_deps */ nullptr, &timings);
+  compiler_driver_->CompileAll(class_loader, dex_files, &timings);
 
   ScratchFile tmp_oat, tmp_vdex(tmp_oat, ".vdex");
   SafeMap<std::string, std::string> key_value_store;