File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
compiler/rustc_codegen_llvm/src Expand file tree Collapse file tree 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> {
210210
211211 debug ! ( "get_static: sym={} instance={:?} fn_attrs={:?}" , sym, instance, fn_attrs) ;
212212
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) {
214214 let llty = self . layout_of ( ty) . llvm_type ( self ) ;
215215 if let Some ( g) = self . get_declared_value ( sym) {
216216 if self . val_ty ( g) != self . type_ptr_to ( llty) {
@@ -241,7 +241,7 @@ impl CodegenCx<'ll, 'tcx> {
241241 llvm:: set_thread_local_mode ( g, self . tls_model ) ;
242242 }
243243
244- if def_id. as_local ( ) . is_none ( ) {
244+ if ! def_id. is_local ( ) {
245245 let needs_dll_storage_attr = self . use_dll_storage_attrs && !self . tcx . is_foreign_item ( def_id) &&
246246 // ThinLTO can't handle this workaround in all cases, so we don't
247247 // emit the attrs. Instead we make them unnecessary by disallowing
You can’t perform that action at this time.
0 commit comments