Remove a couple of uses of interior mutability around statics
This commit is contained in:
parent
a4cb1c72c5
commit
0fd257d66c
8 changed files with 33 additions and 28 deletions
|
|
@ -115,14 +115,11 @@ pub(crate) fn compile_codegen_unit(
|
|||
}
|
||||
|
||||
// Create the llvm.used and llvm.compiler.used variables.
|
||||
if !cx.used_statics.borrow().is_empty() {
|
||||
cx.create_used_variable_impl(c"llvm.used", &*cx.used_statics.borrow());
|
||||
if !cx.used_statics.is_empty() {
|
||||
cx.create_used_variable_impl(c"llvm.used", &cx.used_statics);
|
||||
}
|
||||
if !cx.compiler_used_statics.borrow().is_empty() {
|
||||
cx.create_used_variable_impl(
|
||||
c"llvm.compiler.used",
|
||||
&*cx.compiler_used_statics.borrow(),
|
||||
);
|
||||
if !cx.compiler_used_statics.is_empty() {
|
||||
cx.create_used_variable_impl(c"llvm.compiler.used", &cx.compiler_used_statics);
|
||||
}
|
||||
|
||||
// Run replace-all-uses-with for statics that need it. This must
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue