Skip to content

Commit 7137bab

Browse files
committed
[Bridging PCH] Teach SourceKit to ignore the bridging-pch driver options.
1 parent 37e6267 commit 7137bab

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// RUN: %sourcekitd-test -req=complete -pos=5:3 %s -- -enable-bridging-pch %s | %FileCheck %s
2+
// RUN: %sourcekitd-test -req=complete -pos=5:3 %s -- -disable-bridging-pch %s | %FileCheck %s
3+
4+
var s = 10
5+
s.
6+
7+
// CHECK: littleEndian

tools/SourceKit/lib/SwiftLang/SwiftASTManager.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,9 @@ static void sanitizeCompilerArgs(ArrayRef<const char *> Args,
370370
continue;
371371
if (Arg == "-embed-bitcode")
372372
continue;
373+
if (Arg == "-enable-bridging-pch" ||
374+
Arg == "-disable-bridging-pch")
375+
continue;
373376
NewArgs.push_back(CArg);
374377
}
375378
}

0 commit comments

Comments
 (0)