Skip to content

Commit

Permalink
llvm-wrapper: adapt for LLVM API change
Browse files Browse the repository at this point in the history
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
krasimirgg committed Sep 5, 2023
1 parent 15e52b0 commit bdfa08a
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 bdfa08a

Please sign in to comment.