]> granicus.if.org Git - clang/commit
Merging r310006:
authorHans Wennborg <hans@hanshq.net>
Fri, 11 Aug 2017 01:47:32 +0000 (01:47 +0000)
committerHans Wennborg <hans@hanshq.net>
Fri, 11 Aug 2017 01:47:32 +0000 (01:47 +0000)
commit4af01079ce2f2d2528d72b8ce5be018f68ea7d73
tree8187be79ab2ef4533f8c88d43649470b97ba7ed6
parent13722d89229f5766535e66bdb82fd876f8ac1c2c
Merging r310006:
------------------------------------------------------------------------
r310006 | ahatanak | 2017-08-03 16:55:42 -0700 (Thu, 03 Aug 2017) | 22 lines

[Driver][Darwin] Pass -munwind-table when !UseSjLjExceptions.

This commit fixes a bug where clang/llvm doesn't emit an unwind table
for a function when it is marked noexcept. Without this patch, the
following code terminates with an uncaught exception on ARM64:

int foo1() noexcept {
  try {
    throw 0;
  } catch (int i) {
    return 0;
  }
  return 1;
}

int main() {
  return foo1();
}

rdar://problem/32411865

Differential Revision: https://reviews.llvm.org/D35693
------------------------------------------------------------------------

git-svn-id: https://llvm.org/svn/llvm-project/cfe/branches/release_50@310677 91177308-0d34-0410-b5e6-96231b3b80d8
15 files changed:
include/clang/Driver/ToolChain.h
lib/Driver/ToolChain.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Driver/ToolChains/CrossWindows.cpp
lib/Driver/ToolChains/CrossWindows.h
lib/Driver/ToolChains/Darwin.cpp
lib/Driver/ToolChains/Darwin.h
lib/Driver/ToolChains/Gnu.cpp
lib/Driver/ToolChains/Gnu.h
lib/Driver/ToolChains/MSVC.cpp
lib/Driver/ToolChains/MSVC.h
lib/Driver/ToolChains/MinGW.cpp
lib/Driver/ToolChains/MinGW.h
lib/Driver/ToolChains/NetBSD.h
test/Driver/clang-translation.c