Fix another source of undeterministic inlining.
bug:20037935
Change-Id: Ifad234a331ec616f065aabc65576c5636ad8ec21
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index a72817f..997f980 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -207,7 +207,9 @@
if (!builder.BuildGraph(*code_item)) {
VLOG(compiler) << "Method " << PrettyMethod(method_index, caller_dex_file)
<< " could not be built, so cannot be inlined";
- resolved_method->SetShouldNotInline();
+ // There could be multiple reasons why the graph could not be built, including
+ // unaccessible methods/fields due to using a different dex cache. We do not mark
+ // the method as non-inlineable so that other callers can still try to inline it.
return false;
}