about summary refs log tree commit diff
path: root/compiler/rustc_codegen_llvm
diff options
context:
space:
mode:
authorGuillaume Gomez <guillaume1.gomez@gmail.com>2025-05-24 21:23:50 +0200
committerGitHub <noreply@github.com>2025-05-24 21:23:50 +0200
commit7cd749deff558e95202b336c0744f625e725fd41 (patch)
tree59539970392afa45081e1ffd63eb557eb5f76980 /compiler/rustc_codegen_llvm
parent76ca0e2d627863e6552d6b1a111036e48034d30d (diff)
parentfa2bb599bcf36b5390d5c8156cba6bc980ddbfca (diff)
downloadrust-7cd749deff558e95202b336c0744f625e725fd41.tar.gz
rust-7cd749deff558e95202b336c0744f625e725fd41.zip
Rollup merge of #141511 - Noratrieb:codegen-fn-attrs, r=compiler-errors
Cleanup CodegenFnAttrFlags

- Rename `USED` to `USED_COMPILER` to better reflect its behavior.
- Reorder some items to group the used and allocator flags together
- Renumber them without gaps
Diffstat (limited to 'compiler/rustc_codegen_llvm')
-rw-r--r--compiler/rustc_codegen_llvm/src/consts.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_codegen_llvm/src/consts.rs b/compiler/rustc_codegen_llvm/src/consts.rs
index bf81eb648f8..fe2f2027327 100644
--- a/compiler/rustc_codegen_llvm/src/consts.rs
+++ b/compiler/rustc_codegen_llvm/src/consts.rs
@@ -527,7 +527,7 @@ impl<'ll> CodegenCx<'ll, '_> {
 
             base::set_variable_sanitizer_attrs(g, attrs);
 
-            if attrs.flags.contains(CodegenFnAttrFlags::USED) {
+            if attrs.flags.contains(CodegenFnAttrFlags::USED_COMPILER) {
                 // `USED` and `USED_LINKER` can't be used together.
                 assert!(!attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER));
 
@@ -551,7 +551,7 @@ impl<'ll> CodegenCx<'ll, '_> {
             }
             if attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER) {
                 // `USED` and `USED_LINKER` can't be used together.
-                assert!(!attrs.flags.contains(CodegenFnAttrFlags::USED));
+                assert!(!attrs.flags.contains(CodegenFnAttrFlags::USED_COMPILER));
 
                 self.add_used_global(g);
             }