1503 Commits

Author SHA1 Message Date
Kirill Stoimenov
20f3dc8f8b [HWASAN] Remove RUN statements, which have to effect on the test 2023-03-16 21:54:22 +00:00
Kirill Stoimenov
603cdb51a0 [HWASAN] Disable leak checking for forced_unwind2.pass.cpp 2023-03-16 18:02:36 +00:00
Kirill Stoimenov
e0df9431d7 [HWASAN] Disable leak checking for test_vector2.pass.cpp 2023-03-16 17:38:50 +00:00
Nikolas Klauser
0a4aa8a122 [libc++] Granularize <type_traits> includes
Reviewed By: ldionne, #libc, #libc_abi

Spies: #libc_vendors, smeenai, libcxx-commits

Differential Revision: https://reviews.llvm.org/D145320
2023-03-08 22:05:04 +01:00
Nikolas Klauser
e65cd4ce83 [libc++] Enable -Wunused-template
Clang wants to enable this flag by default, but libc++ isn't working with it yet.

Reviewed By: Mordante, #libc, #libc_abi, EricWF

Spies: libcxx-commits, arichardson

Differential Revision: https://reviews.llvm.org/D144667
2023-03-08 19:26:49 +01:00
Mark de Wever
92523a35a8 Revert "[CMake] Bumps minimum version to 3.20.0."
Some build bots have not been updated to the new minimal CMake version.
Reverting for now and ping the buildbot owners.

This reverts commit 44c6b905f8527635e49bb3ea97dea315f92d38ec.
2023-03-04 18:28:13 +01:00
Mark de Wever
44c6b905f8 [CMake] Bumps minimum version to 3.20.0.
This partly undoes D137724.

This change has been discussed on discourse
https://discourse.llvm.org/t/rfc-upgrading-llvms-minimum-required-cmake-version/66193

Note this does not remove work-arounds for older CMake versions, that
will be done in followup patches.

Reviewed By: mehdi_amini, MaskRay, ChuanqiXu, to268, thieta, tschuett, phosek, #libunwind, #libc_vendors, #libc, #libc_abi, sivachandra, philnik, zibi

Differential Revision: https://reviews.llvm.org/D144509
2023-03-04 12:40:57 +01:00
Zibi Sarbinowski
be4aca6475 [z/OS][NFC] Remove obsolete code.
Remoce obsolete code from libcxxabi/CMakeLists.txt

Reviewed By: #libc_abi, abhina.sreeskantharajan, phosek

Differential Revision: https://reviews.llvm.org/D144573
2023-02-24 15:04:38 -06:00
Nikolas Klauser
e8cb3559ee [libc++] Move constexpr <cstring> functions into their own headers and remove unused <cstring> includes
Reviewed By: ldionne, Mordante, #libc, #libc_abi

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D143329
2023-02-21 16:56:29 +01:00
Nikolas Klauser
d0e95fec65 [runtimes] Remove add_target_flags* functions and use add_flags* instead
Reviewed By: phosek, #libunwind, #libc, #libc_abi

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D144398
2023-02-21 13:16:44 +01:00
Nikolas Klauser
0af67d167d [runtimes] Move common functions from Handle{Libcxx,Libcxxabi,Libunwind}Flags.cmake to runtimes/cmake/Modules/HandleFlags.cmake
Reviewed By: phosek, #libunwind, #libc, #libc_abi

Spies: arichardson, libcxx-commits

Differential Revision: https://reviews.llvm.org/D144395
2023-02-21 13:15:25 +01:00
Nemanja Ivanovic
372820bf57 [libunwind][PowerPC] Fix saving/restoring VSX registers on LE systems
Currently, libunwind just uses stxvd2x/lxvd2x to save/restore
VSX registers respectively. This puts the registers in
doubleword-reversed order into memory on little endian systems.
If both the save and restore are done the same way, this
isn't a problem. However if the unwinder is just restoring
a callee-saved register, it will restore it in the wrong
order (since function prologues save them in the correct order).
This patch adds the necessary swaps before the saves and after
the restores.

