diff --git a/third_party/llvm/generated.patch b/third_party/llvm/generated.patch index 754aff41..036bfa70 100644 --- a/third_party/llvm/generated.patch +++ b/third_party/llvm/generated.patch @@ -1,24 +1,125 @@ Auto generated patch. Do not edit or delete it, even if empty. -diff -ruN --strip-trailing-cr a/llvm/lib/CodeGen/Rematerializer.cpp b/llvm/lib/CodeGen/Rematerializer.cpp ---- a/llvm/lib/CodeGen/Rematerializer.cpp -+++ b/llvm/lib/CodeGen/Rematerializer.cpp -@@ -240,6 +240,8 @@ - return true; - const LiveInterval &LI = LIS.getInterval(Reg); - const VNInfo *DefVN = LI.getVNInfoAt(RefSlot); -+ if (!DefVN) -+ return false; - for (SlotIndex Use : Uses) { - if (!isIdenticalAtUse(*DefVN, Mask, Use, LI)) - return false; -diff -ruN --strip-trailing-cr a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp ---- a/mlir/lib/ExecutionEngine/CRunnerUtils.cpp -+++ b/mlir/lib/ExecutionEngine/CRunnerUtils.cpp -@@ -29,6 +29,7 @@ +diff -ruN --strip-trailing-cr a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp +--- a/clang/lib/Sema/SemaCoroutine.cpp ++++ b/clang/lib/Sema/SemaCoroutine.cpp +@@ -1488,6 +1488,8 @@ + if (FoundAllocations) { + IAP = FoundAllocations->IAP; + OperatorNew = FoundAllocations->OperatorNew; ++ } else { ++ OperatorNew = nullptr; + } + assert(!OperatorNew || !OperatorNew->isTypeAwareOperatorNewOrDelete()); + }; +diff -ruN --strip-trailing-cr a/clang/test/SemaCXX/coroutine-new-operator.cpp b/clang/test/SemaCXX/coroutine-new-operator.cpp +--- a/clang/test/SemaCXX/coroutine-new-operator.cpp ++++ b/clang/test/SemaCXX/coroutine-new-operator.cpp +@@ -0,0 +1,49 @@ ++// RUN: %clang_cc1 -std=c++20 -fcoro-aligned-allocation -fsyntax-only -verify %s ++// expected-no-diagnostics ++ ++namespace std { ++ template ++ struct coroutine_traits { ++ using promise_type = typename R::promise_type; ++ }; ++ ++ template struct coroutine_handle { ++ coroutine_handle() = default; ++ static coroutine_handle from_address(void *) noexcept; ++ }; ++ template <> struct coroutine_handle { ++ static coroutine_handle from_address(void *) noexcept; ++ coroutine_handle() = default; ++ template ++ coroutine_handle(coroutine_handle) noexcept; ++ }; ++ ++ struct suspend_always { ++ bool await_ready() const noexcept { return false; } ++ void await_suspend(coroutine_handle<>) const noexcept {} ++ void await_resume() const noexcept {} ++ }; ++ ++ enum class align_val_t : decltype(sizeof(0)) {}; ++} // namespace std ++ ++using size_t = decltype(sizeof(0)); ++ ++struct Task { ++ struct promise_type { ++ std::suspend_always initial_suspend() noexcept { return {}; } ++ std::suspend_always final_suspend() noexcept { return {}; } ++ void return_void() {} ++ void unhandled_exception() {} ++ Task get_return_object() noexcept { return {}; } ++ ++ void* operator new(size_t n, void* buf, size_t capacity) noexcept { ++ return buf; ++ } ++ void operator delete(void*) noexcept {} ++ }; ++}; ++ ++Task CoGetReturnAddress(void* buf, size_t capacity) { ++ co_return; ++} +diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel ++++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel +@@ -1467,15 +1467,12 @@ + name = "__support_libc_assert", + hdrs = ["src/__support/libc_assert.h"], + deps = [ +- ":__support_integer_to_string", + ":__support_macros_attributes", + ":__support_macros_config", + ":__support_macros_hardening", + ":__support_macros_macro_utils", + ":__support_macros_optimization", + ":__support_macros_properties_os", +- ":__support_osutil_exit_hdrs", +- ":__support_osutil_io", + ], + ) + +@@ -2741,7 +2738,7 @@ + ], + "@platforms//os:macos": [ + "src/__support/OSUtil/darwin/syscall.h", +- "src/__support/OSUtil/darwin/arm/syscall.h", ++ "src/__support/OSUtil/darwin/aarch64/syscall.h", + ], + "@platforms//os:windows": [], + }), +@@ -3748,6 +3745,7 @@ + ":__support_libc_errno", + ":__support_macros_attributes", + ":__support_macros_config", ++ ":__support_macros_hardening", + ":__support_macros_optimization", + ":__support_macros_properties_architectures", + ":__support_macros_properties_compiler", +diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl +--- a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl ++++ b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl +@@ -61,14 +61,19 @@ + else: + deps = deps + ["//libc/test/UnitTest:LibcUnitTest"] + ++ tags = kwargs.pop("tags", []) + if full_build: + copts = copts + _FULL_BUILD_COPTS ++ ++ # Temporarily disable full_build tests (currently broken) to unblock CI. ++ tags = tags + ["manual", "notap"] + cc_test( + name = name, + local_defines = local_defines + _TEST_DEFINES + LIBC_CONFIGURE_OPTIONS, + deps = deps, + copts = copts + libc_common_copts(), + linkstatic = 1, ++ tags = tags, + **kwargs + ) - #include - #include -+#include - #include - #include - #include diff --git a/third_party/llvm/workspace.bzl b/third_party/llvm/workspace.bzl index 9a1b0cbf..b9d58730 100644 --- a/third_party/llvm/workspace.bzl +++ b/third_party/llvm/workspace.bzl @@ -19,8 +19,8 @@ load("//third_party:repo.bzl", "tf_http_archive") def repo(name): """Imports LLVM.""" - LLVM_COMMIT = "a6b0af7536ef0ae8383ec729c5fbf23c73243776" - LLVM_SHA256 = "dfd250ff52da324d2e93dcded5e00676653e319982fff4f3789c1df3db88316c" + LLVM_COMMIT = "75a45c373407c13a44c7abb28a78d891a97fe665" + LLVM_SHA256 = "1a7b53d215bd4203fdea1b6b2edeb383507db59bf16a014972d7be86953d7ba6" tf_http_archive( name = name,