Skip to content

Commit d26c5cd

Browse files
authored
Merge pull request #5 from gnzlbg/update_llvm_sys
update llvm-sys
2 parents 6b40643 + 1014b45 commit d26c5cd

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

Cargo.toml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,10 @@ libloading = "0.5"
2020
lazy_static = "1.0"
2121
failure = "0.1"
2222
libc = "0.2"
23-
24-
[dependencies.llvm-sys]
25-
version = "60"
26-
features = ["no-llvm-linking"]
23+
llvm-sys = { version = "70", features = ["no-llvm-linking"] }
2724

2825
[build-dependencies]
2926
cargo_metadata = "0.6"
3027
failure = "0.1"
3128
quote = "0.6"
32-
33-
[build-dependencies.syn]
34-
version = "0.14"
35-
features = ["full"]
29+
syn = { version = "0.15", features = ["full"] }

build.rs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,17 @@ mod llvm {
133133
Ok(llvm_lib_rs_path.parent().unwrap().into())
134134
}
135135

136-
fn extract_file_declarations(&self, path: &Path) -> Result<Vec<Declaration>, Error> {
136+
fn extract_file_declarations(&self, path: &Path)
137+
-> Result<Vec<Declaration>, Error> {
137138
let mut file = File::open(path)
138-
.map_err(|_| format_err!("Unable to open file: {}", path.to_str().unwrap()))?;
139+
.map_err(|_| format_err!("Unable to open file: {}",
140+
path.to_str().unwrap()))?;
139141

140142
let mut content = String::new();
141143
file.read_to_string(&mut content)?;
142144

143-
let ast = parse_file(&content)?;
145+
let ast = parse_file(&content)
146+
.map_err(|e| failure::err_msg(e.to_string()))?;
144147

145148
Ok(ast.items.iter().fold(vec![], |mut list, item| match item {
146149
Item::ForeignMod(ref item) if item.abi.is_c() => {

0 commit comments

Comments
 (0)