diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2022-01-10 15:32:45 +0100 | 
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2022-01-17 18:06:27 +0100 | 
| commit | 991cbd15034798e86de6823800b13c87fb3e904c (patch) | |
| tree | cb22ef0a82dd1e9fa93bf9579ff1f49ddd4312b3 /compiler/rustc_codegen_gcc/src/asm.rs | |
| parent | a34c0797528172ede89480e3033f7a5e71ea4735 (diff) | |
| download | rust-991cbd15034798e86de6823800b13c87fb3e904c.tar.gz rust-991cbd15034798e86de6823800b13c87fb3e904c.zip | |
Use Symbol for target features in asm handling
This saves a couple of Symbol::intern calls
Diffstat (limited to 'compiler/rustc_codegen_gcc/src/asm.rs')
| -rw-r--r-- | compiler/rustc_codegen_gcc/src/asm.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/compiler/rustc_codegen_gcc/src/asm.rs b/compiler/rustc_codegen_gcc/src/asm.rs index d620b24e067..b4213da6e05 100644 --- a/compiler/rustc_codegen_gcc/src/asm.rs +++ b/compiler/rustc_codegen_gcc/src/asm.rs @@ -5,7 +5,7 @@ use rustc_codegen_ssa::mir::place::PlaceRef; use rustc_codegen_ssa::traits::{AsmBuilderMethods, AsmMethods, BaseTypeMethods, BuilderMethods, GlobalAsmOperandRef, InlineAsmOperandRef}; use rustc_middle::{bug, ty::Instance}; -use rustc_span::{Span, Symbol}; +use rustc_span::Span; use rustc_target::asm::*; use std::borrow::Cow; @@ -172,7 +172,7 @@ impl<'a, 'gcc, 'tcx> AsmBuilderMethods<'tcx> for Builder<'a, 'gcc, 'tcx> { let is_target_supported = reg.reg_class().supported_types(asm_arch).iter() .any(|&(_, feature)| { if let Some(feature) = feature { - self.tcx.sess.target_features.contains(&Symbol::intern(feature)) + self.tcx.sess.target_features.contains(&feature) } else { true // Register class is unconditionally supported } | 
