Do not remove bridge flag if the method did not inline.
The path towards this removal of bridge flag was simply not dominated by
iterator##inlineInvoke, i.e., when reaching here, we decided to *not*
inline (due to the budget).
Change-Id: If11460dfe4561fc8a49037455e098db68a651384
diff --git a/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java b/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
index bc0cd04..e9b701c 100644
--- a/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
+++ b/src/main/java/com/android/tools/r8/ir/optimize/Inliner.java
@@ -441,11 +441,12 @@
// Update type env for inlined blocks.
typeEnvironment.analyzeBlocks(inlinee.topologicallySortedBlocks());
// TODO(b/69964136): need a test where refined env in inlinee affects the caller.
- }
- // If we inlined the invoke from a bridge method, it is no longer a bridge method.
- if (method.accessFlags.isBridge()) {
- method.accessFlags.unsetSynthetic();
- method.accessFlags.unsetBridge();
+
+ // If we inlined the invoke from a bridge method, it is no longer a bridge method.
+ if (method.accessFlags.isBridge()) {
+ method.accessFlags.unsetSynthetic();
+ method.accessFlags.unsetBridge();
+ }
}
}
}