Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -32,5 +31,9 @@ index 9bdd454e1e36..0f30c21f63dc 100644
+ ],
+ includes = ["lib/fuzzer"],
+)
+
cc_library(
name = "orc_rt_common_headers",
hdrs = [
--
2.42.0
2.42.0
4 changes: 2 additions & 2 deletions common/raw_hashtable_benchmark_helpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static_assert(llvm::isPowerOf2_64(NumFourCharStrs));
static auto MakeFourCharStrs(llvm::ArrayRef<char> characters, absl::BitGen& gen)
-> llvm::OwningArrayRef<std::array<char, 4>> {
constexpr ssize_t NumCharsMask = NumChars - 1;
constexpr ssize_t NumCharsShift = llvm::CTLog2<NumChars>();
constexpr ssize_t NumCharsShift = llvm::ConstantLog2<NumChars>();
llvm::OwningArrayRef<std::array<char, 4>> four_char_strs(NumFourCharStrs);
for (auto [i, str] : llvm::enumerate(four_char_strs)) {
str[0] = characters[i & NumCharsMask];
Expand Down Expand Up @@ -372,7 +372,7 @@ auto DumpHashStatistics(llvm::ArrayRef<T> keys) -> void {
ssize_t expected_size =
llvm::NextPowerOf2(keys.size() + (keys.size() / 7) - 1);

constexpr int GroupShift = llvm::CTLog2<GroupSize>();
constexpr int GroupShift = llvm::ConstantLog2<GroupSize>();

size_t mask = ComputeProbeMaskFromSize(expected_size);
uint64_t salt = ComputeSeed();
Expand Down
2 changes: 1 addition & 1 deletion common/raw_hashtable_metadata_group.h
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ class BitIndex
return reinterpret_cast<T*>(
&reinterpret_cast<std::byte*>(pointer)[index]);
} else if constexpr (llvm::isPowerOf2_64(sizeof(T))) {
constexpr size_t ScaleShift = llvm::CTLog2<sizeof(T)>();
constexpr size_t ScaleShift = llvm::ConstantLog2<sizeof(T)>();
static_assert(ScaleShift <= ByteEncodingShift,
"Scaling by >=8 should be handled above!");
constexpr size_t FoldedShift = ByteEncodingShift - ScaleShift;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ auto foo(short a) -> void;
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<invalid sloc>> <invalid sloc> implicit 'std::align_val_t'
// CHECK:STDOUT: | `-VisibilityAttr {{0x[a-f0-9]+}} <<invalid sloc>> Implicit Default
// CHECK:STDOUT: |-FunctionDecl {{0x[a-f0-9]+}} <<carbon-internal>:8:1, line:14:1> line:8:7 operator new 'void *(unsigned long, void *) noexcept'
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<built-in>:173:23, col:37> <carbon-internal>:8:33 'unsigned long'
// CHECK:STDOUT: | |-ParmVarDecl {{0x[a-f0-9]+}} <<built-in>:174:23, col:37> <carbon-internal>:8:33 'unsigned long'
// CHECK:STDOUT: | `-ParmVarDecl {{0x[a-f0-9]+}} <col:35, col:39> 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> col:6 used a 'short * _Nonnull':'short *'
Expand Down
7 changes: 5 additions & 2 deletions toolchain/driver/clang_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,11 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& 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;
}
Expand Down Expand Up @@ -374,7 +377,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& 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(
Expand Down
Loading