Fallback to quick in case of soft verification errors

Add a regression test: using uninitialized values triggers a soft
verification error and optimizing should not crash.

Thanks to Stephen Kyle (stephenckyle@googlemail.com) for the bug report.

Bug: 19988704
Change-Id: I67174538eed853baff735694b3ae8eb34afe2a39
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 2c17a67..87a8d33 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -31,6 +31,8 @@
 #include "ssa_phi_elimination.h"
 #include "scoped_thread_state_change.h"
 #include "thread.h"
+#include "dex/verified_method.h"
+#include "dex/verification_results.h"
 
 namespace art {
 
@@ -114,9 +116,11 @@
     return false;
   }
 
-  if (!resolved_method->GetDeclaringClass()->IsVerified()) {
+  uint16_t class_def_idx = resolved_method->GetDeclaringClass()->GetDexClassDefIndex();
+  if (!compiler_driver_->IsMethodVerifiedWithoutFailures(
+        resolved_method->GetDexMethodIndex(), class_def_idx, *resolved_method->GetDexFile())) {
     VLOG(compiler) << "Method " << PrettyMethod(method_index, caller_dex_file)
-                   << " is not inlined because its class could not be verified";
+                   << " couldn't be verified, so it cannot be inlined";
     return false;
   }