summaryrefslogtreecommitdiff
path: root/lld/MachO/UnwindInfoSection.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2022-08-13 12:28:03 +0000
committerDimitry Andric <dim@FreeBSD.org>2022-08-13 12:28:03 +0000
commit677727e8296a802385345db6fa65e68223f4597a (patch)
treee8b3137703a6bf0c03c6d3b28da1eb9271bae00d /lld/MachO/UnwindInfoSection.cpp
parent08e8dd7b9db7bb4a9de26d44c1cbfd24e869c014 (diff)
Vendor import of llvm-project branch release/15.x llvmorg-15.0.0-rc2-40-gfbd2950d8d0d.vendor/llvm-project/llvmorg-15.0.0-rc2-40-gfbd2950d8d0d
Diffstat (limited to 'lld/MachO/UnwindInfoSection.cpp')
-rw-r--r--lld/MachO/UnwindInfoSection.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lld/MachO/UnwindInfoSection.cpp b/lld/MachO/UnwindInfoSection.cpp
index 322057947a3d..c3f563d5572b 100644
--- a/lld/MachO/UnwindInfoSection.cpp
+++ b/lld/MachO/UnwindInfoSection.cpp
@@ -401,8 +401,12 @@ static bool canFoldEncoding(compact_unwind_encoding_t encoding) {
// of the unwind info's unwind address, two functions that have identical
// unwind info can't be folded if it's using this encoding since both
// entries need unique addresses.
- static_assert(UNWIND_X86_64_MODE_MASK == UNWIND_X86_MODE_MASK, "");
- static_assert(UNWIND_X86_64_MODE_STACK_IND == UNWIND_X86_MODE_STACK_IND, "");
+ static_assert(static_cast<uint32_t>(UNWIND_X86_64_MODE_MASK) ==
+ static_cast<uint32_t>(UNWIND_X86_MODE_MASK),
+ "");
+ static_assert(static_cast<uint32_t>(UNWIND_X86_64_MODE_STACK_IND) ==
+ static_cast<uint32_t>(UNWIND_X86_MODE_STACK_IND),
+ "");
if ((target->cpuType == CPU_TYPE_X86_64 || target->cpuType == CPU_TYPE_X86) &&
(encoding & UNWIND_X86_64_MODE_MASK) == UNWIND_X86_64_MODE_STACK_IND) {
// FIXME: Consider passing in the two function addresses and getting