~smspillaz/folly/folly-git-master

« back to all changes in this revision

Viewing changes to folly/lang/UncaughtExceptions.h

  • Committer: Facebook Github Bot
  • Author(s): Joe Loser
  • Date: 2019-04-19 23:54:22 UTC
  • Revision ID: git-v1:6607a5012db1db9d61e6ea8596706676b9bed390
Simplify some macros testing __GNUC__ and __clang__ (#1095)

Summary:
- Both GCC and Clang define the macro `__GNUC__`, `__GNUG__` and
  friends. Simplify some macros whose intent is to check "if we are GCC or
  Clang" but do so via checking `__GNUC__` in addition to `__clang__`. It
  is sufficient to just check `__GNUC__`.
Pull Request resolved: https://github.com/facebook/folly/pull/1095

Reviewed By: Orvid

Differential Revision: D14697480

Pulled By: yfeldblum

fbshipit-source-id: cd6ec82c4235a1321ecdf240afaad7d5c0e99437

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
#include <exception>
20
20
 
21
 
#if !defined(FOLLY_FORCE_EXCEPTION_COUNT_USE_STD) && \
22
 
    (defined(__GNUG__) || defined(__clang__))
 
21
#if !defined(FOLLY_FORCE_EXCEPTION_COUNT_USE_STD) && defined(__GNUG__)
23
22
#define FOLLY_EXCEPTION_COUNT_USE_CXA_GET_GLOBALS
24
23
namespace __cxxabiv1 {
25
24
// forward declaration (originally defined in unwind-cxx.h from from libstdc++)