Эх сурвалжийг харах

Update LLVM (#5605)

Some updates required for
https://github.com/llvm/llvm-project/pull/139584.

Co-authored-by: Josh L <josh11b@users.noreply.github.com>
josh11b 11 сар өмнө
parent
commit
09ca0b8308

+ 3 - 3
MODULE.bazel

@@ -113,8 +113,8 @@ bazel_dep(name = "zstd", version = "1.5.6", repo_name = "llvm_zstd")
 
 # We pin to specific upstream commits and try to track top-of-tree reasonably
 # closely rather than pinning to a specific release.
-# HEAD as of 2025-05-02.
-llvm_project_version = "98763433e66dd91bf5f10b1daf03d9373f07912a"
+# HEAD as of 2025-05-28.
+llvm_project_version = "7b074fc9362a4a6a5f172dd8936a22fb25eff96b"
 
 # Load a repository for the raw llvm-project, pre-overlay.
 http_archive(
@@ -126,7 +126,7 @@ http_archive(
         "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch",
         "@carbon//bazel/llvm_project:0003_Comment_out_unloaded_proto_library_dependencies.patch",
     ],
-    sha256 = "140ea04e8b1266a21926da5f1cbeee182c75086eaff2c0bf963538fea4d39014",
+    sha256 = "07f80f32e81ac5dc19c5e49830f6d4a2e6208adb7d875ac3d1e8d043a602d9e4",
     strip_prefix = "llvm-project-{0}".format(llvm_project_version),
     urls = ["https://github.com/llvm/llvm-project/archive/{0}.tar.gz".format(llvm_project_version)],
 )

+ 1 - 1
MODULE.bazel.lock

@@ -238,7 +238,7 @@
     },
     "//bazel/llvm_project:llvm_project.bzl%llvm_project": {
       "general": {
-        "bzlTransitiveDigest": "rcy/svHRSqNzj8OWh9jv2HJTFjx48QySkI1dT+UlaTI=",
+        "bzlTransitiveDigest": "WeP75HuuSuHfiMXYgJJVbnizIcDpw7xlAckhEp137z0=",
         "usagesDigest": "uwwVdRj/NhFVoOIaadPP393kgC/Uu3/nTX9ln69oWp4=",
         "recordedFileInputs": {},
         "recordedDirentsInputs": {},

+ 5 - 5
toolchain/check/import_cpp.cpp

@@ -87,11 +87,11 @@ class CarbonClangDiagnosticConsumer : public clang::DiagnosticConsumer {
     // TODO: Consider allowing setting `LangOptions` or use
     // `ASTContext::getLangOptions()`.
     clang::LangOptions lang_options;
-    clang::TextDiagnostic text_diagnostic(
-        diagnostics_stream, lang_options,
-        // TODO: Consider allowing setting `DiagnosticOptions` or use
-        // `ASTUnit::getDiagnostics().::getLangOptions().getDiagnosticOptions()`.
-        new clang::DiagnosticOptions());
+    // TODO: Consider allowing setting `DiagnosticOptions` or use
+    // `ASTUnit::getDiagnostics().getLangOptions().getDiagnosticOptions()`.
+    clang::DiagnosticOptions diagnostic_options;
+    clang::TextDiagnostic text_diagnostic(diagnostics_stream, lang_options,
+                                          diagnostic_options);
     text_diagnostic.emitDiagnostic(
         clang::FullSourceLoc(info.getLocation(), info.getSourceManager()),
         diag_level, message, info.getRanges(), info.getFixItHints());

+ 5 - 5
toolchain/driver/clang_runner.cpp

@@ -75,18 +75,18 @@ auto ClangRunner::Run(llvm::ArrayRef<llvm::StringRef> args) -> bool {
 
   // Create the diagnostic options and parse arguments controlling them out of
   // our arguments.
-  llvm::IntrusiveRefCntPtr<clang::DiagnosticOptions> diagnostic_options =
+  std::unique_ptr<clang::DiagnosticOptions> diagnostic_options =
       clang::CreateAndPopulateDiagOpts(cstr_args);
 
   // TODO: We don't yet support serializing diagnostics the way the actual
   // `clang` command line does. Unclear if we need to or not, but it would need
   // a bit more logic here to set up chained consumers.
   clang::TextDiagnosticPrinter diagnostic_client(llvm::errs(),
-                                                 diagnostic_options.get());
+                                                 *diagnostic_options);
 
-  clang::DiagnosticsEngine diagnostics(
-      diagnostic_ids_, diagnostic_options.get(), &diagnostic_client,
-      /*ShouldOwnClient=*/false);
+  clang::DiagnosticsEngine diagnostics(diagnostic_ids_, *diagnostic_options,
+                                       &diagnostic_client,
+                                       /*ShouldOwnClient=*/false);
   clang::ProcessWarningOptions(diagnostics, *diagnostic_options, *fs_);
 
   clang::driver::Driver driver(clang_path, target_, diagnostics,