Sync from rust 873b4beb0c
This commit is contained in:
commit
66d6f559bf
2 changed files with 5 additions and 4 deletions
|
|
@ -106,6 +106,7 @@ fn codegen_global_asm_inner<'tcx>(
|
|||
match *piece {
|
||||
InlineAsmTemplatePiece::String(ref s) => global_asm.push_str(s),
|
||||
InlineAsmTemplatePiece::Placeholder { operand_idx, modifier: _, span } => {
|
||||
use rustc_codegen_ssa::back::symbol_export::escape_symbol_name;
|
||||
match operands[operand_idx] {
|
||||
GlobalAsmOperandRef::Const { ref string } => {
|
||||
global_asm.push_str(string);
|
||||
|
|
@ -121,7 +122,7 @@ fn codegen_global_asm_inner<'tcx>(
|
|||
let symbol = tcx.symbol_name(instance);
|
||||
// FIXME handle the case where the function was made private to the
|
||||
// current codegen unit
|
||||
global_asm.push_str(symbol.name);
|
||||
global_asm.push_str(&escape_symbol_name(tcx, symbol.name, span));
|
||||
}
|
||||
GlobalAsmOperandRef::SymStatic { def_id } => {
|
||||
if cfg!(not(feature = "inline_asm_sym")) {
|
||||
|
|
@ -133,7 +134,7 @@ fn codegen_global_asm_inner<'tcx>(
|
|||
|
||||
let instance = Instance::mono(tcx, def_id);
|
||||
let symbol = tcx.symbol_name(instance);
|
||||
global_asm.push_str(symbol.name);
|
||||
global_asm.push_str(&escape_symbol_name(tcx, symbol.name, span));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@
|
|||
// Note: please avoid adding other feature gates where possible
|
||||
#![feature(rustc_private)]
|
||||
// Only used to define intrinsics in `compiler_builtins.rs`.
|
||||
#![feature(f16)]
|
||||
#![feature(f128)]
|
||||
#![cfg_attr(feature = "jit", feature(f16))]
|
||||
#![cfg_attr(feature = "jit", feature(f128))]
|
||||
// Note: please avoid adding other feature gates where possible
|
||||
#![warn(rust_2018_idioms)]
|
||||
#![warn(unreachable_pub)]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue