[PATCH] D31140: [LLVMbugs] [Bug 18710] Only generate .ARM.exidx and .ARM.extab when needed in EHABI

Christian Bruel via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 11 07:07:08 PDT 2017


chrib updated this revision to Diff 114589.
chrib added a comment.

Hello Eli,

You were right, using IsUnwindTablesDefault is the correct way to abstract the need for UnwindTables. I missed the relationship between the driver munwind-table and GodeGenOpts.UnwindTables use in Codegen.

Here is a new patch just setting IsUnwindTablesDefault for EHABI. No Changes in the testsuite results with https://reviews.llvm.org/D31139


https://reviews.llvm.org/D31140

Files:
  lib/Driver/ToolChains/BareMetal.cpp
  lib/Driver/ToolChains/BareMetal.h


Index: lib/Driver/ToolChains/BareMetal.h
===================================================================
--- lib/Driver/ToolChains/BareMetal.h
+++ lib/Driver/ToolChains/BareMetal.h
@@ -32,6 +32,7 @@
 
 public:
   bool useIntegratedAs() const override { return true; }
+  bool IsUnwindTablesDefault(const llvm::opt::ArgList &Args) const override;
   bool isCrossCompiling() const override { return true; }
   bool isPICDefault() const override { return false; }
   bool isPIEDefault() const override { return false; }
Index: lib/Driver/ToolChains/BareMetal.cpp
===================================================================
--- lib/Driver/ToolChains/BareMetal.cpp
+++ lib/Driver/ToolChains/BareMetal.cpp
@@ -57,6 +57,10 @@
   return true;
 }
 
+bool BareMetal::IsUnwindTablesDefault(const ArgList &Args) const {
+  return getDriver().CCCIsCXX();
+}
+
 bool BareMetal::handlesTarget(const llvm::Triple &Triple) {
   return isARMBareMetal(Triple);
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31140.114589.patch
Type: text/x-patch
Size: 957 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170911/66be9cc9/attachment.bin>


More information about the cfe-commits mailing list