Use method name when partitioning for overrides

Kotlin methods / accessors can be annotated with JvmName to change their
name in the byte code. This is designed to be invisible from kotlin
code. As such, it is also not allowed on overriding methods or open
methods. Unfortunately, it is also possible for the developer to
suppress that error via @Suppress("INAPPLICABLE_JVM_NAME").

This CL updates XProcessing to basically ignore that annotation for
overrides. The practical impact of this is a 30x performance gain for
getAllMethods since we don't need to resolve method types to check for
overrides.

Upon discussions with the Kotlin Compiler team, their feedback is that
it is fair to ignore that annotation since the behavior of the compiler
gets really complicated when used along with method overrides.
Furthermore, user suppressed an error hence they cannot really expect
everything to work as usual.

I've added a warning for Dao and Database methods that checks if the
method is annotated with JvmName, and if so, prints a warning that
cannot be suppressed. Also added tests for cases where it happens to
work so that we know if we further break it :) .

Measurements: (when it was a config, but should be relatively the same)

androidx.room.compiler.processing.profiling.GetMethodsScenarioTest > allMethods_filterOutInline STANDARD_OUT
    Stats(min=69.319659ms, max=145.664166ms, avg=91.519145ms, mean=70.507303ms, allMeasurements=[88.612249ms, 78.264850ms, 88.811043ms, 70.880497ms, 71.694948ms, 69.319659ms, 145.664166ms, 90.055662ms, 130.070210ms, 81.818174ms])

androidx.room.compiler.processing.profiling.GetMethodsScenarioTest > allMethods_filterOutInline PASSED

androidx.room.compiler.processing.profiling.GetMethodsScenarioTest > allMethods_keepInline STANDARD_OUT
    Stats(min=1.643961ms, max=3.542199ms, avg=2.149422ms, mean=2.636825ms, allMeasurements=[2.081342ms, 1.933364ms, 1.709868ms, 1.679751ms, 3.542199ms, 1.731452ms, 1.643961ms, 2.329103ms, 1.686483ms, 3.156701ms])

Bug: 160322705
Test: GetMethodsSecenarioTest, XTypeElementTest, DaoProcessorTest,
Test: DatabaseProcessorTest, JvmNameInDaoTest.kt

Merged-In: I0e6415e5a17f378f7009adff53f1c9e65930fd7d
Change-Id: I0e6415e5a17f378f7009adff53f1c9e65930fd7d
diff --git a/development/build_log_simplifier/messages.ignore b/development/build_log_simplifier/messages.ignore
index 8d9ec94e..b99da0a 100644
--- a/development/build_log_simplifier/messages.ignore
+++ b/development/build_log_simplifier/messages.ignore
@@ -221,6 +221,9 @@
 w: \$SUPPORT/compose/ui/ui/src/commonMain/kotlin/androidx/compose/ui/node/DepthSortedSet\.kt: \([0-9]+, [0-9]+\): The corresponding parameter in the supertype 'Comparator' is named 'b'\. This may cause problems when calling this function with named arguments\.
 # > Task :benchmark:benchmark-common:runErrorProne
 \^
+public abstract void jvmDelete\(T t\);
+public abstract void jvmInsert\(@org\.jetbrains\.annotations\.NotNull\(\)
+public abstract java\.util\.List<androidx\.room\.androidx\.room\.integration\.kotlintestapp\.test\.JvmNameInDaoTest\.JvmNameEntity> jvmQuery\(\);
 symbol\:   static FLAG_MUTABLE
 location\: class PendingIntent
 \$OUT_DIR\/androidx\/docs\-public\/build\/srcs\/androidx\/work\/impl\/utils\/ForceStopRunnable\.java\:[0-9]+\: error\: cannot find symbol
@@ -601,3 +604,9 @@
 Info: Some warnings are typically a sign of using an outdated Java toolchain\. To fix, recompile the source with an updated toolchain\.
 # > Task :compose:ui:ui-inspection:buildCMakeRelWithDebInfo[arm64-v8a]
 C/C\+\+: ninja: warning: bad deps log signature or version; starting over
+# > Task :room:integration-tests:room-testapp-kotlin:kspWithKspDebugAndroidTestKotlin
+w: \[ksp\] Using @JvmName annotation on a function or accessor that will be overridden by Room is not supported\. If this is important for your use case, please file a bug at https://issuetracker\.google\.com/issues/new\?component=[0-9]+ with details\. \- androidx\.room\.androidx\.room\.integration\.kotlintestapp\.test\.JvmNameInDaoTest\.JvmNameDb\.jvmDao\(\)
+w: \[ksp\] \$SUPPORT/room/integration\-tests/kotlintestapp/src/androidTest/java/androidx/room/integration/kotlintestapp/test/JvmNameInDaoTest\.kt:[0-9]+: Using @JvmName annotation on a function or accessor that will be overridden by Room is not supported\. If this is important for your use case, please file a bug at https://issuetracker\.google\.com/issues/new\?component=[0-9]+ with details\.
+# > Task :room:integration-tests:room-testapp-kotlin:kaptWithKaptDebugAndroidTestKotlin
+\$OUT_DIR/androidx/room/integration\-tests/room\-testapp\-kotlin/build/tmp/kapt[0-9]+/stubs/withKaptDebugAndroidTest/androidx/room/androidx/room/integration/kotlintestapp/test/JvmNameInDaoTest\.java:[0-9]+: warning: Using @JvmName annotation on a function or accessor that will be overridden by Room is not supported\. If this is important for your use case, please file a bug at https://issuetracker\.google\.com/issues/new\?component=[0-9]+ with details\.
+public abstract androidx\.room\.androidx\.room\.integration\.kotlintestapp\.test\.JvmNameInDaoTest\.JvmNameDao jvmDao\(\);
\ No newline at end of file