diff --git a/MODULE.bazel b/MODULE.bazel index 476bf970586a9..538acb8b6117b 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -103,14 +103,14 @@ bazel_dep(name = "zstd", version = "1.5.7", 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-09-07. -llvm_project_version = "c000c9e4bf737c1cc0e5c7b435b24ea73d21ee05" +# HEAD as of 2025-09-23. +llvm_project_version = "113f01aa82d055410f22a9d03b3468fa68600589" # Load a repository for the raw llvm-project, pre-overlay. http_archive( name = "llvm-raw", build_file_content = "# empty", - integrity = "sha256-6URudXFgqoCuQI4hbb7AlN4Wj7WzLHFB4AWGjUV0UAI=", + integrity = "sha256-mu4Ao1qnZjl0ZYnG0J6MGCSb4Wtbaqa3iKVwpLxsRUM=", patch_args = ["-p1"], patches = [ "@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch", diff --git a/bazel/llvm_project/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch b/bazel/llvm_project/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch index 7c55f4d48c1d1..39d22fde195ae 100644 --- a/bazel/llvm_project/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch +++ b/bazel/llvm_project/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch @@ -8,14 +8,13 @@ Subject: [PATCH] Add libfuzzer target to compiler-rt. 1 file changed, 17 insertions(+) diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel -index 9bdd454e1e36..0f30c21f63dc 100644 +index 90264449de76..115da4cb77f6 100644 --- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel +++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel -@@ -50,3 +50,20 @@ cc_library( - ":config", +@@ -57,6 +57,23 @@ cc_library( ], ) -+ + +cc_library( + name = "FuzzerMain", + srcs = glob( @@ -32,5 +31,9 @@ index 9bdd454e1e36..0f30c21f63dc 100644 + ], + includes = ["lib/fuzzer"], +) ++ + cc_library( + name = "orc_rt_common_headers", + hdrs = [ -- -2.42.0 \ No newline at end of file +2.42.0 diff --git a/common/raw_hashtable_benchmark_helpers.cpp b/common/raw_hashtable_benchmark_helpers.cpp index 11f431beae16e..6e4b5ab7cfd38 100644 --- a/common/raw_hashtable_benchmark_helpers.cpp +++ b/common/raw_hashtable_benchmark_helpers.cpp @@ -61,7 +61,7 @@ static_assert(llvm::isPowerOf2_64(NumFourCharStrs)); static auto MakeFourCharStrs(llvm::ArrayRef characters, absl::BitGen& gen) -> llvm::OwningArrayRef> { constexpr ssize_t NumCharsMask = NumChars - 1; - constexpr ssize_t NumCharsShift = llvm::CTLog2(); + constexpr ssize_t NumCharsShift = llvm::ConstantLog2(); llvm::OwningArrayRef> four_char_strs(NumFourCharStrs); for (auto [i, str] : llvm::enumerate(four_char_strs)) { str[0] = characters[i & NumCharsMask]; @@ -372,7 +372,7 @@ auto DumpHashStatistics(llvm::ArrayRef keys) -> void { ssize_t expected_size = llvm::NextPowerOf2(keys.size() + (keys.size() / 7) - 1); - constexpr int GroupShift = llvm::CTLog2(); + constexpr int GroupShift = llvm::ConstantLog2(); size_t mask = ComputeProbeMaskFromSize(expected_size); uint64_t salt = ComputeSeed(); diff --git a/common/raw_hashtable_metadata_group.h b/common/raw_hashtable_metadata_group.h index 943a49fa1fe4c..51f1a5b899aa9 100644 --- a/common/raw_hashtable_metadata_group.h +++ b/common/raw_hashtable_metadata_group.h @@ -124,7 +124,7 @@ class BitIndex return reinterpret_cast( &reinterpret_cast(pointer)[index]); } else if constexpr (llvm::isPowerOf2_64(sizeof(T))) { - constexpr size_t ScaleShift = llvm::CTLog2(); + constexpr size_t ScaleShift = llvm::ConstantLog2(); static_assert(ScaleShift <= ByteEncodingShift, "Scaling by >=8 should be handled above!"); constexpr size_t FoldedShift = ByteEncodingShift - ScaleShift; diff --git a/toolchain/check/testdata/interop/cpp/function/thunk_ast.carbon b/toolchain/check/testdata/interop/cpp/function/thunk_ast.carbon index 4f3b57e444b98..9b5b3511fab89 100644 --- a/toolchain/check/testdata/interop/cpp/function/thunk_ast.carbon +++ b/toolchain/check/testdata/interop/cpp/function/thunk_ast.carbon @@ -64,7 +64,7 @@ auto foo(short a) -> void; // CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <> implicit 'std::align_val_t' // CHECK:STDOUT: | `-VisibilityAttr {{0x[a-f0-9]+}} <> Implicit Default // CHECK:STDOUT: |-FunctionDecl {{0x[a-f0-9]+}} <:8:1, line:14:1> line:8:7 operator new 'void *(unsigned long, void *) noexcept' -// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <:173:23, col:37> :8:33 'unsigned long' +// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <:174:23, col:37> :8:33 'unsigned long' // CHECK:STDOUT: | `-ParmVarDecl {{0x[a-f0-9]+}} col:40 'void *' // CHECK:STDOUT: `-FunctionDecl {{0x[a-f0-9]+}} <./thunk_required.h:[[@LINE-51]]:6> col:6 foo__carbon_thunk 'void (short * _Nonnull)' extern // CHECK:STDOUT: |-ParmVarDecl {{0x[a-f0-9]+}} col:6 used a 'short * _Nonnull':'short *' diff --git a/toolchain/driver/clang_runner.cpp b/toolchain/driver/clang_runner.cpp index 37ea7280318c5..472ec9a1e0994 100644 --- a/toolchain/driver/clang_runner.cpp +++ b/toolchain/driver/clang_runner.cpp @@ -326,8 +326,11 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl& cc1_args) -> int { installation_->clang_resource_path(); } + // Create the filesystem. + clang_instance->createVirtualFileSystem(fs_, &diag_buffer); + // Create the actual diagnostics engine. - clang_instance->createDiagnostics(*fs_); + clang_instance->createDiagnostics(); if (!clang_instance->hasDiagnostics()) { return EXIT_FAILURE; } @@ -374,7 +377,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl& cc1_args) -> int { // options are stored in the compiler invocation and we can recreate the VFS // from the compiler invocation. if (!clang_instance->hasFileManager()) { - clang_instance->createFileManager(fs_); + clang_instance->createFileManager(); } if (auto profiler_output = clang_instance->createOutputFile(