From d5185344e19d9feb7ac268369e0af6a467d1cb48 Mon Sep 17 00:00:00 2001 From: Kenny Root Date: Tue, 13 May 2014 14:47:05 -0700 Subject: Changes for vogar compatibility Make sure dex2oat can make an image with an empty list of image_classes. Add in some checks to make sure that no bad arguments sneak into CompilerDriver. If we're not on the ART_TARGET, we should check for the "hostdex" versions of the libraries to substitute in our libart version. Change-Id: I5e8485c6089d25664492f0217b43ef64ca84c061 --- compiler/driver/compiler_driver.cc | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'compiler/driver/compiler_driver.cc') diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc index 6817f14c32..ff4806b1c2 100644 --- a/compiler/driver/compiler_driver.cc +++ b/compiler/driver/compiler_driver.cc @@ -377,8 +377,10 @@ CompilerDriver::CompilerDriver(const CompilerOptions* compiler_options, compiler_->Init(); CHECK(!Runtime::Current()->IsStarted()); - if (!image_) { - CHECK(image_classes_.get() == NULL); + if (image_) { + CHECK(image_classes_.get() != nullptr); + } else { + CHECK(image_classes_.get() == nullptr); } // Are we generating CFI information? @@ -591,7 +593,7 @@ void CompilerDriver::Resolve(jobject class_loader, const std::vectorGetClassLinker(); + CHECK(image_classes_.get() != nullptr); for (auto it = image_classes_->begin(), end = image_classes_->end(); it != end;) { const std::string& descriptor(*it); SirtRef klass(self, class_linker->FindSystemClass(self, descriptor.c_str())); -- cgit v1.2.3-59-g8ed1b