Skip to content

Commit

Permalink
Rollup merge of rust-lang#115563 - krasimirgg:llvm-18-bitcodereader, …
Browse files Browse the repository at this point in the history
…r=nikic

llvm-wrapper: adapt for LLVM API change

No functional changes intended.

Adapts the wrapper for llvm/llvm-project@bbe8cd1.

Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/22055#018a6495-8dd9-41df-9381-5e7b0009ce0a/274-575
  • Loading branch information
matthiaskrgr authored Sep 5, 2023
2 parents 9381e5b + bdfa08a commit 6f31d00
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1202,7 +1202,11 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,

Ret->ModuleMap[module->identifier] = mem_buffer;

#if LLVM_VERSION_GE(18, 0)
if (Error Err = readModuleSummaryIndex(mem_buffer, Ret->Index)) {
#else
if (Error Err = readModuleSummaryIndex(mem_buffer, Ret->Index, i)) {
#endif
LLVMRustSetLastError(toString(std::move(Err)).c_str());
return nullptr;
}
Expand Down

0 comments on commit 6f31d00

Please sign in to comment.