Differential revision: https://reviews.llvm.org/D137599
2023-02-16 13:37:58 -05:00
Xing Xue
b413b84a70 [libc++abi][AIX] Skip non-C++ EH aware frames when retrieving exception object
Summary:
The personality routine for the legacy AIX xlclang++ compiler uses the stack slot reserved for compilers to pass the exception object to the landing pad. The landing pad retrieves the exception object with a call to the runtime function __xlc_exception_handle(). The current implementation incorrectly assumes that __xlc_exception_handle() should go up one stack frame to get to the stack frame of the caller of __xlc_exception_handle(), which is supposedly the stack frame of the function containing the landing pad. However, this does not always work, e.g., the xlclang++ compiler sometimes generates a wrapper of __xlc_exception_handle() and calls the wrapper from the landing pad for optimization purposes. This patch changes the implementation to unwind the stack from __xlc_exception_handle() and skip frames not associated with functions that are C++ EH-aware until a frame associated with a C++ EH-aware function is found and then retrieving the exception object with the expectation that the located frame is the one that the personality routine installed as it transferred control to the landing pad.

Reviewed by: cebowleratibm, hubert.reinterpretcast, daltenty

Differential Revision: https://reviews.llvm.org/D143010
2023-02-15 11:14:52 -05:00
Louis Dionne
cafb1c1cb2 [runtimes] Remove duplicate imports of libcxx.test.config 2023-02-14 17:28:22 -05:00
Louis Dionne
33d0d1e36f [runtimes] Rename newconfig.py to config.py -- it's not new anymore
Differential Revision: https://reviews.llvm.org/D144031
2023-02-14 17:21:34 -05:00
Louis Dionne
36080434a8 [libc++] Move the definition of aligned allocation helpers outside of <new>
They are not needed in <new> -- in fact they are only needed in .cpp files.
Getting those out of the way makes the headers smaller and also makes it
easier to use the library on platforms where aligned allocation is not
available.

Differential Revision: https://reviews.llvm.org/D139231
2023-01-26 14:41:13 -05:00
Ed Maste
7ec6c62905 [libc++] Add FreeBSD XFAILs in preparation for CI
This at least allows us to stand up libc++ FreeBSD CI and avoid future
regressions.  The failures do need to be addressed, and can be done
iteratively.

Reviewed By: philnik, Mordante

Differential Revision: https://reviews.llvm.org/D141542
2023-01-20 16:49:30 -05:00
Nikolas Klauser
947dfc95ca [libc++] Granularize <type_traits> includes in <utility>
Reviewed By: Mordante, #libc

Spies: libcxx-commits

Differential Revision: https://reviews.llvm.org/D140426
2022-12-22 23:17:47 +01:00
Paul Robinson
c0f17a5ee8 [libcxxabi] Use 'target=' consistently 2022-12-21 05:22:10 -08:00
Ryan Prichard
f8c2b0d249 [libc++][Android] Include cstdlib to define __BIONIC__
__ANDROID__ is a built-in compiler macro, but __BIONIC__ is defined by
the libc header.

Reviewed By: #libc_abi, compnerd

Differential Revision: https://reviews.llvm.org/D137128
2022-12-09 15:16:20 -08:00
Weining Lu
ecd0337854 [demangler][LoongArch] Correct the mangled_size for long double
The size of long double in LoongArch (both LA32 and LA64) is 16 bytes, thus
the mangled_size should be 32.

This is same as RISCV's change in D126480.

Reviewed By: xen0n

Differential Revision: https://reviews.llvm.org/D138981
2022-12-08 10:21:20 +08:00
Leonard Chan
96d63993dd Revert "[CMake] Use LLVM_TARGET_TRIPLE in runtimes"
This reverts commit bec8a372fc0db95852748691c0f4933044026b25.

This causes many of these errors to appear when rebuilding runtimes part
of fuchsia's toolchain:

ld.lld: error:
/usr/local/google/home/paulkirth/llvm-upstream/build/lib/x86_64-unknown-linux-gnu/libunwind.a(libunwind.cpp.o)
is incompatible with elf64-x86-64

This can be reproduced by making a complete toolchain, saving any source
file with no changes, then rerunning ninja distribution.
2022-12-05 22:20:51 +00:00
Xing Xue
1e3e3e28a6 [libc++abi][LIT][AIX] Use Vector instructions available on Power7 in vec_reg_restore.pass.cpp
Summary:
libc++abi LIT test case vec_reg_restore.pass.cpp for AIX uses instructions mtvsrd and mfvsrd that are only available on Power8 CPU and higher, and therefore, fails on Power7 which is supported by the current AIX Clang. This patch replaces mtvsrd/mfvsrd with vector instructions available on Power7.

