Commit Graph

18 Commits

Author SHA1 Message Date
Hamish Knight eb45f2396d Replace vfs::getRealFileSystem -> vfs::createPhysicalFileSystem
Calling `setCurrentWorkingDirectory` on `getRealFileSystem` sets the
working directory for the process itself. This is unsafe for clients
such as SourceKit which can process multiple concurrent requests,
and may be used as an in-process library in e.g sourcekit-lsp. Switch
to `createPhysicalFileSystem` instead, where setting the working
directory is done locally on the FileSystem itself.
2026-02-09 09:46:34 +00:00
Hamish Knight 9997b1a4e7 [IDE] Avoid getting realpath for empty primary
Otherwise a physical FileSystem would return the current working
directory.
2026-02-09 09:46:34 +00:00
Anthony Latsis 0981b71090 Adjust calls to clang::DiagnosticsEngine ctor (now takes ref vs. ptr)
See https://github.com/llvm/llvm-project/pull/139584
2025-06-13 21:57:36 +01:00
swift-ci a1a25f83a4 Merge remote-tracking branch 'origin/main' into rebranch 2025-05-20 11:39:00 -07:00
Ben Barham 381684a389 [SourceKit] Remove diagnostics path calculation
The diagnostic group documentation now point to the swift.org URL rather
than the toolchain path, so it no longer needs to be passed all the way
through sourcekitd.

Resolves rdar://151500502.
2025-05-16 17:58:16 -07:00
Anthony Latsis c8ea55c100 ClangImporter, IDETool: Conservatively adjust uses of clang::CompilerInstance::createDiagnostics (parameter added)
Per df9a14d7bbf1180e4f1474254c9d7ed6bcb4ce55 (llvm-project).
2025-04-24 01:52:47 +01:00
Ben Langmuir e6de6d56c1 Update for change to clang's ObjectFilePCHContainerReader/Writer 2025-03-03 08:12:32 -08:00
Jan Svoboda 89048bab2f Drop -index-header-map, adopt new Module::Headers API (#77376) 2024-11-06 14:20:01 -08:00
Alex Hoppen 577727ad55 Remove DiagnosticsEditorMode
Migrate the last diagnostic to be independent of `DiagnosticEditorMode` and remove that option.

rdar://133111163
2024-08-14 11:24:31 -07:00
Jeremy Day 221c7039bd Add explicit OpenSourcesAsVolatile option 2024-07-26 17:02:04 -07:00
Tim Kientzle 1d961ba22d Add #include "swift/Basic/Assertions.h" to a lot of source files
Although I don't plan to bring over new assertions wholesale
into the current qualification branch, it's entirely possible
that various minor changes in main will use the new assertions;
having this basic support in the release branch will simplify that.
(This is why I'm adding the includes as a separate pass from
rewriting the individual assertions)
2024-06-05 19:37:30 -07:00
Alex Hoppen ccdd62038a [SourceKit] Don’t set DisableModulesValidateSystemDependencies to true
It appears that https://github.com/apple/llvm-project/commit/a6ebd3083dbf8aadae58f6f2a2f1071976649d56 changed the behavior of `-fno-modules-validate-system-headers` (aka. `DisableModulesValidateSystemDependencies`) in conjunction with `-fmodules-validate-once-per-build-session`: Before that change, `-fno-modules-validate-system-headers` needed to be passed for `-fmodules-validate-once-per-build-session` to have any effect (we were always validating system dependencies if `-fno-modules-validate-once-per-build-session` was not set). After the change, `-fno-modules-validate-once-per-build-session` causes system dependencies to never be validated, independent of the build session timestamp.

This change should have no effect on Xcode because it adds `-fmodules-validate-system-headers` to the compiler arguments for Swift files, which overrides `SearchPathOpts.DisableModulesValidateSystemDependencies = true;`
2024-05-31 16:00:26 -07:00
Harlan Haskins 1b36983b8b Add armv4t for GBA programming (#73005) 2024-04-13 18:11:16 -06:00
Jan Svoboda 8b6e58ac15 [scanner] Adopt new Clang API for build arguments (#68503) 2023-10-06 11:31:05 -07:00
Rintaro Ishizaki 3517db4c3b [SourceKit] Pass 'swiftc' path to Driver when creating frontend args
Driver uses its path to derive the plugin paths (i.e.
'lib/swift/host/plugins' et al.) Previously it was a constant string
'swiftc' that caused SourceKit failed to find dylib plugins in the
toolchain. Since 'SwiftLangSupport' knows the swift-frontend path,
use it, but replacing the filename with 'swiftc', to derive the plugin
paths.

rdar://107849796
2023-04-12 09:53:43 -07:00
Ben Barham 9b8f7c30d1 [ClangImporter] Probe for a PCH when the header is missing
The default for `ProbePrecompiled` was changed in rebranch. Set it back
to `true` to avoid breaking existing clients.

Resolves rdar://106966024.
2023-03-20 15:49:13 -07:00
Erik Eckstein 9ddd4cd98d adapt changed API for clang::createInvocation 2022-11-04 20:44:19 +01:00
Allan Shortlidge d663c11df7 IDE: Move compiler invocation utils to break cycle with Frontend.
Move compiler invocation utilities up into the IDETool library which is designed to be dependent on the Frontend and FrontendTool libraries.
2022-10-29 17:51:53 -07:00