Skip to content

Commit eca274a

Browse files
committed
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.
1 parent 110777b commit eca274a

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)