[libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined.
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Wed, 21 Oct 2020 19:56:24 +0000 (20:56 +0100)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Wed, 21 Oct 2020 19:56:24 +0000 (20:56 +0100)
commit272279a1c0fa4142e599aecdc75ef68720a81607
treee30f3c04f3c274b1b93d8db4a580c9bfab2efb40
parent8d9466a3850b8f213b817075ede0fdec8526b7a7
[libcxxabi] Stub out 'sleep' call when _LIBCXXABI_HAS_NO_THREADS is defined.

While running this test on a bare metal target, I got an error as 'sleep' was not available on that system. As 'sleep' call is not doing anything useful for cases when _LIBCXXABI_HAS_NO_THREADS is defined. This patch puts it under this check.

Reviewed By: ldionne

Differential Revision: https://reviews.llvm.org/D89871
libcxxabi/test/test_exception_storage.pass.cpp