about summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/metadata.rs
diff options
context:
space:
mode:
authorMark Rousskov <mark.simulacrum@gmail.com>2018-08-03 15:37:15 -0600
committerMark Rousskov <mark.simulacrum@gmail.com>2018-08-09 10:00:25 -0600
commitdea13b4bc7fc51caeb950a531b9652599dba2a2e (patch)
treef9c7a3975326f635e57d44680a63e14f7f3b6cff /src/librustc_codegen_llvm/metadata.rs
parente3177c6f3f164a4ff28d246c5028123251942164 (diff)
downloadrust-dea13b4bc7fc51caeb950a531b9652599dba2a2e.tar.gz
rust-dea13b4bc7fc51caeb950a531b9652599dba2a2e.zip
Move path2cstr to rustc_fs_util
Diffstat (limited to 'src/librustc_codegen_llvm/metadata.rs')
-rw-r--r--src/librustc_codegen_llvm/metadata.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/metadata.rs b/src/librustc_codegen_llvm/metadata.rs
index fcb704413ef..a4526a53769 100644
--- a/src/librustc_codegen_llvm/metadata.rs
+++ b/src/librustc_codegen_llvm/metadata.rs
@@ -8,7 +8,6 @@
 // option. This file may not be copied, modified, or distributed
 // except according to those terms.
 
-use rustc::util::common;
 use rustc::middle::cstore::MetadataLoader;
 use rustc_target::spec::Target;
 use llvm;
@@ -19,6 +18,7 @@ use rustc_data_structures::owning_ref::OwningRef;
 use std::path::Path;
 use std::ptr;
 use std::slice;
+use rustc_fs_util::path2cstr;
 
 pub use rustc_data_structures::sync::MetadataRef;
 
@@ -57,7 +57,7 @@ impl MetadataLoader for LlvmMetadataLoader {
                           filename: &Path)
                           -> Result<MetadataRef, String> {
         unsafe {
-            let buf = common::path2cstr(filename);
+            let buf = path2cstr(filename);
             let mb = llvm::LLVMRustCreateMemoryBufferWithContentsOfFile(buf.as_ptr())
                 .ok_or_else(|| format!("error reading library: '{}'", filename.display()))?;
             let of = ObjectFile::new(mb)