mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-10-05 22:02:55 +01:00
Language server: prelude support. (#7417)
Support multi-file compilation, and in particular imports of files from the prelude, in `carbon language_server`. In order to properly interface with `CompileDriver`, also switch over to building a proper VFS from the documents we're given. Assisted-by: Gemini via Antigravity
This commit is contained in:
@@ -82,13 +82,13 @@ static auto ComputeClangConfig(DriverEnv& driver_env,
|
||||
// Build a library invocation of Clang in order to query its header search
|
||||
// paths.
|
||||
std::shared_ptr clang_invocation =
|
||||
BuildClangInvocation(driver_env.consumer, driver_env.fs,
|
||||
BuildClangInvocation(*driver_env.consumer, driver_env.fs,
|
||||
*driver_env.installation, target_str, {});
|
||||
clang_invocation->getFrontendOpts().DisableFree = false;
|
||||
|
||||
// Setup up a driver-style diagnostic engine for the compiler invocation and
|
||||
// instance below as we won't go past that while computing the include dirs.
|
||||
Diagnostics::ErrorTrackingConsumer error_tracker(driver_env.consumer);
|
||||
Diagnostics::ErrorTrackingConsumer error_tracker(*driver_env.consumer);
|
||||
Diagnostics::NoLocEmitter emitter(&error_tracker);
|
||||
ClangDriverDiagnosticConsumer diagnostic_consumer(&emitter);
|
||||
llvm::IntrusiveRefCntPtr<clang::DiagnosticsEngine> diags(
|
||||
|
||||
Reference in New Issue
Block a user