@@ -14,14 +14,14 @@ use rustc_codegen_ssa::traits::*;
14
14
use rustc_codegen_ssa:: { looks_like_rust_object_file, ModuleCodegen , ModuleKind } ;
15
15
use rustc_data_structures:: fx:: FxHashMap ;
16
16
use rustc_data_structures:: memmap:: Mmap ;
17
- use rustc_data_structures:: unord:: UnordMap ;
18
17
use rustc_errors:: { DiagCtxt , FatalError } ;
19
18
use rustc_hir:: def_id:: LOCAL_CRATE ;
20
19
use rustc_middle:: bug;
21
20
use rustc_middle:: dep_graph:: WorkProduct ;
22
21
use rustc_middle:: middle:: exported_symbols:: { SymbolExportInfo , SymbolExportLevel } ;
23
22
use rustc_session:: config:: { self , CrateType , Lto } ;
24
23
24
+ use std:: collections:: BTreeMap ;
25
25
use std:: ffi:: { CStr , CString } ;
26
26
use std:: fs:: File ;
27
27
use std:: io;
@@ -788,7 +788,7 @@ pub unsafe fn optimize_thin_module(
788
788
#[ derive( Debug , Default ) ]
789
789
pub struct ThinLTOKeysMap {
790
790
// key = llvm name of importing module, value = LLVM cache key
791
- keys : UnordMap < String , String > ,
791
+ keys : BTreeMap < String , String > ,
792
792
}
793
793
794
794
impl ThinLTOKeysMap {
@@ -798,15 +798,15 @@ impl ThinLTOKeysMap {
798
798
let mut writer = io:: BufWriter :: new ( file) ;
799
799
// The entries are loaded back into a hash map in `load_from_file()`, so
800
800
// the order in which we write them to file here does not matter.
801
- for ( module, key) in self . keys . items ( ) . into_sorted_stable_ord ( ) {
801
+ for ( module, key) in & self . keys {
802
802
writeln ! ( writer, "{module} {key}" ) ?;
803
803
}
804
804
Ok ( ( ) )
805
805
}
806
806
807
807
fn load_from_file ( path : & Path ) -> io:: Result < Self > {
808
808
use std:: io:: BufRead ;
809
- let mut keys = UnordMap :: default ( ) ;
809
+ let mut keys = BTreeMap :: default ( ) ;
810
810
let file = File :: open ( path) ?;
811
811
for line in io:: BufReader :: new ( file) . lines ( ) {
812
812
let line = line?;
0 commit comments