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); }
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); }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits