Thread Language through FileBuildSettings NFC

Will make it easier to work with cached settings.
This commit is contained in:
Ben Langmuir
2019-12-18 15:51:30 -08:00
parent a1c2bf7c54
commit cffced1844
6 changed files with 35 additions and 19 deletions

View File

@@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2018 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2020 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
@@ -68,8 +68,8 @@ extension CompilationDatabaseBuildSystem: BuildSystem {
let cmd = db[url].first else { return nil }
return FileBuildSettings(
compilerArguments: Array(cmd.commandLine.dropFirst()),
workingDirectory: cmd.directory
)
workingDirectory: cmd.directory,
language: language)
}
public func toolchain(for: DocumentURI, _ language: Language) -> Toolchain? { return nil }