[all-commits] [llvm/llvm-project] 673484: [libunwind] Minor SJLJ config cleanup. NFCI.

Ryan Prichard via All-commits all-commits at lists.llvm.org
Thu Sep 3 16:00:22 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 673484b34189b1bccf73a2ec96968092bc8a26a7
      https://github.com/llvm/llvm-project/commit/673484b34189b1bccf73a2ec96968092bc8a26a7
  Author: Ryan Prichard <rprichard at google.com>
  Date:   2020-09-03 (Thu, 03 Sep 2020)

  Changed paths:
    M libunwind/src/Unwind_AppleExtras.cpp
    M libunwind/src/config.h

  Log Message:
  -----------
  [libunwind] Minor SJLJ config cleanup. NFCI.

Simplify:

    defined(__ARM_DWARF_EH__) || !defined(__arm__)

to:

    !defined(_LIBUNWIND_ARM_EHABI)

A later patch benefits from the simplicity. This change will result in
the two DWARF macros being defined when __USING_SJLJ_EXCEPTIONS__ is
defined, but:

 * That's already the case with the __APPLE__ and _WIN32 clauses.
 * That's also already the case with other architectures.
 * With __USING_SJLJ_EXCEPTIONS__, most of the unwinder is #ifdef'ed
   away.

Generally, when __USING_SJLJ_EXCEPTIONS__ is defined, most of the
libunwind code is removed by the preprocessor. e.g. None of the hpp
files are included, and almost all of the .c and .cpp files are defined
away, except in Unwind-sjlj.c. Unwind_AppleExtras.cpp is an exception
because it includes two hpp files, which it doesn't use. Remove the
unneeded includes for consistency with the general rule.

Reviewed By: steven_wu

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




More information about the All-commits mailing list