[llvm] [AArch64][MachO]: Use enum element instead of hardcoding 0 (NFC) (PR #105870)
Khem Raj via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 23 11:29:07 PDT 2024
https://github.com/kraj created https://github.com/llvm/llvm-project/pull/105870
This fixes a warning
warning: enumerated and non-enumerated type in conditional expression
>From 43de5e474db682c4120e5c651953b3db197238e1 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem at gmail.com>
Date: Fri, 23 Aug 2024 11:24:30 -0700
Subject: [PATCH] [AArch64][MachO]: Use enum element instead of hardcoding 0
(NFC)
This fixes a warning
warning: enumerated and non-enumerated type in conditional expression
Signed-off-by: Khem Raj <raj.khem at gmail.com>
---
llvm/include/llvm/BinaryFormat/MachO.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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);
}
More information about the llvm-commits
mailing list