File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
rustc_symbol_mangling/src Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -122,7 +122,7 @@ impl<'tcx> MonoItem<'tcx> {
122122 MonoItem :: Fn ( instance) => tcx. symbol_name ( instance) ,
123123 MonoItem :: Static ( def_id) => tcx. symbol_name ( Instance :: mono ( tcx, def_id) ) ,
124124 MonoItem :: GlobalAsm ( item_id) => {
125- SymbolName :: new ( tcx, & format ! ( "global_asm_{:?}" , item_id. owner_id) )
125+ tcx . symbol_name ( Instance :: mono ( tcx, item_id. owner_id . to_def_id ( ) ) )
126126 }
127127 }
128128 }
Original file line number Diff line number Diff line change @@ -36,6 +36,11 @@ pub(super) fn mangle<'tcx>(
3636 debug ! ( ?instance_ty) ;
3737 break ;
3838 }
39+ DefPathData :: GlobalAsm => {
40+ // `global_asm!` doesn't have a type.
41+ instance_ty = tcx. types . unit ;
42+ break ;
43+ }
3944 _ => {
4045 // if we're making a symbol for something, there ought
4146 // to be a value or type-def or something in there
You can’t perform that action at this time.
0 commit comments