Reviewed by: nemanjai

Differential Revision: https://reviews.llvm.org/D138667
2022-11-29 14:08:03 -05:00
Petr Hosek
bec8a372fc [CMake] Use LLVM_TARGET_TRIPLE in runtimes
This variable is derived from LLVM_DEFAULT_TARGET_TRIPLE by default,
but using a separate variable allows additional normalization to be
performed if needed.

Differential Revision: https://reviews.llvm.org/D137451
2022-11-29 04:08:24 +00:00
Louis Dionne
480cd780d6 [libc++][NFC] Consistently use newline between license and include guard 2022-11-25 10:25:17 -05:00
Louis Dionne
bc91104e85 Revert "[libcxxabi] Always use thread_local for cxa_exception_storage"
This reverts commit 8271aa5335668a1dc62168a4e90b4554bd3a0ca7 since it
broke some downstream builds. See https://reviews.llvm.org/D138461 for
details.
2022-11-24 08:32:10 -05:00
Shoaib Meenai
8271aa5335 [libcxxabi] Always use thread_local for cxa_exception_storage
This was previously guarded by HAS_THREAD_LOCAL, which was never set by
CMake and had to be specified manually. Android has been setting this to
solve https://github.com/android/ndk/issues/1200 [1], but every compiler
and platform libc++abi supports should have thread_local by now, so we
can just get rid of the fallback implementation and simplify things
significantly (including removing the now unused fallback calloc).

[1] https://android-review.googlesource.com/c/toolchain/llvm-project/+/1285596

Reviewed By: #libc_abi, MaskRay, ldionne

Differential Revision: https://reviews.llvm.org/D138461
2022-11-22 12:22:06 -08:00
Sam James
32a2af44e1 [CMake] Fix -Wstrict-prototypes
Fixes warnings (or errors, if someone injects -Werror in their build system,
which happens in fact with some folks vendoring LLVM too) with Clang 16:
```
+/var/tmp/portage.notmp/portage/sys-devel/llvm-15.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: warning: a function declaration without a prototype
is deprecated in all versions of C [-Wstrict-prototypes]
-/var/tmp/portage.notmp/portage/sys-devel/llvm-14.0.4/work/llvm_build-abi_x86_64.amd64/CMakeFiles/CMakeTmp/src.c:3:9: error: a function declaration without a prototype is
deprecated in all versions of C [-Werror,-Wstrict-prototypes]
 int main() {return 0;}
         ^
          void
```

Differential Revision: https://reviews.llvm.org/D137503
2022-11-08 01:37:04 +00:00
Ryan Prichard
292533324c [libc++abi] Use std::nullptr_t instead of declaring it manually
Sometimes libc++'s stddef.h wrapper gets included, which defines
::nullptr_t. This test is compiled with -Wshadow -Werror, so shadowing
::nullptr_t with a nullptr_t in main is an error. Include cstddef,
which is guaranteed to define std::nullptr_t in C++11 and forward.

Reviewed By: ldionne, #libc_abi

Differential Revision: https://reviews.llvm.org/D137127
2022-11-04 15:51:44 -07:00
Xing Xue
fb391e45e9 [libc++abi][AIX] Use reserved slot in stack to pass the address of exception object
Summary:
The existing implementation of the personality for legacy IBM xlclang++ compiler generated code passes the address of exception object in r14 for the landing pad to retrieve with a call to __xlc_exception_handle(). This clobbers the content of r14 in user code (and potentially, when running cleanup actions, the address of another exception object being passed). This patch changes to use the stack slot reserved for compilers to pass the address. It has been confirmed that xlclang++-generated code does not use this slot.

This is a follow-on of the origibal patch below with a change in comments.
   https://reviews.llvm.org/rGa499051f10a2d0150b60c14493558476039f701a

Reviewed by: hubert.reinterpretcast, cebowleratibm

