diff options
| author | Krasimir Georgiev <krasimir@google.com> | 2023-08-05 10:53:34 +0000 |
|---|---|---|
| committer | Krasimir Georgiev <krasimir@google.com> | 2023-08-05 10:54:30 +0000 |
| commit | 9941db45125f03f6f2c2e491b747e66f0f133415 (patch) | |
| tree | 665dd9fe083d38ac677c02cfd6cdc2add237bfb7 /compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | |
| parent | 67626b8e89ff57269f1d67cb9bc037088c058b42 (diff) | |
| download | rust-9941db45125f03f6f2c2e491b747e66f0f133415.tar.gz rust-9941db45125f03f6f2c2e491b747e66f0f133415.zip | |
llvm-wrapper: adapt for LLVM API changes
No functional changes intended. Adapts llvm-wrapper for https://github.com/llvm/llvm-project/commit/65e57bbed06d55cab7bb64d54891d33ccb2d4159. Found by our experimental rust + llvm @ HEAD CI: https://buildkite.com/llvm-project/rust-llvm-integrate-prototype/builds/21304#0189c526-86cd-4db9-bdbc-dd0132dfc22b/197-500
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index ebf8a50ae8b..a986fa28f78 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -1120,9 +1120,15 @@ struct LLVMRustThinLTOData { // Not 100% sure what these are, but they impact what's internalized and // what's inlined across modules, I believe. +#if LLVM_VERSION_GE(17, 0) + DenseMap<StringRef, FunctionImporter::ImportMapTy> ImportLists; + DenseMap<StringRef, FunctionImporter::ExportSetTy> ExportLists; + DenseMap<StringRef, GVSummaryMapTy> ModuleToDefinedGVSummaries; +#else StringMap<FunctionImporter::ImportMapTy> ImportLists; StringMap<FunctionImporter::ExportSetTy> ExportLists; StringMap<GVSummaryMapTy> ModuleToDefinedGVSummaries; +#endif StringMap<std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>> ResolvedODR; LLVMRustThinLTOData() : Index(/* HaveGVs = */ false) {} |
