Skip to content

Commit

Permalink
Rollup merge of #99956 - est31:fix_llvm_wrapper_warning, r=cuviper
Browse files Browse the repository at this point in the history
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
  • Loading branch information
matthiaskrgr committed Jul 30, 2022
2 parents 55258de + eca274a commit b9ad36c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/LLVMWrapper.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit b9ad36c

Please sign in to comment.