Revert "[K/N][interop] A small optimization"
This reverts commit 2cbe946331.
This commit is contained in:
+1
-5
@@ -25,7 +25,6 @@ import java.nio.file.Path
|
||||
import java.nio.file.Paths
|
||||
import java.security.DigestInputStream
|
||||
import java.security.MessageDigest
|
||||
import java.util.concurrent.ConcurrentHashMap
|
||||
|
||||
val CValue<CXType>.kind: CXTypeKind get() = this.useContents { kind }
|
||||
|
||||
@@ -819,10 +818,7 @@ internal fun getContainingFile(cursor: CValue<CXCursor>): CXFile? {
|
||||
}
|
||||
|
||||
internal val CXFile.path: String get() = clang_getFileName(this).convertAndDispose()
|
||||
|
||||
// TODO: this map doesn't get cleaned up but adds quite significant performance improvement.
|
||||
private val canonicalPaths = ConcurrentHashMap<String, String>()
|
||||
internal val CXFile.canonicalPath: String get() = canonicalPaths.getOrPut(this.path) { File(this.path).canonicalPath }
|
||||
internal val CXFile.canonicalPath: String get() = File(this.path).canonicalPath
|
||||
|
||||
private fun createVfsOverlayFileContents(virtualPathToReal: Map<Path, Path>): ByteArray {
|
||||
val overlay = clang_VirtualFileOverlay_create(0)
|
||||
|
||||
Reference in New Issue
Block a user