Differential Revision: https://reviews.llvm.org/D136257
2022-10-27 17:06:18 -04:00
Xing Xue
a499051f10 [libc++abi][AIX] Use reserved slot in stack to pass the address of exception object
Summary:
The existing implementation of the personality for legacy IBM xlclang++ compiler generated code passes the address of exception object in r14 for the landing pad to retrieve with a call to __xlc_exception_handle(). This clobbers the content of r14 in user code (and potentially, when running cleanup actions, the address of another exception object being passed). This patch changes to use the stack slot reserved for compilers to pass the address. It has been confirmed that xlclang++-generated code does not use this slot.

Reviewed by: hubert.reinterpretcast, cebowleratibm
2022-10-27 15:11:06 -04:00
Nathan Sidwell
c7ca21436d libcxxabi [PR58117][NFC]: Open code lower bound
This open codes the use of lower-bound when looking for an operator
encoding. Using std::lower_bound can result in symbol references to
the C++ library and that breaks the ABI demangler, which mandates no
such dependency.

Differential Revision: https://reviews.llvm.org/D135799

Fixes: https://github.com/llvm/llvm-project/issues/58117
2022-10-20 09:11:24 -04:00
Nathan Sidwell
d3b10150b6 [demangler] Simplify OutputBuffer initialization
Every non-testcase use of OutputBuffer contains code to allocate an
initial buffer (using either 128 or 1024 as initial guesses). There's
now no need to do that, given recent changes to the buffer extension
heuristics -- it allocates a 1k(ish) buffer on first need.

Just pass in a buffer (if any) to the constructor.  Thus the
OutputBuffer's ownership of the buffer starts at its own lifetime
start. We can reduce the lifetime of this object in several cases.

That new constructor takes a 'size_t *' for the size argument, as all
uses with a non-null buffer are passing through a malloc'd buffer from
their own caller in this manner.

The buffer reset member function is never used, and is deleted.

Some adjustment to a couple of uses is needed, due to the lazy buffer
creation of this patch.

a) the Microsoft demangler can demangle empty strings to nothing,
which it then memoizes.  We need to avoid the UB of passing nullptr to
memcpy.

b) a unit test checks insertion of no characters into an empty buffer.
We need to avoid UB when converting that to std::string.

The original buffer initialization code would return a failure code if
that first malloc failed.  Existing code either ignored that, called
std::terminate with a FIXME, or returned an error code.

But that's not foolproof anyway, as a subsequent buffer extension
failure ends up calling std::terminate. I am working on addressing
that unfortunate failure mode in a manner more consistent with the C++
ABI design.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D122604
2022-10-17 04:23:16 -07:00
Haowei Wu
a353909088 Revert "[runtimes] Always define cxx_shared, cxx_static & other targets"
This reverts commit 79ee0342dbf025bc70f237bdfe9ccb4e10a592ce which
breaks the LLVM TSan bots.
2022-10-12 12:54:48 -07:00
Nathan Sidwell
702d937f1e [libcxxabi]: Resync llvm & libcxxabi's demangler
Sadly the demangler copies have diverged.  This resyncs them by
a) pulling the meaningful llvm changes into libcxxabi's gold copy.
b) rerunning the sync script.

I notice uses of placement new, which assume the allocator succeeds --
that's incorrect in general, but an orthogonal problem.

Reviewed By: bader

Differential Revision: https://reviews.llvm.org/D135446
2022-10-12 09:45:16 -07:00
Louis Dionne
79ee0342db [runtimes] Always define cxx_shared, cxx_static & other targets
However, mark them as EXCLUDE_FROM_ALL when we don't want to build them.
Simply declaring the targets should be of no harm, and it allows other
projects to mention these targets regardless of whether they end up
being built or not.

While the diff may not make that obvious, this patch basically
moves the definition of e.g. `cxx_shared` out of the `if (LIBCXX_ENABLE_SHARED)`
and instead marks it as `EXCLUDE_FROM_ALL` conditionally on whether
LIBCXX_ENABLE_SHARED is passed. It then does the same for libunwind
and libc++abi targets.

Differential Revision: https://reviews.llvm.org/D134221
2022-10-12 09:36:29 -04:00
Louis Dionne
10378b3db1 [runtimes] Add the ability to customize the output name of libc++, libc++abi and libunwind
We already had the ability to do that for libc++.dylib, so this only adds
consistency for all the runtime libraries. This should allow working around
difficulties on AIX as described in https://llvm.org/D134221.

