[llvm-branch-commits] [cfe-branch] r311505 - Merging r311397:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Aug 22 15:27:59 PDT 2017
Author: hans
Date: Tue Aug 22 15:27:59 2017
New Revision: 311505
URL: http://llvm.org/viewvc/llvm-project?rev=311505&view=rev
Log:
Merging r311397:
------------------------------------------------------------------------
r311397 | ahatanak | 2017-08-21 15:46:46 -0700 (Mon, 21 Aug 2017) | 8 lines
[Driver][Darwin] Do not pass -munwind-table if -fno-excpetions is
supplied.
With this change, -fno-exceptions disables unwind tables unless
-funwind-tables is supplied too or the target is x86-64 (x86-64 requires
emitting unwind tables).
rdar://problem/33934446
------------------------------------------------------------------------
Modified:
cfe/branches/release_50/ (props changed)
cfe/branches/release_50/lib/Driver/ToolChains/Darwin.cpp
cfe/branches/release_50/test/Driver/clang-translation.c
Propchange: cfe/branches/release_50/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Aug 22 15:27:59 2017
@@ -1,4 +1,4 @@
/cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310672,310691-310692,310694,310700,310704,310706,310776,310804,310829,310983,311115,311182,311391,311443
+/cfe/trunk:308455,308722,308824,308897,308996,309054,309058,309112-309113,309226,309263,309327,309382-309383,309488,309503,309523,309569,309607,309633,309636,309640,309722,309752,309975,310006,310158,310191,310359,310516,310672,310691-310692,310694,310700,310704,310706,310776,310804,310829,310983,311115,311182,311391,311397,311443
/cfe/trunk/test:170344
/cfe/trunk/test/SemaTemplate:126920
Modified: cfe/branches/release_50/lib/Driver/ToolChains/Darwin.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/lib/Driver/ToolChains/Darwin.cpp?rev=311505&r1=311504&r2=311505&view=diff
==============================================================================
--- cfe/branches/release_50/lib/Driver/ToolChains/Darwin.cpp (original)
+++ cfe/branches/release_50/lib/Driver/ToolChains/Darwin.cpp Tue Aug 22 15:27:59 2017
@@ -1837,7 +1837,12 @@ Darwin::TranslateArgs(const DerivedArgLi
}
bool MachO::IsUnwindTablesDefault(const ArgList &Args) const {
- return !UseSjLjExceptions(Args);
+ // Unwind tables are not emitted if -fno-exceptions is supplied (except when
+ // targeting x86_64).
+ return getArch() == llvm::Triple::x86_64 ||
+ (!UseSjLjExceptions(Args) &&
+ Args.hasFlag(options::OPT_fexceptions, options::OPT_fno_exceptions,
+ true));
}
bool MachO::UseDwarfDebugFlags() const {
Modified: cfe/branches/release_50/test/Driver/clang-translation.c
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_50/test/Driver/clang-translation.c?rev=311505&r1=311504&r2=311505&view=diff
==============================================================================
--- cfe/branches/release_50/test/Driver/clang-translation.c (original)
+++ cfe/branches/release_50/test/Driver/clang-translation.c Tue Aug 22 15:27:59 2017
@@ -73,6 +73,10 @@
// RUN: FileCheck -check-prefix=ARM64-APPLE %s
// ARM64-APPLE: -munwind-table
+// RUN: %clang -target arm64-apple-ios10 -fno-exceptions -### -S %s -arch arm64 2>&1 | \
+// RUN: FileCheck -check-prefix=ARM64-APPLE-EXCEP %s
+// ARM64-APPLE-EXCEP-NOT: -munwind-table
+
// RUN: %clang -target armv7k-apple-watchos4.0 -### -S %s -arch armv7k 2>&1 | \
// RUN: FileCheck -check-prefix=ARMV7K-APPLE %s
// ARMV7K-APPLE: -munwind-table
More information about the llvm-branch-commits
mailing list