[llvm] [AArch64][MachO]: Use enum element instead of hardcoding 0 (NFC) (PR #105870)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 11:29:40 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-binary-utilities
Author: Khem Raj (kraj)
<details>
<summary>Changes</summary>
This fixes a warning
warning: enumerated and non-enumerated type in conditional expression
---
Full diff: https://github.com/llvm/llvm-project/pull/105870.diff
1 Files Affected:
- (modified) llvm/include/llvm/BinaryFormat/MachO.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/BinaryFormat/MachO.h b/llvm/include/llvm/BinaryFormat/MachO.h
index b37651e85a6269..877580c1865bf5 100644
--- a/llvm/include/llvm/BinaryFormat/MachO.h
+++ b/llvm/include/llvm/BinaryFormat/MachO.h
@@ -1662,7 +1662,7 @@ CPU_SUBTYPE_ARM64E_WITH_PTRAUTH_VERSION(unsigned PtrAuthABIVersion,
"ptrauth abi version must fit in 4 bits");
return CPU_SUBTYPE_ARM64E | CPU_SUBTYPE_ARM64E_VERSIONED_PTRAUTH_ABI_MASK |
(PtrAuthKernelABIVersion ? CPU_SUBTYPE_ARM64E_KERNEL_PTRAUTH_ABI_MASK
- : 0) |
+ : CPU_SUBTYPE_ARM64_ALL) |
(PtrAuthABIVersion << 24);
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/105870
More information about the llvm-commits
mailing list