diff options
| author | est31 <MTest31@outlook.com> | 2022-07-30 18:53:51 +0200 |
|---|---|---|
| committer | est31 <MTest31@outlook.com> | 2022-07-30 18:53:51 +0200 |
| commit | eca274a1f92925ebcf0db0e2ff9ab03000fd6c4c (patch) | |
| tree | 4b167c07b54b7b12da83332c22885ed75af75bea /compiler/rustc_llvm/llvm-wrapper | |
| parent | 110777b60c0c02a9bb62c6ffc081dc276de81210 (diff) | |
| download | rust-eca274a1f92925ebcf0db0e2ff9ab03000fd6c4c.tar.gz rust-eca274a1f92925ebcf0db0e2ff9ab03000fd6c4c.zip | |
Also gate AllocatedPointer and AllocAlign definitions by LLVM_VERSION_GE
Fixes a warning:
warning: llvm-wrapper/RustWrapper.cpp:159:11: warning: enumeration values 'AllocatedPointer' and 'AllocAlign' not handled in switch [-Wswitch]
warning: switch (Kind) {
warning: ^
Which was fall out from 130a1df71ea73ab9d66d3cb8fc9cdb43155d514b.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h index 93f302b44e8..015c1c52bef 100644 --- a/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h +++ b/compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h @@ -87,8 +87,10 @@ enum LLVMRustAttribute { NoCfCheck = 35, ShadowCallStack = 36, AllocSize = 37, +#if LLVM_VERSION_GE(15, 0) AllocatedPointer = 38, AllocAlign = 39, +#endif }; typedef struct OpaqueRustString *RustStringRef; |
