diff --git a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt index a974f1b5c11..ab0ac552182 100644 --- a/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt +++ b/Interop/Indexer/src/main/kotlin/org/jetbrains/kotlin/native/interop/indexer/Indexer.kt @@ -279,8 +279,10 @@ fun buildNativeIndexImpl(headerFile: File, args: List): NativeIndex { indexEntityReference.setStatic(null) } + val commandLineArgs = if (args1.size != 0) mallocNativeArrayOf(Int8Box.Companion, *args1)[0] else null + clang_indexSourceFile(indexAction, clientData, callbacks, IndexerCallbacks.size, 0, headerFile.path, - mallocNativeArrayOf(Int8Box.Companion, *args1)[0], args1.size, null, 0, null, 0) + commandLineArgs, args1.size, null, 0, null, 0) return res