ART: Check for exceptions from unresolved classes

In no-verify mode, classes may be unresolved because of missing
dependencies. Ignore and clear the exception.

Bug: 17506140
Change-Id: I70602b089e6631b1e177dbe8316c5fefdaf777a0
(cherry picked from commit ba354a97a9742774f57bad7f96ccae2dbbd59f75)
diff --git a/compiler/driver/compiler_driver.cc b/compiler/driver/compiler_driver.cc
index 6910e04..d743f90 100644
--- a/compiler/driver/compiler_driver.cc
+++ b/compiler/driver/compiler_driver.cc
@@ -607,7 +607,7 @@
   Resolve(class_loader, dex_files, thread_pool, timings);
 
   if (!compiler_options_->IsVerificationEnabled()) {
-    VLOG(compiler) << "Verify none mode specified, skipping verification.";
+    LOG(INFO) << "Verify none mode specified, skipping verification.";
     SetVerified(class_loader, dex_files, thread_pool, timings);
     return;
   }
@@ -1796,8 +1796,11 @@
       ClassReference ref(manager->GetDexFile(), class_def_index);
       manager->GetCompiler()->RecordClassStatus(ref, klass->GetStatus());
     }
+  } else {
+    Thread* self = soa.Self();
+    DCHECK(self->IsExceptionPending());
+    self->ClearException();
   }
-  soa.Self()->AssertNoPendingException();
 }
 
 void CompilerDriver::SetVerifiedDexFile(jobject class_loader, const DexFile& dex_file,