Expected ')' at end of argument list
XAMPPRocky opened this issue · 4 comments
Another attempt at compiling Rustc generated LLVM IR. This time with a library compiled to WebAssembly.
- Library: reqwest#b0af278
- LLVM IR
Error
tools/llvm-cbe/llvm-cbe: ../../reqwest/target/wasm32-unknown-unknown/debug/deps/reqwest-b6ce881b9b35171a.ll:387:250: error: expected ')' at end of argument list
define hidden void @"_ZN103_$LT$alloc..vec..into_iter..IntoIter$LT$T$C$A$GT$$u20$as$u20$core..iter..traits..iterator..Iterator$GT$4next17h7cf6a9f1c1e5f073E"(%"std::option::Option<http::header::map::Bucket<http::HeaderValue>>"* noalias nocapture sret(%"std::option::Option<http::header::map::Bucket<http::HeaderValue>>") dereferenceable(56) %0, %"std::vec::IntoIter<http::header::map::Bucket<http::HeaderValue>>"* align 4 dereferenceable(16) %self) unnamed_addr #0 !dbg !719 {
I think LLVM-CBE just uses LLVM's facilities for reading LLVM IR, so if there's a problem reading some IR it's unlikely to be its fault. Are you perhaps using mismatched LLVM versions between Rust and LLVM-CBE?
Yep, you're right. I was trying to use CBE compiled with LLVM 10 with output from LLVM 12. I've tried building CBE with LLVM 12 but ran into other issues. #116
LLVM does provide some backwards compatibility, but it only works for consuming older versions' output with newer versions, not the other way around. (By the way, the guarantees are stronger for bitcode rather than the textual form.)
Would it be an option to use an older version of Rust?
Would it be an option to use an older version of Rust?
Definitely, you could also build the latest version with an older LLVM. That just takes a long time (hours to build rustc) so I was testing with the defaults.