Differential Revision: https://reviews.llvm.org/D135669
2022-10-11 15:19:59 -04:00
Zibi Sarbinowski
36dde913b0 [SystemZ][z/OS] Add ASCII and 32-bit variants for libc++.
This patch enables libc++ build as shared library in all combinations of ASCII/EBCDIC and 32-bit/64-bit variants. In particular it introduces:

  # ASCII version of libc++ named as libc++_a.so
  # Script to rename DLL name inside the generated side deck
  # Various names for dataset members where DLL libraries and their side decks will reside
  # Add the following options:

   - LIBCXX_SHARED_OUTPUT_NAME
   - LIBCXX_ADDITIONAL_COMPILE_FLAGS
   - LIBCXX_ADDITIONAL_LIBRARIES
   - LIBCXXABI_ADDITIONAL_COMPILE_FLAGS
   - LIBCXXABI_ADDITIONAL_LIBRARIES

**Background and rational of this patch**

The linker on z/OS creates a list of exported symbols in a file called side deck. The list contains the symbol name as well as the name of the DLL which implements the symbol. The name of the DLL depends on what is specified in the -o command line option. If it points to a USS file, than the DLL name in the side deck will be the USS file name. If it points to a member of a dataset then the DLL name in the side deck is the member name.

If CMake could deal with z/OS datasets we could use -o that points to a dataset member name, but this does not seem to work so we have to produce a USS file as the DLL and then copy the content of the produced side deck to a dataset as well as rename the USS file name in the side deck to a dataset member name that corresponds to that DLL.

Reviewed By: muiez, SeanP, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D118503
2022-10-03 17:24:02 -05:00
Louis Dionne
a48f018bb7 [runtimes] Remove all traces of the legacy testing configuration system
Now that all jobs have moved over to the new style of Lit configuration,
we can remove all traces of the legacy testing configuration system.
This includes:
- Cache settings that are not honored or useful anymore
- Several CMake options that were only useful in the context of the
  legacy Lit configuration system
- A bunch of Python support code that is not used anymore
- The legacy lit.cfg.in files themselves

Differential Revision: https://reviews.llvm.org/D134650
2022-09-30 15:03:33 -04:00
Aaron Puchert
4491bb19df [libcxxabi] Fix forced_unwind3.pass.cpp compilation error
Under some circumstances there is no struct _Unwind_Exception, it's just
an alias to another struct. This would result in an error like this:

libcxxabi/test/forced_unwind3.pass.cpp:50:77: error: typedef '_Unwind_Exception' cannot be referenced with a struct specifier
  static _Unwind_Reason_Code stop(int, _Unwind_Action actions, type, struct _Unwind_Exception*, struct _Unwind_Context*,
                                                                            ^
<...>/lib/clang/15.0.0/include/unwind.h:68:38: note: declared here
typedef struct _Unwind_Control_Block _Unwind_Exception; /* Alias */
                                     ^

This seems to have been an issue since the test was first added in
D109856, except that it didn't surface with Clang 14 because the code
is filtered out by the preprocessor if `__clang_major__ < 15`.

Reviewed By: danielkiss, mstorsjo, #libc_abi, ldionne

Differential Revision: https://reviews.llvm.org/D132873
2022-09-11 20:44:38 +02:00
Nikolas Klauser
d5e26775d0 [libc++] Granularize the rest of memory
Reviewed By: ldionne, #libc

Spies: vitalybuka, paulkirth, libcxx-commits, mgorny

Differential Revision: https://reviews.llvm.org/D132790
2022-09-05 12:36:41 +02:00
Louis Dionne
690a4692d1 [runtimes] Don't link against compiler-rt when we don't find it
Otherwise, we would end up passing `-lNOTFOUND` to the compiler, which
caused various compiler checks to fail and ended up breaking the build
in the most obscure ways. For example, checks for -faligned-allocation
would fail because the compiler would complain about an unknown library
called NOTFOUND, and we would end up not passing -faligned-allocation
anywhere in our build. This is madness.

An even better alternative would be to simply FATAL_ERROR if we don't
find the builtins library. However, it seems like our build has been
working fine without finding it for a while, so instead of making a
bunch of builds fail, we can figure out why linking against compiler-rt
doesn't actually seem to be required in a follow-up, and perhaps
relax that.
2022-08-24 10:33:10 -04:00
Louis Dionne
342e0ebd0b Revert the removal of LLVM_ENABLE_PROJECTS for libc++ and libc++abi
This commit reverts the following commits:

- 952f90b72b3546d6b6b038d410f07ce520c59b48
- e6a0800532bb409f6d1c62f3698bdd6994a877dc (D132298)
- 176db3b3ab25ff8a9b2405f50ef5a8bd9304a6d5 (D132324)

These commits caused CI instability and need to be reverted in order
to figure things out again. See the discussion in https://llvm.org/D132324
for more information.
2022-08-23 09:58:30 -04:00
John Ericson
e6a0800532 [libcxxabi][cmake] Allow building without libcxx again
This allows `-DLLVM_ENABLE_RUNTIMES=libcxxabi` to work.

This functionality was removed in D125561 (among other such removals) as
dead code, because it was only available as part of the standalone build
before.

The functionality as added back as it was, except `target_include_directories` is used instead of the cruder `target_compile_options` (with an MSVC vs not MSVC conditional split). That is just wholly better.

Reviewed By: phosek, #libc_abi

Differential Revision: https://reviews.llvm.org/D132298
2022-08-21 08:22:57 -04:00
Simon Tatham
a771a91dcb [libcxxabi] Fix alignment of pointers returned by fallback_malloc
This aligns the ``heap[]`` array in ``fallback_malloc.cpp`` to ensure
that it can be safely cast to ``heap_node*``, and also adjusts the
allocation algorithm to ensure that every allocated block has the
alignment requested by ``__attribute__((aligned))``, by putting the
block's ``heap_node`` header 4 bytes before an aligned address.

Patch originally by Eric Fiselier: this is an updated version of
D12669, which was never landed.

Reviewed By: ldionne, #libc_abi

Differential Revision: https://reviews.llvm.org/D129842
2022-08-19 15:07:57 +01:00
John Ericson
e941b031d3 Revert "[cmake] Use CMAKE_INSTALL_LIBDIR too"
This reverts commit f7a33090a91015836497c75f173775392ab0304d.

Unfortunately this causes a number of failures that didn't show up in my
local build.
2022-08-18 22:46:32 -04:00
John Ericson
f7a33090a9 [cmake] Use CMAKE_INSTALL_LIBDIR too
We held off on this before as `LLVM_LIBDIR_SUFFIX` conflicted with it.
Now we return this.

`LLVM_LIBDIR_SUFFIX` is kept as a deprecated way to set
`CMAKE_INSTALL_LIBDIR`. The other `*_LIBDIR_SUFFIX` are just removed
entirely.

I imagine this is too potentially-breaking to make LLVM 15. That's fine.
I have a more minimal version of this in the disto (NixOS) patches for
LLVM 15 (like previous versions). This more expansive version I will
test harder after the release is cut.

Reviewed By: sebastian-ne, ldionne, #libc, #libc_abi

Differential Revision: https://reviews.llvm.org/D130586
2022-08-18 15:33:35 -04:00
tlattner
44f81dfba4 Remove references to old mailing lists that have moved to discourse. Replace with links to discourse.
Reviewed By: #libc_abi, ldionne

Differential Revision: https://reviews.llvm.org/D129675
2022-07-22 09:59:03 -07:00
Petr Hosek
1f3f4833ea [libcxxabi][CMake] Set --unwindlib=none when using LLVM libunwind
We already link libunwind explicitly so avoid trying to link toolchain's
default libunwind which may be missing. This matches what we already do
for libcxx.

Differential Revision: https://reviews.llvm.org/D129469
2022-07-14 18:59:40 +00:00
Muiez Ahmed
85593e7bb5 [SystemZ][z/OS] Modify cxxabi to be compatible with existing z/OS runtime
This patch is to enable exception handling on the z/OS platform that is compatible with the existing z/OS runtime. No functionality of libcxxabi has been changed for other platforms. With this patch the hope is we can add z/OS as a platform to perform testing on any C++ ABI changes.

There is a primary difference for the z/OS implementation. On z/OS the thrown object is added to a linked list of caught and uncaught exceptions. The unwinder uses the top one as the current exception it is trying to find the landing pad for. We have to pop the top exception after we get it’s landing pad for our unwinder to correctly get any subsequent rethrows or nested exception calls.

Differential Revision: https://reviews.llvm.org/D99913
2022-06-28 21:01:25 +03:00