Browse Source

Update LLVM to a more recent commit (#6771)

This includes the major version bump and some changes to output in
various tests.
Chandler Carruth 2 months ago
parent
commit
375a736c42

+ 3 - 4
MODULE.bazel

@@ -104,21 +104,20 @@ bazel_dep(name = "zstd", version = "1.5.7.bcr.1", repo_name = "llvm_zstd")
 
 
 # We pin to specific upstream commits and try to track top-of-tree reasonably
 # We pin to specific upstream commits and try to track top-of-tree reasonably
 # closely rather than pinning to a specific release.
 # closely rather than pinning to a specific release.
-# HEAD as of 2026-01-08.
-llvm_project_version = "21a1e6e6a70d70635c68b9aaa54f816ae36a6416"
+# HEAD as of 2026-02-12.
+llvm_project_version = "b20d7d0278059735bb8eb538ac51e13b58895c1a"
 
 
 # Load a repository for the raw llvm-project, pre-overlay.
 # Load a repository for the raw llvm-project, pre-overlay.
 http_archive(
 http_archive(
     name = "llvm-raw",
     name = "llvm-raw",
     build_file_content = "# empty",
     build_file_content = "# empty",
-    integrity = "sha256-ouWG2d4Cob9P6+dxCLZnV4RldSOqZp7mtwd6vd+ZK3Q=",
+    integrity = "sha256-sRZjS3KippWoaVcr1mWtJ1kFZ+jrjb/KoNkzh+N8HOM=",
     patch_args = ["-p1"],
     patch_args = ["-p1"],
     patches = [
     patches = [
         "@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",
         "@carbon//bazel/llvm_project:0001_Patch_for_mallinfo2_when_using_Bazel_build_system.patch",
         "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch",
         "@carbon//bazel/llvm_project:0002_Added_Bazel_build_for_compiler_rt_fuzzer.patch",
         "@carbon//bazel/llvm_project:0004_Introduce_basic_sources_exporting_for_libunwind.patch",
         "@carbon//bazel/llvm_project:0004_Introduce_basic_sources_exporting_for_libunwind.patch",
         "@carbon//bazel/llvm_project:0005_Introduce_basic_sources_exporting_for_libcxx_and_libcxxabi.patch",
         "@carbon//bazel/llvm_project:0005_Introduce_basic_sources_exporting_for_libcxx_and_libcxxabi.patch",
-        "@carbon//bazel/llvm_project:0008_Add_filegroups_for_installed_compiler-rt_headers.patch",
         "@carbon//bazel/llvm_project:0009_Introduce_starlark_exporting_compiler-rt_build_information.patch",
         "@carbon//bazel/llvm_project:0009_Introduce_starlark_exporting_compiler-rt_build_information.patch",
     ],
     ],
     strip_prefix = "llvm-project-{0}".format(llvm_project_version),
     strip_prefix = "llvm-project-{0}".format(llvm_project_version),

+ 2 - 2
toolchain/check/testdata/interop/cpp/modules.carbon

@@ -42,7 +42,7 @@ import Cpp inline '''
 // CHECK:STDERR:
 // CHECK:STDERR:
 // CHECK:STDERR: fail_module_in_inline_cpp.carbon:[[@LINE+4]]:8: error: module 'Foo' not found [CppInteropParseError]
 // CHECK:STDERR: fail_module_in_inline_cpp.carbon:[[@LINE+4]]:8: error: module 'Foo' not found [CppInteropParseError]
 // CHECK:STDERR:    17 | module Foo;
 // CHECK:STDERR:    17 | module Foo;
-// CHECK:STDERR:       | ~~~~~~~^~~
+// CHECK:STDERR:       |        ^~~~
 // CHECK:STDERR:
 // CHECK:STDERR:
 module Foo;
 module Foo;
 ''';
 ''';
@@ -70,7 +70,7 @@ int n;
 // CHECK:STDERR:
 // CHECK:STDERR:
 // CHECK:STDERR: fail_global_module_in_inline_cpp.carbon:[[@LINE+4]]:8: error: module 'Foo' not found [CppInteropParseError]
 // CHECK:STDERR: fail_global_module_in_inline_cpp.carbon:[[@LINE+4]]:8: error: module 'Foo' not found [CppInteropParseError]
 // CHECK:STDERR:    25 | module Foo;
 // CHECK:STDERR:    25 | module Foo;
-// CHECK:STDERR:       | ~~~~~~~^~~
+// CHECK:STDERR:       |        ^~~~
 // CHECK:STDERR:
 // CHECK:STDERR:
 module Foo;
 module Foo;
 ''';
 ''';

+ 2 - 2
toolchain/driver/testdata/fail_config.carbon

@@ -21,8 +21,8 @@
 // tests.
 // tests.
 //
 //
 // CHECK:STDOUT: CLANG_INCLUDE_DIRS:
 // CHECK:STDOUT: CLANG_INCLUDE_DIRS:
-// CHECK:STDOUT:     {{.*}}/toolchain/install/prefix/lib/carbon/llvm/lib/clang/22/include
-// CHECK:STDOUT: CLANG_RESOURCE_DIR: {{.*}}/toolchain/install/prefix/lib/carbon/llvm/lib/clang/22
+// CHECK:STDOUT:     {{.*}}/toolchain/install/prefix/lib/carbon/llvm/lib/clang/23/include
+// CHECK:STDOUT: CLANG_RESOURCE_DIR: {{.*}}/toolchain/install/prefix/lib/carbon/llvm/lib/clang/23
 // CHECK:STDOUT: CLANG_SYSROOT: /
 // CHECK:STDOUT: CLANG_SYSROOT: /
 // CHECK:STDOUT: INSTALL_ROOT: {{.*}}/toolchain/install/prefix/lib/carbon/
 // CHECK:STDOUT: INSTALL_ROOT: {{.*}}/toolchain/install/prefix/lib/carbon/
 // CHECK:STDOUT: LLVM_BINDIR: {{.*}}/toolchain/install/prefix/lib/carbon/llvm/bin
 // CHECK:STDOUT: LLVM_BINDIR: {{.*}}/toolchain/install/prefix/lib/carbon/llvm/bin

+ 2 - 2
toolchain/lower/testdata/interop/cpp/parameters.carbon

@@ -386,11 +386,11 @@ fn PassValueExpr(y: Cpp.Y) {
 // CHECK:STDOUT:   store ptr %0, ptr %.addr, align 8, !tbaa !12
 // CHECK:STDOUT:   store ptr %0, ptr %.addr, align 8, !tbaa !12
 // CHECK:STDOUT:   %1 = load ptr, ptr %.addr, align 8, !tbaa !12
 // CHECK:STDOUT:   %1 = load ptr, ptr %.addr, align 8, !tbaa !12
 // CHECK:STDOUT:   call void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(12) %1)
 // CHECK:STDOUT:   call void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12) %agg.tmp, ptr noundef nonnull align 4 dereferenceable(12) %1)
-// CHECK:STDOUT:   call void @_Z11pass_struct1Y(ptr dead_on_return noundef %agg.tmp)
+// CHECK:STDOUT:   call void @_Z11pass_struct1Y(ptr noundef dead_on_return %agg.tmp)
 // CHECK:STDOUT:   ret void
 // CHECK:STDOUT:   ret void
 // CHECK:STDOUT: }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT:
-// CHECK:STDOUT: declare void @_Z11pass_struct1Y(ptr dead_on_return noundef) #1
+// CHECK:STDOUT: declare void @_Z11pass_struct1Y(ptr noundef dead_on_return) #1
 // CHECK:STDOUT:
 // CHECK:STDOUT:
 // CHECK:STDOUT: declare void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1
 // CHECK:STDOUT: declare void @_ZN1YC1ERKS_(ptr noundef nonnull align 4 dereferenceable(12), ptr noundef nonnull align 4 dereferenceable(12)) unnamed_addr #1
 // CHECK:STDOUT:
 // CHECK:STDOUT:

+ 1 - 1
toolchain/lower/testdata/interop/cpp/return.carbon

@@ -477,7 +477,7 @@ fn Call(x: Cpp.D) -> Cpp.C {
 // CHECK:STDOUT: }
 // CHECK:STDOUT: }
 // CHECK:STDOUT:
 // CHECK:STDOUT:
 // CHECK:STDOUT: ; Function Attrs: nounwind
 // CHECK:STDOUT: ; Function Attrs: nounwind
-// CHECK:STDOUT: declare void @_ZN1XD1Ev(ptr noundef nonnull align 8 dereferenceable(16)) unnamed_addr #3
+// CHECK:STDOUT: declare void @_ZN1XD1Ev(ptr noundef nonnull align 8 dead_on_return(16) dereferenceable(16)) unnamed_addr #3
 // CHECK:STDOUT:
 // CHECK:STDOUT:
 // CHECK:STDOUT: ; Function Attrs: nounwind
 // CHECK:STDOUT: ; Function Attrs: nounwind
 // CHECK:STDOUT: define void @_CVar.Main() #2 !dbg !26 {
 // CHECK:STDOUT: define void @_CVar.Main() #2 !dbg !26 {

+ 2 - 2
toolchain/lower/testdata/interop/cpp/virtual_base.carbon

@@ -126,9 +126,9 @@ fn AccessD(d: Cpp.D) -> i32 {
 // CHECK:STDOUT:   %this1 = load ptr, ptr %this.addr, align 8
 // CHECK:STDOUT:   %this1 = load ptr, ptr %this.addr, align 8
 // CHECK:STDOUT:   %0 = getelementptr inbounds i8, ptr %this1, i64 32
 // CHECK:STDOUT:   %0 = getelementptr inbounds i8, ptr %this1, i64 32
 // CHECK:STDOUT:   call void @_ZN1AC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0)
 // CHECK:STDOUT:   call void @_ZN1AC2Ev(ptr noundef nonnull align 4 dereferenceable(4) %0)
-// CHECK:STDOUT:   call void @_ZN1BC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %this1, ptr noundef getelementptr inbounds ([4 x ptr], ptr @_ZTT1D, i64 0, i64 1))
+// CHECK:STDOUT:   call void @_ZN1BC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %this1, ptr noundef getelementptr inbounds (ptr, ptr @_ZTT1D, i64 1))
 // CHECK:STDOUT:   %1 = getelementptr inbounds i8, ptr %this1, i64 16
 // CHECK:STDOUT:   %1 = getelementptr inbounds i8, ptr %this1, i64 16
-// CHECK:STDOUT:   call void @_ZN1CC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef getelementptr inbounds ([4 x ptr], ptr @_ZTT1D, i64 0, i64 2))
+// CHECK:STDOUT:   call void @_ZN1CC2Ev(ptr noundef nonnull align 8 dereferenceable(12) %1, ptr noundef getelementptr inbounds (ptr, ptr @_ZTT1D, i64 2))
 // CHECK:STDOUT:   store ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 0, i32 3), ptr %this1, align 8, !tbaa !15
 // CHECK:STDOUT:   store ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 0, i32 3), ptr %this1, align 8, !tbaa !15
 // CHECK:STDOUT:   %add.ptr = getelementptr inbounds i8, ptr %this1, i64 16
 // CHECK:STDOUT:   %add.ptr = getelementptr inbounds i8, ptr %this1, i64 16
 // CHECK:STDOUT:   store ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 1, i32 3), ptr %add.ptr, align 8, !tbaa !15
 // CHECK:STDOUT:   store ptr getelementptr inbounds inrange(-24, 0) ({ [3 x ptr], [3 x ptr] }, ptr @_ZTV1D, i32 0, i32 1, i32 3), ptr %add.ptr, align 8, !tbaa !15