about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/back
diff options
context:
space:
mode:
authorPietro Albini <pietro@pietroalbini.org>2018-08-30 20:15:29 +0200
committerGitHub <noreply@github.com>2018-08-30 20:15:29 +0200
commitba832707cfb8dc4e3f22f18f86a00061772d5f07 (patch)
tree55d19c1b76e78a31fbbd56bc9ba4da310bd63705 /src/librustc_codegen_llvm/back
parent0c8b8e8b4232796598d36a02388e48a0c1c3a622 (diff)
parent93f3f5b1552489dbee03020505d896f01fd53852 (diff)
downloadrust-ba832707cfb8dc4e3f22f18f86a00061772d5f07.tar.gz
rust-ba832707cfb8dc4e3f22f18f86a00061772d5f07.zip
Rollup merge of #53472 - eddyb:fx-pls, r=pnkfelix
Use FxHash{Map,Set} instead of the default Hash{Map,Set} everywhere in rustc.

Most of the compiler uses the `Fx` hasher but some places ended up with the default one.
Diffstat (limited to 'src/librustc_codegen_llvm/back')
-rw-r--r--src/librustc_codegen_llvm/back/linker.rs4
-rw-r--r--src/librustc_codegen_llvm/back/rpath.rs4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/librustc_codegen_llvm/back/linker.rs b/src/librustc_codegen_llvm/back/linker.rs
index eee60b262a1..ebb229b7b6b 100644
--- a/src/librustc_codegen_llvm/back/linker.rs
+++ b/src/librustc_codegen_llvm/back/linker.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::collections::HashMap;
+use rustc_data_structures::fx::FxHashMap;
 use std::ffi::{OsStr, OsString};
 use std::fs::{self, File};
 use std::io::prelude::*;
@@ -31,7 +31,7 @@ use llvm_util;
 /// For all the linkers we support, and information they might
 /// need out of the shared crate context before we get rid of it.
 pub struct LinkerInfo {
-    exports: HashMap<CrateType, Vec<String>>,
+    exports: FxHashMap<CrateType, Vec<String>>,
 }
 
 impl LinkerInfo {
diff --git a/src/librustc_codegen_llvm/back/rpath.rs b/src/librustc_codegen_llvm/back/rpath.rs
index 2c3a143646c..aa4f7688b0f 100644
--- a/src/librustc_codegen_llvm/back/rpath.rs
+++ b/src/librustc_codegen_llvm/back/rpath.rs
@@ -8,7 +8,7 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use std::collections::HashSet;
+use rustc_data_structures::fx::FxHashSet;
 use std::env;
 use std::path::{Path, PathBuf};
 use std::fs;
@@ -172,7 +172,7 @@ fn get_install_prefix_rpath(config: &mut RPathConfig) -> String {
 }
 
 fn minimize_rpaths(rpaths: &[String]) -> Vec<String> {
-    let mut set = HashSet::new();
+    let mut set = FxHashSet::default();
     let mut minimized = Vec::new();
     for rpath in rpaths {
         if set.insert(rpath) {