diff options
| author | Jubilee <workingjubilee@gmail.com> | 2024-09-18 14:32:27 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-18 14:32:27 -0700 |
| commit | d972605735c70bf98280253967c2ec727fa040dd (patch) | |
| tree | fe20b09f2640b03c1e3cffe7c746b09168998711 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 12b59e52bc03d853281435f1a6d712bb541c521b (diff) | |
| parent | 8bab39783534dbf56788c649eced2a9a7f4d5332 (diff) | |
| download | rust-d972605735c70bf98280253967c2ec727fa040dd.tar.gz rust-d972605735c70bf98280253967c2ec727fa040dd.zip | |
Rollup merge of #130487 - cuviper:min-llvm-18, r=nikic
Update the minimum external LLVM to 18 With this change, we'll have stable support for LLVM 18 and 19. For reference, the previous increase to LLVM 17 was #122649. cc `@rust-lang/wg-llvm` r? nikic
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp index e842f47f48c..4532fd8d48d 100644 --- a/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp @@ -58,17 +58,10 @@ fromRust(LLVMRustCounterMappingRegionKind Kind) { return coverage::CounterMappingRegion::GapRegion; case LLVMRustCounterMappingRegionKind::BranchRegion: return coverage::CounterMappingRegion::BranchRegion; -#if LLVM_VERSION_GE(18, 0) case LLVMRustCounterMappingRegionKind::MCDCDecisionRegion: return coverage::CounterMappingRegion::MCDCDecisionRegion; case LLVMRustCounterMappingRegionKind::MCDCBranchRegion: return coverage::CounterMappingRegion::MCDCBranchRegion; -#else - case LLVMRustCounterMappingRegionKind::MCDCDecisionRegion: - break; - case LLVMRustCounterMappingRegionKind::MCDCBranchRegion: - break; -#endif } report_fatal_error("Bad LLVMRustCounterMappingRegionKind!"); } @@ -100,7 +93,7 @@ struct LLVMRustMCDCParameters { // https://github.com/rust-lang/llvm-project/blob/66a2881a/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h#L253-L263 // and representations in 19 // https://github.com/llvm/llvm-project/blob/843cc474faefad1d639f4c44c1cf3ad7dbda76c8/llvm/include/llvm/ProfileData/Coverage/MCDCTypes.h -#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0) +#if LLVM_VERSION_LT(19, 0) static coverage::CounterMappingRegion::MCDCParameters fromRust(LLVMRustMCDCParameters Params) { auto parameter = coverage::CounterMappingRegion::MCDCParameters{}; @@ -126,7 +119,7 @@ fromRust(LLVMRustMCDCParameters Params) { } report_fatal_error("Bad LLVMRustMCDCParametersTag!"); } -#elif LLVM_VERSION_GE(19, 0) +#else static coverage::mcdc::Parameters fromRust(LLVMRustMCDCParameters Params) { switch (Params.Tag) { case LLVMRustMCDCParametersTag::None: @@ -221,7 +214,7 @@ extern "C" void LLVMRustCoverageWriteMappingToBuffer( RustMappingRegions, NumMappingRegions)) { MappingRegions.emplace_back( fromRust(Region.Count), fromRust(Region.FalseCount), -#if LLVM_VERSION_GE(18, 0) && LLVM_VERSION_LT(19, 0) +#if LLVM_VERSION_LT(19, 0) // LLVM 19 may move this argument to last. fromRust(Region.MCDCParameters), #endif |
