]> granicus.if.org Git - clang/commitdiff
[AArch64] [Windows] Emit unwind tables by default.
authorEli Friedman <efriedma@codeaurora.org>
Wed, 31 Oct 2018 21:39:41 +0000 (21:39 +0000)
committerEli Friedman <efriedma@codeaurora.org>
Wed, 31 Oct 2018 21:39:41 +0000 (21:39 +0000)
Unwind tables are necessary even in code that doesn't support
exceptions.  The tables are used for setjmp(), and by debuggers.

Differential Revision: https://reviews.llvm.org/D53618

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@345781 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/ToolChains/MSVC.cpp

index f60f39563fd5bcfcc905a73b1f703b4998f238cd..839f313623097ae10271a7fe2447c8585ad691b0 100644 (file)
@@ -722,15 +722,15 @@ bool MSVCToolChain::IsIntegratedAssemblerDefault() const {
 }
 
 bool MSVCToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
-  // Emit unwind tables by default on Win64. All non-x86_32 Windows platforms
-  // such as ARM and PPC actually require unwind tables, but LLVM doesn't know
-  // how to generate them yet.
-
   // Don't emit unwind tables by default for MachO targets.
   if (getTriple().isOSBinFormatMachO())
     return false;
 
-  return getArch() == llvm::Triple::x86_64;
+  // All non-x86_32 Windows targets require unwind tables. However, LLVM
+  // doesn't know how to generate them for all targets, so only enable
+  // the ones that are actually implemented.
+  return getArch() == llvm::Triple::x86_64 ||
+         getArch() == llvm::Triple::aarch64;
 }
 
 bool MSVCToolChain::isPICDefault() const {