Add $noinline$ tag to make sure a method has not been inlined.
Change-Id: Ic166cf43be566a0fa44c3c9e1939f647806fc500
diff --git a/compiler/optimizing/inliner.cc b/compiler/optimizing/inliner.cc
index 83f8d83..5c73fd8 100644
--- a/compiler/optimizing/inliner.cc
+++ b/compiler/optimizing/inliner.cc
@@ -69,6 +69,13 @@
bool should_inline = callee_name.find("$inline$") != std::string::npos;
CHECK(!should_inline) << "Could not inline " << callee_name;
}
+ } else {
+ if (kIsDebugBuild) {
+ std::string callee_name =
+ PrettyMethod(call->GetDexMethodIndex(), *outer_compilation_unit_.GetDexFile());
+ bool must_not_inline = callee_name.find("$noinline$") != std::string::npos;
+ CHECK(!must_not_inline) << "Should not have inlined " << callee_name;
+ }
}
}
instruction = next;