@@ -14,14 +14,14 @@ use rustc_codegen_ssa::traits::*;
1414use rustc_codegen_ssa:: { looks_like_rust_object_file, ModuleCodegen , ModuleKind } ;
1515use rustc_data_structures:: fx:: FxHashMap ;
1616use rustc_data_structures:: memmap:: Mmap ;
17- use rustc_data_structures:: unord:: UnordMap ;
1817use rustc_errors:: { DiagCtxt , FatalError } ;
1918use rustc_hir:: def_id:: LOCAL_CRATE ;
2019use rustc_middle:: bug;
2120use rustc_middle:: dep_graph:: WorkProduct ;
2221use rustc_middle:: middle:: exported_symbols:: { SymbolExportInfo , SymbolExportLevel } ;
2322use rustc_session:: config:: { self , CrateType , Lto } ;
2423
24+ use std:: collections:: BTreeMap ;
2525use std:: ffi:: { CStr , CString } ;
2626use std:: fs:: File ;
2727use std:: io;
@@ -788,7 +788,7 @@ pub unsafe fn optimize_thin_module(
788788#[ derive( Debug , Default ) ]
789789pub struct ThinLTOKeysMap {
790790 // key = llvm name of importing module, value = LLVM cache key
791- keys : UnordMap < String , String > ,
791+ keys : BTreeMap < String , String > ,
792792}
793793
794794impl ThinLTOKeysMap {
@@ -798,15 +798,15 @@ impl ThinLTOKeysMap {
798798 let mut writer = io:: BufWriter :: new ( file) ;
799799 // The entries are loaded back into a hash map in `load_from_file()`, so
800800 // 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 {
802802 writeln ! ( writer, "{module} {key}" ) ?;
803803 }
804804 Ok ( ( ) )
805805 }
806806
807807 fn load_from_file ( path : & Path ) -> io:: Result < Self > {
808808 use std:: io:: BufRead ;
809- let mut keys = UnordMap :: default ( ) ;
809+ let mut keys = BTreeMap :: default ( ) ;
810810 let file = File :: open ( path) ?;
811811 for line in io:: BufReader :: new ( file) . lines ( ) {
812812 let line = line?;
0 commit comments