Skip to content

Commit 0502fb8

Browse files
author
ematejska
authored
Merge pull request #7217 from graydon/sourcekit-ignore-bridging-pch-3.1-branch
[Bridging PCH] Teach SourceKit to ignore the bridging-pch driver options
2 parents 2fd9e93 + 81b3c0d commit 0502fb8

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)