llvm-wrapper: adapt for LLVM API change

No functional changes intended.

Adapts the wrapper for bbe8cd1333.

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
This commit is contained in:
Krasimir Georgiev 2023-09-05 10:04:25 +00:00
parent 15e52b05ca
commit bdfa08a345

View File

@ -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;
}