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
This commit is contained in:
Noratrieb
2025-05-24 19:50:11 +02:00
parent e88e854634
commit fa2bb599bc
9 changed files with 34 additions and 37 deletions

View File

@@ -154,7 +154,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
// TODO(antoyo): set link section.
}
if attrs.flags.contains(CodegenFnAttrFlags::USED)
if attrs.flags.contains(CodegenFnAttrFlags::USED_COMPILER)
|| attrs.flags.contains(CodegenFnAttrFlags::USED_LINKER)
{
self.add_used_global(global.to_rvalue());