Fix inliner bug for empty callees.
Add an explicit branch to continue from the next instruction.
Bug: 2992514
Change-Id: I87f7a2d86e34264688bf283e156816624556b46f
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;
}