r345781 - [AArch64] [Windows] Emit unwind tables by default.

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 31 14:39:41 PDT 2018


Author: efriedma
Date: Wed Oct 31 14:39:41 2018
New Revision: 345781

URL: http://llvm.org/viewvc/llvm-project?rev=345781&view=rev
Log:
[AArch64] [Windows] Emit unwind tables by default.

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


Modified:
    cfe/trunk/lib/Driver/ToolChains/MSVC.cpp

Modified: cfe/trunk/lib/Driver/ToolChains/MSVC.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/ToolChains/MSVC.cpp?rev=345781&r1=345780&r2=345781&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/ToolChains/MSVC.cpp (original)
+++ cfe/trunk/lib/Driver/ToolChains/MSVC.cpp Wed Oct 31 14:39:41 2018
@@ -722,15 +722,15 @@ bool MSVCToolChain::IsIntegratedAssemble
 }
 
 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 {




More information about the cfe-commits mailing list