File tree 1 file changed +3
-2
lines changed
compiler/rustc_codegen_llvm/src
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -246,7 +246,8 @@ impl<'ll> CodegenCx<'ll, '_> {
246
246
247
247
#[ instrument( level = "debug" , skip( self , llty) ) ]
248
248
pub ( crate ) fn get_static_inner ( & self , def_id : DefId , llty : & ' ll Type ) -> & ' ll Value {
249
- if let Some ( & g) = self . instances . borrow ( ) . get ( & Instance :: mono ( self . tcx , def_id) ) {
249
+ let instance = Instance :: mono ( self . tcx , def_id) ;
250
+ if let Some ( & g) = self . instances . borrow ( ) . get ( & instance) {
250
251
trace ! ( "used cached value" ) ;
251
252
return g;
252
253
}
@@ -259,7 +260,7 @@ impl<'ll> CodegenCx<'ll, '_> {
259
260
statics defined in the same CGU, but did not for `{def_id:?}`"
260
261
) ;
261
262
262
- let sym = self . tcx . symbol_name ( Instance :: mono ( self . tcx , def_id ) ) . name ;
263
+ let sym = self . tcx . symbol_name ( instance ) . name ;
263
264
let fn_attrs = self . tcx . codegen_fn_attrs ( def_id) ;
264
265
265
266
debug ! ( ?sym, ?fn_attrs) ;
You can’t perform that action at this time.
0 commit comments