Minor. Add comments

This commit is contained in:
Dmitriy Dolovov
2020-04-13 13:24:01 +07:00
parent 7be9a2ef17
commit c35420eaf6
3 changed files with 5 additions and 2 deletions
@@ -31,7 +31,7 @@ internal class KlibModuleDescriptorFactoryImpl(val createBuiltIns: (StorageManag
KlibModuleOrigin.CAPABILITY to origin,
ImplicitIntegerCoercion.MODULE_CAPABILITY to origin.isInteropLibrary()
),
// TODO: detect native platform by ???
// TODO: don't use hardcoded platform; it should be supplied as a parameter
platform = NativePlatforms.unspecifiedNativePlatform
)
@@ -36,6 +36,8 @@ import java.util.jar.Attributes
import java.util.regex.Pattern
interface KotlinLibraryKind {
// TODO: Drop this property. See https://youtrack.jetbrains.com/issue/KT-38233
// This property returns approximate library platform, as the real platform can be evaluated only for concrete library.
val compilerPlatform: TargetPlatform
}
@@ -53,6 +55,8 @@ object CommonLibraryKind : PersistentLibraryKind<DummyLibraryProperties>("kotlin
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!
}
// TODO: Drop this property. See https://youtrack.jetbrains.com/issue/KT-38233
// It returns approximate library platform, as the real platform can be evaluated only for concrete library.
val PersistentLibraryKind<*>?.platform: TargetPlatform
get() = when (this) {
is KotlinLibraryKind -> this.compilerPlatform
@@ -83,7 +83,6 @@ class NativeIdePlatformKindTooling : IdePlatformKindTooling() {
object NativeLibraryKind : PersistentLibraryKind<DummyLibraryProperties>("kotlin.native"), KotlinLibraryKind {
override val compilerPlatform: TargetPlatform
// TODO: detect native platform by ???
get() = NativePlatforms.unspecifiedNativePlatform
override fun createDefaultProperties() = DummyLibraryProperties.INSTANCE!!