Skip to content

Commit d1eab51

Browse files
committed
Make clobber_abis use an FxIndexMap
It seems to be used more for lookup than iteration, so this could be a perf hit
1 parent 769cc73 commit d1eab51

File tree

1 file changed

+2
-2
lines changed
  • compiler/rustc_ast_lowering/src

1 file changed

+2
-2
lines changed

compiler/rustc_ast_lowering/src/asm.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ use super::LoweringContext;
1111

1212
use rustc_ast::ptr::P;
1313
use rustc_ast::*;
14-
use rustc_data_structures::fx::{FxHashMap, FxHashSet};
14+
use rustc_data_structures::fx::{FxHashMap, FxHashSet, FxIndexMap};
1515
use rustc_hir as hir;
1616
use rustc_hir::def::{DefKind, Res};
1717
use rustc_hir::definitions::DefPathData;
@@ -71,7 +71,7 @@ impl<'a, 'hir> LoweringContext<'a, 'hir> {
7171
.emit();
7272
}
7373

74-
let mut clobber_abis = FxHashMap::default();
74+
let mut clobber_abis = FxIndexMap::default();
7575
if let Some(asm_arch) = asm_arch {
7676
for (abi_name, abi_span) in &asm.clobber_abis {
7777
match asm::InlineAsmClobberAbi::parse(asm_arch, &self.tcx.sess.target, *abi_name) {

0 commit comments

Comments
 (0)