Skip to content

Commit eb24873

Browse files
HEIR Teamcopybara-github
authored andcommitted
Updates LLVM usage to match [fdb39b1112a6](llvm/llvm-project@fdb39b1112a6) PiperOrigin-RevId: 967568103
1 parent 64b1147 commit eb24873

3 files changed

Lines changed: 3 additions & 83 deletions

File tree

bazel/extensions.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")
44

55
def _llvm_deps_impl(_):
66
"""Implementation of the llvm_deps module extension."""
7-
LLVM_COMMIT = "75a45c373407c13a44c7abb28a78d891a97fe665"
7+
LLVM_COMMIT = "fdb39b1112a6db0343de169b79820768bd16c7d9"
88

99
# Download LLVM/MLIR using a git repository
1010
new_git_repository(

patches/llvm.patch

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -1,69 +1,4 @@
11
Auto generated patch. Do not edit or delete it, even if empty.
2-
diff -ruN --strip-trailing-cr a/clang/lib/Sema/SemaCoroutine.cpp b/clang/lib/Sema/SemaCoroutine.cpp
3-
--- a/clang/lib/Sema/SemaCoroutine.cpp
4-
+++ b/clang/lib/Sema/SemaCoroutine.cpp
5-
@@ -1488,6 +1488,8 @@
6-
if (FoundAllocations) {
7-
IAP = FoundAllocations->IAP;
8-
OperatorNew = FoundAllocations->OperatorNew;
9-
+ } else {
10-
+ OperatorNew = nullptr;
11-
}
12-
assert(!OperatorNew || !OperatorNew->isTypeAwareOperatorNewOrDelete());
13-
};
14-
diff -ruN --strip-trailing-cr a/clang/test/SemaCXX/coroutine-new-operator.cpp b/clang/test/SemaCXX/coroutine-new-operator.cpp
15-
--- a/clang/test/SemaCXX/coroutine-new-operator.cpp
16-
+++ b/clang/test/SemaCXX/coroutine-new-operator.cpp
17-
@@ -0,0 +1,49 @@
18-
+// RUN: %clang_cc1 -std=c++20 -fcoro-aligned-allocation -fsyntax-only -verify %s
19-
+// expected-no-diagnostics
20-
+
21-
+namespace std {
22-
+ template <typename R, typename... Args>
23-
+ struct coroutine_traits {
24-
+ using promise_type = typename R::promise_type;
25-
+ };
26-
+
27-
+ template <class Promise = void> struct coroutine_handle {
28-
+ coroutine_handle() = default;
29-
+ static coroutine_handle from_address(void *) noexcept;
30-
+ };
31-
+ template <> struct coroutine_handle<void> {
32-
+ static coroutine_handle from_address(void *) noexcept;
33-
+ coroutine_handle() = default;
34-
+ template <class Promise>
35-
+ coroutine_handle(coroutine_handle<Promise>) noexcept;
36-
+ };
37-
+
38-
+ struct suspend_always {
39-
+ bool await_ready() const noexcept { return false; }
40-
+ void await_suspend(coroutine_handle<>) const noexcept {}
41-
+ void await_resume() const noexcept {}
42-
+ };
43-
+
44-
+ enum class align_val_t : decltype(sizeof(0)) {};
45-
+} // namespace std
46-
+
47-
+using size_t = decltype(sizeof(0));
48-
+
49-
+struct Task {
50-
+ struct promise_type {
51-
+ std::suspend_always initial_suspend() noexcept { return {}; }
52-
+ std::suspend_always final_suspend() noexcept { return {}; }
53-
+ void return_void() {}
54-
+ void unhandled_exception() {}
55-
+ Task get_return_object() noexcept { return {}; }
56-
+
57-
+ void* operator new(size_t n, void* buf, size_t capacity) noexcept {
58-
+ return buf;
59-
+ }
60-
+ void operator delete(void*) noexcept {}
61-
+ };
62-
+};
63-
+
64-
+Task CoGetReturnAddress(void* buf, size_t capacity) {
65-
+ co_return;
66-
+}
672
diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
683
--- a/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
694
+++ b/utils/bazel/llvm-project-overlay/libc/BUILD.bazel
@@ -83,23 +18,6 @@ diff -ruN --strip-trailing-cr a/utils/bazel/llvm-project-overlay/libc/BUILD.baze
8318
],
8419
)
8520

86-
@@ -2741,7 +2738,7 @@
87-
],
88-
"@platforms//os:macos": [
89-
"src/__support/OSUtil/darwin/syscall.h",
90-
- "src/__support/OSUtil/darwin/arm/syscall.h",
91-
+ "src/__support/OSUtil/darwin/aarch64/syscall.h",
92-
],
93-
"@platforms//os:windows": [],
94-
}),
95-
@@ -3748,6 +3745,7 @@
96-
":__support_libc_errno",
97-
":__support_macros_attributes",
98-
":__support_macros_config",
99-
+ ":__support_macros_hardening",
100-
":__support_macros_optimization",
101-
":__support_macros_properties_architectures",
102-
":__support_macros_properties_compiler",
10321
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
10422
--- a/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl
10523
+++ b/utils/bazel/llvm-project-overlay/libc/test/libc_test_rules.bzl

tools/heir-opt.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@
172172
#include "mlir/include/mlir/Dialect/Arith/Transforms/BufferDeallocationOpInterfaceImpl.h" // from @llvm-project
173173
#include "mlir/include/mlir/Dialect/Arith/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
174174
#include "mlir/include/mlir/Dialect/Bufferization/IR/Bufferization.h" // from @llvm-project
175+
#include "mlir/include/mlir/Dialect/Bufferization/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
175176
#include "mlir/include/mlir/Dialect/Bufferization/Transforms/FuncBufferizableOpInterfaceImpl.h" // from @llvm-project
176177
#include "mlir/include/mlir/Dialect/Bufferization/Transforms/Passes.h" // from @llvm-project
177178
#include "mlir/include/mlir/Dialect/ControlFlow/Transforms/BufferizableOpInterfaceImpl.h" // from @llvm-project
@@ -354,6 +355,7 @@ int main(int argc, char** argv) {
354355
bufferization::registerBufferizationPasses();
355356
mlir::arith::registerBufferizableOpInterfaceExternalModels(registry);
356357
mlir::arith::registerBufferDeallocationOpInterfaceExternalModels(registry);
358+
bufferization::registerBufferizableOpInterfaceExternalModels(registry);
357359
bufferization::func_ext::registerBufferizableOpInterfaceExternalModels(
358360
registry);
359361
cf::registerBufferizableOpInterfaceExternalModels(registry);

0 commit comments

Comments
 (0)