diff options
| author | bors <bors@rust-lang.org> | 2023-09-05 13:44:41 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-09-05 13:44:41 +0000 |
| commit | f222a2dd8f6391e6433f57a7c5f1514166edbec1 (patch) | |
| tree | 918fca2ee7c43ee94e6bfffde10134a9d3ccd50b /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | b402182d4e0b00254c1afd0620547e2ee42ae336 (diff) | |
| parent | 6f31d002441bdd77c2fab06f6e704dc30147564b (diff) | |
| download | rust-f222a2dd8f6391e6433f57a7c5f1514166edbec1.tar.gz rust-f222a2dd8f6391e6433f57a7c5f1514166edbec1.zip | |
Auto merge of #115568 - matthiaskrgr:rollup-2igo8rl, r=matthiaskrgr
Rollup of 7 pull requests Successful merges: - #113510 (Document soundness of Integer -> Pointer -> Integer conversions in `const` contexts.) - #114412 (document our assumptions about symbols provided by the libc) - #114813 (explain why we can mutate the FPU control word) - #115523 (improve `AttrTokenStream`) - #115536 (interpret: make MemPlace, Place, Operand types private to the interpreter) - #115540 (Support debuginfo for custom MIR.) - #115563 (llvm-wrapper: adapt for LLVM API change) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 6af5c24c458..8f8f1d8c04f 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -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; } |
