commit | 711b800a5af7bebdb4ef27618a25be625d7f990e | [log] [tgz] |
---|---|---|
author | Ian Zerny <zerny@google.com> | Thu Oct 15 13:25:33 2020 +0200 |
committer | Ian Zerny <zerny@google.com> | Thu Oct 15 13:25:33 2020 +0200 |
tree | dc2cf6916dc1272624d9a4438380d1a968be0c57 | |
parent | d33f8b0a335477d08ebf4f29d7c5e690077052ab [diff] |
Don't assume types in main-dex list must exist, again. This was introduced with 0fa8f9540228c189270c7f4ad53d5aa2bee0f98c CL https://r8-review.googlesource.com/c/r8/+/54998 where DexApplication was replaced by AppView. Change-Id: I25b5951e31c7eead0230265dbcfc84a080dfcf1b
diff --git a/src/main/java/com/android/tools/r8/synthesis/SyntheticFinalization.java b/src/main/java/com/android/tools/r8/synthesis/SyntheticFinalization.java index bba5fb0..1ffd59f 100644 --- a/src/main/java/com/android/tools/r8/synthesis/SyntheticFinalization.java +++ b/src/main/java/com/android/tools/r8/synthesis/SyntheticFinalization.java
@@ -262,7 +262,8 @@ mainDexType -> { derivedMainDexTypes.add(mainDexType); DexProgramClass mainDexClass = - DexProgramClass.asProgramClassOrNull(appView.definitionFor(mainDexType)); + DexProgramClass.asProgramClassOrNull( + appView.appInfo().definitionForWithoutExistenceAssert(mainDexType)); if (mainDexClass != null) { derivedMainDexTypes.addAll( DexAnnotation.readAnnotationSynthesizedClassMap(mainDexClass, factory));