[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
Thu Sep 14 00:51:15 PDT 2017
chrib updated this revision to Diff 115176.
chrib added a comment.
Update IsUnwindTablesDefault to test fno-exceptions. (see Darwin.cpp)
Add comments.
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,14 @@
return true;
}
+bool BareMetal::IsUnwindTablesDefault(const ArgList &Args) const {
+ // Unwind tables are not emitted in C or if -fno-exceptions is supplied.
+ // For C++ we cannot rely on UWTable because we still need the .exidx section
+ // even if the function does not throw.
+ return Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions,
+ getDriver().CCCIsCXX());
+}
+
bool BareMetal::handlesTarget(const llvm::Triple &Triple) {
return isARMBareMetal(Triple);
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31140.115176.patch
Type: text/x-patch
Size: 1235 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170914/62079998/attachment.bin>
More information about the cfe-commits
mailing list