Skip to content

Commit 30ac972

Browse files
committed
Remove FileBuildSettings.patching that takes a String
This overload is no longer needed.
1 parent f433f58 commit 30ac972

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Sources/BuildSystemIntegration/FileBuildSettings.swift

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ package struct FileBuildSettings: Equatable, Sendable {
5656
/// This patches the arguments by searching for the argument corresponding to
5757
/// `originalFile` and replacing it.
5858
package func patching(newFile: DocumentURI, originalFile: DocumentURI) -> FileBuildSettings {
59-
return patching(newFile: newFile.pseudoPath, originalFile: originalFile)
60-
}
61-
62-
/// Return arguments suitable for use by `newFile`.
63-
///
64-
/// This patches the arguments by searching for the argument corresponding to
65-
/// `originalFile` and replacing it.
66-
package func patching(newFile: String, originalFile: DocumentURI) -> FileBuildSettings {
6759
var arguments = self.compilerArguments
6860
// URL.lastPathComponent is only set for file URLs but we want to also infer a file extension for non-file URLs like
6961
// untitled:file.cpp
@@ -74,7 +66,7 @@ package struct FileBuildSettings: Equatable, Sendable {
7466
// the file system.
7567
$0.hasSuffix(basename) && originalFile.pseudoPath.hasSuffix($0)
7668
}) {
77-
arguments[index] = newFile
69+
arguments[index] = newFile.pseudoPath
7870
// The `-x<lang>` flag needs to be before the possible `-c <header file>`
7971
// argument in order for Clang to respect it. If there is a pre-existing `-x`
8072
// flag though, Clang will honor that one instead since it comes after.

0 commit comments

Comments
 (0)