commit | 02abce12f01ea46ff2f619da3fa5956c36e0022e | [log] [tgz] |
---|---|---|
author | Ian Zerny <zerny@google.com> | Mon Nov 21 14:34:50 2022 +0100 |
committer | Ian Zerny <zerny@google.com> | Mon Nov 21 13:37:47 2022 +0000 |
tree | a9b0b4a9732b2f2343e37498c24faf9c774b3c23 | |
parent | fd86768da18bbd903618510ddfeb80f1901bcf13 [diff] |
Clear the type cache before creating a D8 AppInfo. Bug: b/259933493 Change-Id: If27f645bb5598756b8236bf8d3d4f27722ba6386
diff --git a/src/main/java/com/android/tools/r8/horizontalclassmerging/code/SyntheticInitializerConverter.java b/src/main/java/com/android/tools/r8/horizontalclassmerging/code/SyntheticInitializerConverter.java index 0d3c55a..a3e5972 100644 --- a/src/main/java/com/android/tools/r8/horizontalclassmerging/code/SyntheticInitializerConverter.java +++ b/src/main/java/com/android/tools/r8/horizontalclassmerging/code/SyntheticInitializerConverter.java
@@ -91,6 +91,10 @@ // application writer. We therefore simulate that we are in D8, to allow building IR for each of // the class initializers without applying the unapplied code rewritings, to avoid that we apply // the lens more than once to the same piece of code. + + // Since we are now running in D8 mode clear type elements cache. + appView.dexItemFactory().clearTypeElementsCache(); + AppView<AppInfo> appViewForConversion = AppView.createForD8( AppInfo.createInitialAppInfo(