Author: Tim Northover Date: 2023-05-23T13:15:32+01:00 New Revision: 211055c7443e5594863ec95754e22f66e66aecc5
URL: https://github.com/llvm/llvm-project/commit/211055c7443e5594863ec95754e22f66e66aecc5 DIFF: https://github.com/llvm/llvm-project/commit/211055c7443e5594863ec95754e22f66e66aecc5.diff LOG: AArch64: emit synchronous unwind for Darwin arm64_32 platforms too. Since we're checking the triple directly, arm64_32 shows up differently and was still getting an attempt at asynchronous unwind that added lots more `__eh_frame` entries instead of the compact format. Added: Modified: clang/lib/Driver/ToolChains/Darwin.cpp clang/test/Driver/clang-translation.c Removed: ################################################################################ diff --git a/clang/lib/Driver/ToolChains/Darwin.cpp b/clang/lib/Driver/ToolChains/Darwin.cpp index e66606293821..3ab8bc8c8ec9 100644 --- a/clang/lib/Driver/ToolChains/Darwin.cpp +++ b/clang/lib/Driver/ToolChains/Darwin.cpp @@ -2941,8 +2941,10 @@ ToolChain::UnwindTableLevel MachO::getDefaultUnwindTableLevel(const ArgList &Arg (GetExceptionModel(Args) != llvm::ExceptionHandling::SjLj && Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions, true))) - return getArch() == llvm::Triple::aarch64 ? UnwindTableLevel::Synchronous - : UnwindTableLevel::Asynchronous; + return (getArch() == llvm::Triple::aarch64 || + getArch() == llvm::Triple::aarch64_32) + ? UnwindTableLevel::Synchronous + : UnwindTableLevel::Asynchronous; return UnwindTableLevel::None; } diff --git a/clang/test/Driver/clang-translation.c b/clang/test/Driver/clang-translation.c index d950d9a4de9b..4e42ab3a9e2e 100644 --- a/clang/test/Driver/clang-translation.c +++ b/clang/test/Driver/clang-translation.c @@ -81,6 +81,8 @@ // RUN: %clang -target arm64-apple-ios10 -funwind-tables -### -S %s -arch arm64 2>&1 | \ // RUN: FileCheck -check-prefix=ARM64-APPLE-UNWIND %s +// RUN: %clang -target arm64_32-apple-watchos8 -funwind-tables -### -S %s -arch arm64 2>&1 | \ +// RUN: FileCheck -check-prefix=ARM64-APPLE-UNWIND %s // ARM64-APPLE-UNWIND: -funwind-tables=1 // RUN: %clang -target arm64-apple-ios10 -### -ffreestanding -S %s -arch arm64 2>&1 | \ _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits