File tree 1 file changed +2
-2
lines changed
compiler/rustc_codegen_llvm/src
1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -210,7 +210,7 @@ impl CodegenCx<'ll, 'tcx> {
210
210
211
211
debug ! ( "get_static: sym={} instance={:?} fn_attrs={:?}" , sym, instance, fn_attrs) ;
212
212
213
- let g = if def_id. as_local ( ) . is_some ( ) && !self . tcx . is_foreign_item ( def_id) {
213
+ let g = if def_id. is_local ( ) && !self . tcx . is_foreign_item ( def_id) {
214
214
let llty = self . layout_of ( ty) . llvm_type ( self ) ;
215
215
if let Some ( g) = self . get_declared_value ( sym) {
216
216
if self . val_ty ( g) != self . type_ptr_to ( llty) {
@@ -241,7 +241,7 @@ impl CodegenCx<'ll, 'tcx> {
241
241
llvm:: set_thread_local_mode ( g, self . tls_model ) ;
242
242
}
243
243
244
- if def_id. as_local ( ) . is_none ( ) {
244
+ if ! def_id. is_local ( ) {
245
245
let needs_dll_storage_attr = self . use_dll_storage_attrs && !self . tcx . is_foreign_item ( def_id) &&
246
246
// ThinLTO can't handle this workaround in all cases, so we don't
247
247
// emit the attrs. Instead we make them unnecessary by disallowing
You can’t perform that action at this time.
0 commit comments