File tree Expand file tree Collapse file tree 3 files changed +2
-17
lines changed Expand file tree Collapse file tree 3 files changed +2
-17
lines changed Original file line number Diff line number Diff line change @@ -2,9 +2,6 @@ codegen_gcc_unknown_ctarget_feature_prefix =
2
2
unknown feature specified for `-Ctarget-feature`: `{ $feature } `
3
3
.note = features must begin with a `+` to enable or `-` to disable it
4
4
5
- codegen_gcc_invalid_minimum_alignment =
6
- invalid minimum global alignment: { $err }
7
-
8
5
codegen_gcc_forbidden_ctarget_feature =
9
6
target feature `{ $feature } ` cannot be toggled with `-Ctarget-feature`: { $reason }
10
7
Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ use rustc_span::def_id::DefId;
18
18
19
19
use crate :: base;
20
20
use crate :: context:: CodegenCx ;
21
- use crate :: errors:: InvalidMinimumAlignment ;
22
21
use crate :: type_of:: LayoutGccExt ;
23
22
24
23
fn set_global_alignment < ' gcc , ' tcx > (
@@ -29,13 +28,8 @@ fn set_global_alignment<'gcc, 'tcx>(
29
28
// The target may require greater alignment for globals than the type does.
30
29
// Note: GCC and Clang also allow `__attribute__((aligned))` on variables,
31
30
// which can force it to be smaller. Rust doesn't support this yet.
32
- if let Some ( min) = cx. sess ( ) . target . min_global_align {
33
- match Align :: from_bits ( min) {
34
- Ok ( min) => align = align. max ( min) ,
35
- Err ( err) => {
36
- cx. sess ( ) . dcx ( ) . emit_err ( InvalidMinimumAlignment { err : err. to_string ( ) } ) ;
37
- }
38
- }
31
+ if let Some ( min_global) = cx. sess ( ) . target . min_global_align {
32
+ align = Ord :: max ( align, min_global) ;
39
33
}
40
34
gv. set_alignment ( align. bytes ( ) as i32 ) ;
41
35
}
Original file line number Diff line number Diff line change @@ -47,12 +47,6 @@ pub(crate) struct UnwindingInlineAsm {
47
47
pub span : Span ,
48
48
}
49
49
50
- #[ derive( Diagnostic ) ]
51
- #[ diag( codegen_gcc_invalid_minimum_alignment) ]
52
- pub ( crate ) struct InvalidMinimumAlignment {
53
- pub err : String ,
54
- }
55
-
56
50
#[ derive( Diagnostic ) ]
57
51
#[ diag( codegen_gcc_copy_bitcode) ]
58
52
pub ( crate ) struct CopyBitcode {
You can’t perform that action at this time.
0 commit comments