Skip to content

Commit b5cfa3d

Browse files
committed
Update LLVM and update APIs
This also updates the patch file for compiler-rt as upstream has changed a bit. No functional change.
1 parent 4a6376c commit b5cfa3d

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
lines changed

MODULE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,14 +103,14 @@ bazel_dep(name = "zstd", version = "1.5.7", repo_name = "llvm_zstd")
103103

104104
# We pin to specific upstream commits and try to track top-of-tree reasonably
105105
# closely rather than pinning to a specific release.
106-
# HEAD as of 2025-09-07.
107-
llvm_project_version = "c000c9e4bf737c1cc0e5c7b435b24ea73d21ee05"
106+
# HEAD as of 2025-09-23.
107+
llvm_project_version = "113f01aa82d055410f22a9d03b3468fa68600589"
108108

109109
# Load a repository for the raw llvm-project, pre-overlay.
110110
http_archive(
111111
name = "llvm-raw",
112112
build_file_content = "# empty",
113-
integrity = "sha256-6URudXFgqoCuQI4hbb7AlN4Wj7WzLHFB4AWGjUV0UAI=",
113+
integrity = "sha256-mu4Ao1qnZjl0ZYnG0J6MGCSb4Wtbaqa3iKVwpLxsRUM=",
114114
patch_args = ["-p1"],
115115
patches = [
116116
"@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",

bazel/llvm_project/0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,13 @@ Subject: [PATCH] Add libfuzzer target to compiler-rt.
88
1 file changed, 17 insertions(+)
99

1010
diff --git a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
11-
index 9bdd454e1e36..0f30c21f63dc 100644
11+
index 90264449de76..115da4cb77f6 100644
1212
--- a/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
1313
+++ b/utils/bazel/llvm-project-overlay/compiler-rt/BUILD.bazel
14-
@@ -50,3 +50,20 @@ cc_library(
15-
":config",
14+
@@ -57,6 +57,23 @@ cc_library(
1615
],
1716
)
18-
+
17+
1918
+cc_library(
2019
+ name = "FuzzerMain",
2120
+ srcs = glob(
@@ -32,5 +31,9 @@ index 9bdd454e1e36..0f30c21f63dc 100644
3231
+ ],
3332
+ includes = ["lib/fuzzer"],
3433
+)
34+
+
35+
cc_library(
36+
name = "orc_rt_common_headers",
37+
hdrs = [
3538
--
36-
2.42.0
39+
2.42.0

common/raw_hashtable_benchmark_helpers.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static_assert(llvm::isPowerOf2_64(NumFourCharStrs));
6161
static auto MakeFourCharStrs(llvm::ArrayRef<char> characters, absl::BitGen& gen)
6262
-> llvm::OwningArrayRef<std::array<char, 4>> {
6363
constexpr ssize_t NumCharsMask = NumChars - 1;
64-
constexpr ssize_t NumCharsShift = llvm::CTLog2<NumChars>();
64+
constexpr ssize_t NumCharsShift = llvm::ConstantLog2<NumChars>();
6565
llvm::OwningArrayRef<std::array<char, 4>> four_char_strs(NumFourCharStrs);
6666
for (auto [i, str] : llvm::enumerate(four_char_strs)) {
6767
str[0] = characters[i & NumCharsMask];
@@ -372,7 +372,7 @@ auto DumpHashStatistics(llvm::ArrayRef<T> keys) -> void {
372372
ssize_t expected_size =
373373
llvm::NextPowerOf2(keys.size() + (keys.size() / 7) - 1);
374374

375-
constexpr int GroupShift = llvm::CTLog2<GroupSize>();
375+
constexpr int GroupShift = llvm::ConstantLog2<GroupSize>();
376376

377377
size_t mask = ComputeProbeMaskFromSize(expected_size);
378378
uint64_t salt = ComputeSeed();

common/raw_hashtable_metadata_group.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ class BitIndex
124124
return reinterpret_cast<T*>(
125125
&reinterpret_cast<std::byte*>(pointer)[index]);
126126
} else if constexpr (llvm::isPowerOf2_64(sizeof(T))) {
127-
constexpr size_t ScaleShift = llvm::CTLog2<sizeof(T)>();
127+
constexpr size_t ScaleShift = llvm::ConstantLog2<sizeof(T)>();
128128
static_assert(ScaleShift <= ByteEncodingShift,
129129
"Scaling by >=8 should be handled above!");
130130
constexpr size_t FoldedShift = ByteEncodingShift - ScaleShift;

toolchain/check/testdata/interop/cpp/function/thunk_ast.carbon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ auto foo(short a) -> void;
6464
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<invalid sloc>> <invalid sloc> implicit 'std::align_val_t'
6565
// CHECK:STDOUT: | `-VisibilityAttr {{0x[a-f0-9]+}} <<invalid sloc>> Implicit Default
6666
// CHECK:STDOUT: |-FunctionDecl {{0x[a-f0-9]+}} <<carbon-internal>:8:1, line:14:1> line:8:7 operator new 'void *(unsigned long, void *) noexcept'
67-
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<built-in>:173:23, col:37> <carbon-internal>:8:33 'unsigned long'
67+
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<built-in>:174:23, col:37> <carbon-internal>:8:33 'unsigned long'
6868
// CHECK:STDOUT: | `-ParmVarDecl {{0x[a-f0-9]+}} <col:35, col:39> col:40 'void *'
6969
// CHECK:STDOUT: `-FunctionDecl {{0x[a-f0-9]+}} <./thunk_required.h:[[@LINE-51]]:6> col:6 foo__carbon_thunk 'void (short * _Nonnull)' extern
7070
// CHECK:STDOUT: |-ParmVarDecl {{0x[a-f0-9]+}} <col:6> col:6 used a 'short * _Nonnull':'short *'

toolchain/driver/clang_runner.cpp

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,11 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& cc1_args) -> int {
326326
installation_->clang_resource_path();
327327
}
328328

329+
// Create the filesystem.
330+
clang_instance->createVirtualFileSystem(fs_, &diag_buffer);
331+
329332
// Create the actual diagnostics engine.
330-
clang_instance->createDiagnostics(*fs_);
333+
clang_instance->createDiagnostics();
331334
if (!clang_instance->hasDiagnostics()) {
332335
return EXIT_FAILURE;
333336
}
@@ -374,7 +377,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& cc1_args) -> int {
374377
// options are stored in the compiler invocation and we can recreate the VFS
375378
// from the compiler invocation.
376379
if (!clang_instance->hasFileManager()) {
377-
clang_instance->createFileManager(fs_);
380+
clang_instance->createFileManager();
378381
}
379382

380383
if (auto profiler_output = clang_instance->createOutputFile(

0 commit comments

Comments
 (0)