Dangling pointer fix
This commit is contained in:
parent
7c6adb475a
commit
c2a31dee83
1 changed files with 2 additions and 2 deletions
|
@ -118,8 +118,8 @@ pub fn target_features(sess: &Session) -> Vec<Symbol> {
|
|||
.iter()
|
||||
.filter(|feature| {
|
||||
let llvm_feature = to_llvm_feature(feature);
|
||||
let ptr = CString::new(llvm_feature).unwrap().as_ptr();
|
||||
unsafe { llvm::LLVMRustHasFeature(target_machine, ptr) }
|
||||
let cstr = CString::new(llvm_feature).unwrap();
|
||||
unsafe { llvm::LLVMRustHasFeature(target_machine, cstr.as_ptr()) }
|
||||
})
|
||||
.map(|feature| Symbol::intern(feature)).collect()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue