OSDN Git Service

ExceptionDemo: prefer headers over redeclarations
authorSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 20 Nov 2016 02:36:36 +0000 (02:36 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Sun, 20 Nov 2016 02:36:36 +0000 (02:36 +0000)
commit308b046dd42f95a07edc776ed0c629fc7fc95a38
tree3473abbbd0734c450f3199e1771234f0cf59ae51
parente58b8cc11762c734fc29d3c12437d2c320fd108d
ExceptionDemo: prefer headers over redeclarations

Rather than redeclaring the interfaces for exceptions, prefer using the
`unwind.h` header.  This is vended by at least gcc and clang, and can also be
found by an external unwinding library (e.g. libunwind).  Doing this simplifies
the example to the exception handling itself.  Minor tweaks are the result of
_Unwind_Context_t not being defined, which is just a typedef for struct
_Unwind_Context *.  NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@287478 91177308-0d34-0410-b5e6-96231b3b80d8
examples/ExceptionDemo/ExceptionDemo.cpp