Skip to content

Commit

Permalink
fixed errors
Browse files Browse the repository at this point in the history
  • Loading branch information
newpavlov committed Feb 11, 2018
1 parent c97aa09 commit 7c6adb4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/librustc_trans/llvm_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ use llvm;
use rustc::session::Session;
use rustc::session::config::PrintRequest;
use libc::c_int;
use std::ffi::{CStr, CString};
use std::ffi::CString;

use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::Once;
Expand Down Expand Up @@ -118,14 +118,14 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
.iter()
.filter(|feature| {
let llvm_feature = to_llvm_feature(feature);
let ptr = CString::new(llvm_feature).as_ptr();
let ptr = CString::new(llvm_feature).unwrap().as_ptr();
unsafe { llvm::LLVMRustHasFeature(target_machine, ptr) }
})
.map(Symbol::intern).collect()
.map(|feature| Symbol::intern(feature)).collect()
}

pub fn target_feature_whitelist(sess: &Session) -> &'static [&'static str] {
let whitelist = match &*sess.target.target.arch {
match &*sess.target.target.arch {
"arm" => ARM_WHITELIST,
"aarch64" => AARCH64_WHITELIST,
"x86" | "x86_64" => X86_WHITELIST,
Expand Down

0 comments on commit 7c6adb4

Please sign in to comment.