Skip to content

Commit b9ad36c

Browse files
authored
Rollup merge of #99956 - est31:fix_llvm_wrapper_warning, r=cuviper
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 130a1df. Fixes #99955
2 parents 55258de + eca274a commit b9ad36c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h

+2
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,10 @@ enum LLVMRustAttribute {
8787
NoCfCheck = 35,
8888
ShadowCallStack = 36,
8989
AllocSize = 37,
90+
#if LLVM_VERSION_GE(15, 0)
9091
AllocatedPointer = 38,
9192
AllocAlign = 39,
93+
#endif
9294
};
9395

9496
typedef struct OpaqueRustString *RustStringRef;

0 commit comments

Comments
 (0)