Skip to content

Commit 48abe3c

Browse files
committed
Use Symbol for target features in asm handling
This saves a couple of Symbol::intern calls
1 parent 0b58e52 commit 48abe3c

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/inline_asm.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ use std::fmt::Write;
66

77
use rustc_ast::ast::{InlineAsmOptions, InlineAsmTemplatePiece};
88
use rustc_middle::mir::InlineAsmOperand;
9-
use rustc_span::Symbol;
9+
use rustc_span::sym;
1010
use rustc_target::asm::*;
1111

1212
pub(crate) fn codegen_inline_asm<'tcx>(
@@ -184,7 +184,7 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
184184
let sess = self.tcx.sess;
185185
let map = allocatable_registers(
186186
self.arch,
187-
|feature| sess.target_features.contains(&Symbol::intern(feature)),
187+
|feature| sess.target_features.contains(&feature),
188188
&sess.target,
189189
);
190190
let mut allocated = FxHashMap::<_, (bool, bool)>::default();
@@ -319,9 +319,9 @@ impl<'tcx> InlineAssemblyGenerator<'_, 'tcx> {
319319
// Allocate stack slots for saving clobbered registers
320320
let abi_clobber = InlineAsmClobberAbi::parse(
321321
self.arch,
322-
|feature| self.tcx.sess.target_features.contains(&Symbol::intern(feature)),
322+
|feature| self.tcx.sess.target_features.contains(&feature),
323323
&self.tcx.sess.target,
324-
Symbol::intern("C"),
324+
sym::C,
325325
)
326326
.unwrap()
327327
.clobbered_regs();

0 commit comments

Comments
 (0)