@@ -58,10 +58,14 @@ pub trait ConstCodegenMethods<'tcx>:
58
58
/// Create a global constant.
59
59
///
60
60
/// The returned global variable is a pointer in the default address space for globals.
61
- fn static_addr_of_impl ( & self , cv : Self :: Value , align : Align , kind : Option < & str > )
62
- -> Self :: Value ;
61
+ fn static_addr_of_const (
62
+ & self ,
63
+ cv : Self :: Value ,
64
+ align : Align ,
65
+ kind : Option < & str > ,
66
+ ) -> Self :: Value ;
63
67
64
- /// Same as `static_addr_of_impl `, but does not mark the static as immutable
68
+ /// Same as `static_addr_of_const `, but does not mark the static as immutable
65
69
fn static_addr_of_mut ( & self , cv : Self :: Value , align : Align , kind : Option < & str > ) -> Self :: Value ;
66
70
67
71
fn scalar_to_backend ( & self , cv : Scalar , layout : abi:: Scalar , llty : Self :: Type ) -> Self :: Value {
@@ -97,7 +101,7 @@ pub trait ConstCodegenMethods<'tcx>:
97
101
let alloc = alloc. inner ( ) ;
98
102
let value = match alloc. mutability {
99
103
Mutability :: Mut => self . static_addr_of_mut ( init, alloc. align , None ) ,
100
- _ => self . static_addr_of_impl ( init, alloc. align , None ) ,
104
+ _ => self . static_addr_of_const ( init, alloc. align , None ) ,
101
105
} ;
102
106
if !self . tcx ( ) . sess . fewer_names ( )
103
107
&& self . get_value_name ( value) . is_empty ( )
@@ -124,7 +128,7 @@ pub trait ConstCodegenMethods<'tcx>:
124
128
) ) )
125
129
. unwrap_memory ( ) ;
126
130
let init = self . const_data_from_alloc ( alloc) ;
127
- let value = self . static_addr_of_impl ( init, alloc. inner ( ) . align , None ) ;
131
+ let value = self . static_addr_of_const ( init, alloc. inner ( ) . align , None ) ;
128
132
value
129
133
}
130
134
GlobalAlloc :: Static ( def_id) => {
0 commit comments