Remove polymorphize calls for statics in a couple more places

This commit is contained in:
bjorn3 2024-05-12 18:20:01 +02:00
parent 6db27529dd
commit 0627c63ad9
2 changed files with 2 additions and 2 deletions

View File

@ -81,7 +81,7 @@ pub(crate) fn codegen_global_asm_item(tcx: TyCtxt<'_>, global_asm: &mut String,
); );
} }
let instance = Instance::mono(tcx, def_id).polymorphize(tcx); let instance = Instance::mono(tcx, def_id);
let symbol = tcx.symbol_name(instance); let symbol = tcx.symbol_name(instance);
global_asm.push_str(symbol.name); global_asm.push_str(symbol.name);
} }

View File

@ -127,7 +127,7 @@ pub(crate) fn codegen_inline_asm_terminator<'tcx>(
} }
InlineAsmOperand::SymStatic { def_id } => { InlineAsmOperand::SymStatic { def_id } => {
assert!(fx.tcx.is_static(def_id)); assert!(fx.tcx.is_static(def_id));
let instance = Instance::mono(fx.tcx, def_id).polymorphize(fx.tcx); let instance = Instance::mono(fx.tcx, def_id);
CInlineAsmOperand::Symbol { symbol: fx.tcx.symbol_name(instance).name.to_owned() } CInlineAsmOperand::Symbol { symbol: fx.tcx.symbol_name(instance).name.to_owned() }
} }
InlineAsmOperand::Label { .. } => { InlineAsmOperand::Label { .. } => {