From 7402ef24bb81e979c07e6bc5899304fd92363e5c Mon Sep 17 00:00:00 2001 From: Sergey Bogolepov Date: Wed, 25 Jan 2023 17:46:15 +0200 Subject: [PATCH] [K/N] Remove obsolete TempFiles constructor parameter --- .../kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt | 2 +- .../org/jetbrains/kotlin/backend/konan/NativeGenerationState.kt | 2 +- .../src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt index d02a3f57637..46ad0212907 100644 --- a/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt +++ b/kotlin-native/Interop/StubGenerator/src/main/kotlin/org/jetbrains/kotlin/native/interop/gen/jvm/main.kt @@ -310,7 +310,7 @@ private fun processCLib( val libName = additionalArgs.cstubsName ?: fqParts.joinToString("") + "stubs" - val tempFiles = TempFiles(libName, cinteropArguments.tempDir) + val tempFiles = TempFiles(cinteropArguments.tempDir) val imports = parseImports(allLibraryDependencies) diff --git a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeGenerationState.kt b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeGenerationState.kt index 830cd076f1a..ca76d35e07d 100644 --- a/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeGenerationState.kt +++ b/kotlin-native/backend.native/compiler/ir/backend.native/src/org/jetbrains/kotlin/backend/konan/NativeGenerationState.kt @@ -55,7 +55,7 @@ internal class NativeGenerationState( it else File(it, CacheSupport.cacheFileId(singleFileStrategy.fqName, singleFileStrategy.filePath)).path } - TempFiles(outputFiles.outputName, pathToTempDir) + TempFiles(pathToTempDir) } val outputFile = outputFiles.mainFileName diff --git a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt index dbc112d9eed..370479529ec 100644 --- a/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt +++ b/kotlin-native/shared/src/main/kotlin/org/jetbrains/kotlin/konan/TempFiles.kt @@ -22,7 +22,7 @@ import org.jetbrains.kotlin.konan.file.* * Creates and stores temporary compiler outputs * If pathToTemporaryDir is given and is not empty then temporary outputs will be preserved */ -class TempFiles(outputPath: String, pathToTemporaryDir: String? = null) { +class TempFiles(pathToTemporaryDir: String? = null) { fun dispose() { if (deleteOnExit) { // Note: this can throw an exception if a file deletion is failed for some reason (e.g. OS is Windows and the file is in use).