Skip to content

Commit

Permalink
folly | Compile-out a constant when unused.
Browse files Browse the repository at this point in the history
Summary: The usage is compiled out in specific case - replicate this for the constant as well.

Reviewed By: EricGriffith

Differential Revision: D64053726

fbshipit-source-id: b9d8485f89d42318b933122022da7905b4418d7c
  • Loading branch information
nlutsenko authored and facebook-github-bot committed Oct 11, 2024
1 parent d0d7838 commit 0aa6ed4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions folly/lang/Exception.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,9 @@ struct __folly_cxa_exception_with_reserve {
_Unwind_Exception unwindHeader;
};

#if _LIBCPP_VERSION < 180000 || !_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
static const uint64_t kOurExceptionClass = 0x434C4E47432B2B00; // CLNGC++\0
#endif

// named differently from the real shim type __shim_type_info and all members
// are pure virtual; as long as the vtable is the same, though, it should work
Expand All @@ -234,7 +236,9 @@ namespace abi = __cxxabiv1;

namespace __cxxabiv1 {

#if _LIBCPP_VERSION < 180000 || !_LIBCPP_AVAILABILITY_HAS_INIT_PRIMARY_EXCEPTION
static const uint64_t kOurExceptionClass = 0x474E5543432B2B00; // GNUCC++\0
#endif

class __folly_shim_type_info {
public:
Expand Down

0 comments on commit 0aa6ed4

Please sign in to comment.