Remove a couple of uses of interior mutability around statics
This commit is contained in:
@@ -67,7 +67,7 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
|
||||
}
|
||||
|
||||
#[cfg_attr(not(feature = "master"), allow(unused_mut))]
|
||||
fn codegen_static(&self, def_id: DefId) {
|
||||
fn codegen_static(&mut self, def_id: DefId) {
|
||||
let attrs = self.tcx.codegen_fn_attrs(def_id);
|
||||
|
||||
let Ok((value, alloc)) = codegen_static_initializer(self, def_id) else {
|
||||
@@ -162,11 +162,11 @@ impl<'gcc, 'tcx> StaticCodegenMethods for CodegenCx<'gcc, 'tcx> {
|
||||
}
|
||||
|
||||
/// Add a global value to a list to be stored in the `llvm.used` variable, an array of i8*.
|
||||
fn add_used_global(&self, _global: RValue<'gcc>) {
|
||||
fn add_used_global(&mut self, _global: RValue<'gcc>) {
|
||||
// TODO(antoyo)
|
||||
}
|
||||
|
||||
fn add_compiler_used_global(&self, global: RValue<'gcc>) {
|
||||
fn add_compiler_used_global(&mut self, global: RValue<'gcc>) {
|
||||
// NOTE: seems like GCC does not make the distinction between compiler.used and used.
|
||||
self.add_used_global(global);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user