Fix inliner bug for empty callees.
Add an explicit branch to continue from the next instruction.
Bug: 2992514
(cherry-picked from dalvik-dev)
Change-Id: I6e036e330255e7cd9d1504c50c4260910c38dfff
diff --git a/vm/compiler/InlineTransformation.c b/vm/compiler/InlineTransformation.c
index 9559f5d..ce45b8b 100644
--- a/vm/compiler/InlineTransformation.c
+++ b/vm/compiler/InlineTransformation.c
@@ -224,6 +224,11 @@
if (methodStats->attributes & METHOD_IS_EMPTY) {
/* The original invoke instruction is effectively turned into NOP */
invokeMIR->OptimizationFlags |= MIR_INLINED;
+ /*
+ * Need to insert an explicit branch to catch the falling knife (into
+ * the PC reconstruction or chaining cell).
+ */
+ invokeBB->needFallThroughBranch = true;
return;
}