Skip to content

Commit c93884a

Browse files
committed
Update LLVM
1 parent 93b79f1 commit c93884a

File tree

7 files changed

+15
-13
lines changed

7 files changed

+15
-13
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-10-08.
107+
llvm_project_version = "e706a30ad5ad6acc7e7f20fe04be8d085613a23d"
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-c4tB09pGlsgrL1nKBpBV5F9NK0J2Gol6mdyP2C8TrJA=",
114114
patch_args = ["-p1"],
115115
patches = [
116116
"@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",

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/codegen/codegen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ namespace Carbon {
2020
auto CodeGen::Make(llvm::Module* module, llvm::StringRef target_triple_str,
2121
Diagnostics::Consumer* consumer) -> std::optional<CodeGen> {
2222
std::string error;
23+
llvm::Triple target_triple(target_triple_str);
2324
const llvm::Target* target =
24-
llvm::TargetRegistry::lookupTarget(target_triple_str, error);
25+
llvm::TargetRegistry::lookupTarget(target_triple, error);
2526
CARBON_CHECK(target, "Target should be validated before codegen: {0}", error);
2627

27-
llvm::Triple target_triple(target_triple_str);
2828
module->setTargetTriple(target_triple);
2929

3030
constexpr llvm::StringLiteral CPU = "generic";

toolchain/driver/clang_runner.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -298,6 +298,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& cc1_args) -> int {
298298
// discard the pointer without destroying or deallocating it.
299299
auto clang_instance = std::make_unique<clang::CompilerInstance>(
300300
std::move(invocation), std::move(pch_ops));
301+
clang_instance->setVirtualFileSystem(fs_);
301302

302303
// Override the disabling of free when we don't want to leak memory.
303304
if (!enable_leaking_) {
@@ -327,7 +328,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& cc1_args) -> int {
327328
}
328329

329330
// Create the actual diagnostics engine.
330-
clang_instance->createDiagnostics(*fs_);
331+
clang_instance->createDiagnostics();
331332
if (!clang_instance->hasDiagnostics()) {
332333
return EXIT_FAILURE;
333334
}
@@ -374,7 +375,7 @@ auto ClangRunner::RunCC1(llvm::SmallVectorImpl<const char*>& cc1_args) -> int {
374375
// options are stored in the compiler invocation and we can recreate the VFS
375376
// from the compiler invocation.
376377
if (!clang_instance->hasFileManager()) {
377-
clang_instance->createFileManager(fs_);
378+
clang_instance->createFileManager();
378379
}
379380

380381
if (auto profiler_output = clang_instance->createOutputFile(

toolchain/driver/compile_subcommand.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -884,8 +884,9 @@ auto CompileSubcommand::Run(DriverEnv& driver_env) -> DriverResult {
884884

885885
// Validate the target before passing it to Clang.
886886
std::string target_error;
887-
const llvm::Target* target = llvm::TargetRegistry::lookupTarget(
888-
options_.codegen_options.target, target_error);
887+
llvm::Triple target_triple(options_.codegen_options.target);
888+
const llvm::Target* target =
889+
llvm::TargetRegistry::lookupTarget(target_triple, target_error);
889890
if (!target) {
890891
CARBON_DIAGNOSTIC(CompileTargetInvalid, Error, "invalid target: {0}",
891892
std::string);

0 commit comments

Comments
 (0)