Integrate LLVM at llvm/llvm-project@9b8c2fae38bc
Updates LLVM usage to match
[9b8c2fae38bc](https://github.com/llvm/llvm-project/commit/9b8c2fae38bc)
PiperOrigin-RevId: 648729633
Change-Id: Ibf771f44b3b90f68773afda06b883c9ef032d5ee
diff --git a/bazel/llvm.bzl b/bazel/llvm.bzl
index 2404f73..8312583 100644
--- a/bazel/llvm.bzl
+++ b/bazel/llvm.bzl
@@ -53,7 +53,7 @@
executable = False,
)
-LLVM_COMMIT_SHA = "8598bcb9934dca16ea16d87304e00defc85d986c"
+LLVM_COMMIT_SHA = "9b8c2fae38bcff0b16d996ee002ff1e989fa23ea"
def llvm_loader_repository_dependencies():
# This *declares* the dependency, but it won't actually be *downloaded* unless it's used.
diff --git a/examples/cpp/trivial_struct/example_generated.rs b/examples/cpp/trivial_struct/example_generated.rs
index 07477df..bb4a94f 100644
--- a/examples/cpp/trivial_struct/example_generated.rs
+++ b/examples/cpp/trivial_struct/example_generated.rs
@@ -15,6 +15,10 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+///
/// Generated from: examples/cpp/trivial_struct/example.h;l=8
#[derive(Clone, Copy)]
#[repr(C)]
diff --git a/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs b/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs
index 7d2187f..657e6e5 100644
--- a/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/bitfields_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(4))]
#[__crubit::annotate(cc_type = "WithBitfields")]
diff --git a/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs b/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs
index b2a663c..d7fed71 100644
--- a/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/clang_attrs_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(64))]
#[__crubit::annotate(cc_type = "HasCustomAlignment")]
diff --git a/rs_bindings_from_cc/test/golden/definition_of_forward_declaration_rs_api.rs b/rs_bindings_from_cc/test/golden/definition_of_forward_declaration_rs_api.rs
index d5aa089..ab8dffc 100644
--- a/rs_bindings_from_cc/test/golden/definition_of_forward_declaration_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/definition_of_forward_declaration_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "ForwardDeclaredStruct")]
diff --git a/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs b/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs
index 19d2e2b..2c5c356 100644
--- a/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/escaping_keywords_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "type")]
diff --git a/rs_bindings_from_cc/test/golden/friend_functions_rs_api.rs b/rs_bindings_from_cc/test/golden/friend_functions_rs_api.rs
index d42967e..0089660 100644
--- a/rs_bindings_from_cc/test/golden/friend_functions_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/friend_functions_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "SomeClass")]
diff --git a/rs_bindings_from_cc/test/golden/item_order_rs_api.rs b/rs_bindings_from_cc/test/golden/item_order_rs_api.rs
index 46b613b..cb46abd 100644
--- a/rs_bindings_from_cc/test/golden/item_order_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/item_order_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "FirstStruct")]
diff --git a/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs b/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs
index 1fc39f3..8e65e43 100644
--- a/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/lifetimes_rs_api.rs
@@ -14,6 +14,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[inline(always)]
pub fn AddHook(__param_0: Option<extern "C" fn()>) {
unsafe { crate::detail::__rust_thunk___Z7AddHookPFvvE(__param_0) }
diff --git a/rs_bindings_from_cc/test/golden/method_qualifiers_rs_api.rs b/rs_bindings_from_cc/test/golden/method_qualifiers_rs_api.rs
index bda384a..8819415 100644
--- a/rs_bindings_from_cc/test/golden/method_qualifiers_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/method_qualifiers_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "Noninline")]
diff --git a/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs b/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs
index 0369db3..a01b4e9 100644
--- a/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/no_elided_lifetimes_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[inline(always)]
pub unsafe fn free_function(p1: *mut ::core::ffi::c_int) -> *mut ::core::ffi::c_int {
crate::detail::__rust_thunk___Z13free_functionRi(p1)
diff --git a/rs_bindings_from_cc/test/golden/operators_rs_api.rs b/rs_bindings_from_cc/test/golden/operators_rs_api.rs
index eb9afb6..db2bfa6 100644
--- a/rs_bindings_from_cc/test/golden/operators_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/operators_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(4))]
#[__crubit::annotate(cc_type = "AddableConstMember")]
diff --git a/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs b/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs
index 64dd1ef..784b38d 100644
--- a/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/polymorphic_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[::ctor::recursively_pinned(PinnedDrop)]
#[repr(C, align(8))]
#[__crubit::annotate(cc_type = "PolymorphicBase")]
diff --git a/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs b/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs
index 0cf48be..3152891 100644
--- a/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/static_methods_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(4))]
#[__crubit::annotate(cc_type = "SomeClass")]
diff --git a/rs_bindings_from_cc/test/golden/templates_rs_api.rs b/rs_bindings_from_cc/test/golden/templates_rs_api.rs
index 1e5532d..cf017d9 100644
--- a/rs_bindings_from_cc/test/golden/templates_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/templates_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "DifferentScope")]
diff --git a/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs b/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs
index 880c07a..920b504 100644
--- a/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/templates_source_order_rs_api.rs
@@ -93,6 +93,9 @@
// namespace test_namespace_bindings
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < TopLevel >")]
@@ -131,6 +134,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < test_namespace_bindings :: Inner >")]
@@ -169,6 +175,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < MyTemplate < TopLevel >>")]
@@ -210,6 +219,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < MyTemplate < test_namespace_bindings :: Inner >>")]
@@ -251,6 +263,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < bool >")]
@@ -289,6 +304,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "MyTemplate < char >")]
@@ -327,6 +345,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(8))]
#[__crubit::annotate(cc_type = "MyTemplate < double >")]
@@ -365,6 +386,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(4))]
#[__crubit::annotate(cc_type = "MyTemplate < float >")]
@@ -403,6 +427,9 @@
}
}
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C, align(4))]
#[__crubit::annotate(cc_type = "MyTemplate < int >")]
diff --git a/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs b/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs
index 9e1df5d..4ea4279 100644
--- a/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/typedefs_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "SomeStruct")]
diff --git a/rs_bindings_from_cc/test/golden/unions_rs_api.rs b/rs_bindings_from_cc/test/golden/unions_rs_api.rs
index e20a959..184eced 100644
--- a/rs_bindings_from_cc/test/golden/unions_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/unions_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "EmptyUnion")]
diff --git a/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs b/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs
index 6de87fc..723c80a 100644
--- a/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/unsupported_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[derive(Clone, Copy)]
#[repr(C)]
#[__crubit::annotate(cc_type = "TrivialCustomType")]
diff --git a/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs b/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs
index f0bc4f8..fc65368 100644
--- a/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/user_of_imported_type_rs_api.rs
@@ -15,6 +15,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[inline(always)]
pub fn UsesImportedType(mut t: trivial_type_cc::ns::Trivial) -> trivial_type_cc::ns::Trivial {
unsafe {
diff --git a/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs b/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs
index 706b8d9..c66330c 100644
--- a/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs
+++ b/rs_bindings_from_cc/test/golden/user_of_unsupported_rs_api.rs
@@ -14,6 +14,9 @@
#![allow(nonstandard_style)]
#![deny(warnings)]
+/// Part of the Crubit project, under the Apache License v2.0 with LLVM
+/// Exceptions. See /LICENSE for license information.
+/// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
#[inline(always)]
pub fn UseNontrivialCustomType(
non_trivial_custom_type: impl ::ctor::Ctor<Output = unsupported_cc::NontrivialCustomType>,