Fix ARM EHABI when function has landingpad and nounwind.
authorLogan Chien <tzuhsiang.chien@gmail.com>
Wed, 14 May 2014 16:38:30 +0000 (16:38 +0000)
committerLogan Chien <tzuhsiang.chien@gmail.com>
Wed, 14 May 2014 16:38:30 +0000 (16:38 +0000)
commitf5864fffc37321ddee81301740c9faaf94d5e6a3
treec355b0d3d972d16ffbe54a24fb632159c38195b3
parentbb5d9acac77f97e7c93de20ffe0a2eaf6eafd4e2
Fix ARM EHABI when function has landingpad and nounwind.

If the function has the landingpad instruction, then the
handlerdata should be emitted even if the function has
nouwnind attribute.  Otherwise, following code will not
work:

    void test1() noexcept {
      try {
        throw_exception();
      } catch (...) {
        log_unexpected_exception();
      }
    }

Since the cantunwind was incorrectly emitted and the
LSDA is not available.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@208791 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/AsmPrinter/ARMException.cpp
test/CodeGen/ARM/ehabi-handlerdata-nounwind.ll [new file with mode: 0644]