mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
If there is a `-fmodule-map-file` argument whose file doesn’t exist and SwiftShims is not in the module cache, we fail to build it, because clang throws an error about the missing module map. This causes SourceKit to drop all semantic functionality, even if the missing module map isn’t required. To work around this, drop all `-fmodule-map-file` arguments with missing files from the clang importer’s arguments, reporting the eror that `clang` would throw manually. Fixes rdar://77449671
10 lines
376 B
Swift
10 lines
376 B
Swift
// RUN: %empty-directory(%t.mcp)
|
|
// RUN: %sourcekitd-test -req=cursor -pos=6:9 %s -- -Xcc -fmodule-map-file=/some/missing/file -module-cache-path %t.mcp %s | %FileCheck %s
|
|
|
|
// We used to fail to load the stdlib if there is a `-fmodule-map-file` option pointing to a missing file
|
|
|
|
let x: String = "abc"
|
|
// CHECK: source.lang.swift.ref.struct ()
|
|
// CHECK: String
|
|
// CHECK: s:SS
|