Refactor boolean IR ABI stability flag to enum

Introduce an enum DeserializedContainerAbiStability with two values.
This is needed in order to support another reason for ABI instability in
a subsequent commit, namely "unstable because compiled by FIR".

 #KT-43592
This commit is contained in:
Alexander Udalov
2020-12-07 21:02:01 +01:00
parent b7d32a8754
commit cbd90c3af5
12 changed files with 50 additions and 18 deletions
@@ -17,9 +17,16 @@ interface DeserializedContainerSource : SourceElement {
// True iff this container was compiled by the new IR backend, this compiler is not using the IR backend right now,
// and no additional flags to override this behavior were specified.
val isInvisibleIrDependency: Boolean
val abiStability: DeserializedContainerAbiStability
// This string should only be used in error messages
val presentableString: String
}
enum class DeserializedContainerAbiStability {
// Either the container is stable, or this compiler is configured to ignore ABI stability of dependencies.
STABLE,
// The container is unstable because it is compiled with unstable JVM IR backend, and this compiler is _not_ configured to ignore that.
IR_UNSTABLE,
}