Skip to content

Commit

Permalink
Export of internal Abseil changes
Browse files Browse the repository at this point in the history
--
87f85071a96c6d10f471cdf8a8c2d6c550c926e0 by Matt Kulukundis <[email protected]>:

Expose ABSL_HAVE_SOURCE_LOCATION_CURRENT as a public api.

PiperOrigin-RevId: 281383411
GitOrigin-RevId: 87f85071a96c6d10f471cdf8a8c2d6c550c926e0
Change-Id: I4dfc18a5ba8e064bf9b749892aa8293470459e6b
  • Loading branch information
Abseil Team authored and gennadiycivil committed Nov 20, 2019
1 parent 2103fd9 commit 8ba96a8
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions absl/base/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,12 @@
#define ABSL_HAVE_BUILTIN(x) 0
#endif

#if defined(__is_identifier)
#define ABSL_INTERNAL_HAS_KEYWORD(x) !(__is_identifier(x))
#else
#define ABSL_INTERNAL_HAS_KEYWORD(x) 0
#endif

// ABSL_HAVE_TLS is defined to 1 when __thread should be supported.
// We assume __thread is supported on Linux when compiled with Clang or compiled
// against libstdc++ with _GLIBCXX_HAVE_TLS defined.
Expand Down Expand Up @@ -133,6 +139,17 @@
#define ABSL_HAVE_STD_IS_TRIVIALLY_ASSIGNABLE 1
#endif

// ABSL_HAVE_SOURCE_LOCATION_CURRENT
//
// Indicates whether `absl::SourceLocation::current()` will return useful
// information in some contexts.
#ifndef ABSL_HAVE_SOURCE_LOCATION_CURRENT
#if ABSL_INTERNAL_HAS_KEYWORD(__builtin_LINE) && \
ABSL_INTERNAL_HAS_KEYWORD(__builtin_FILE)
#define ABSL_HAVE_SOURCE_LOCATION_CURRENT 1
#endif
#endif

// ABSL_HAVE_THREAD_LOCAL
//
// Checks whether C++11's `thread_local` storage duration specifier is
Expand Down Expand Up @@ -539,4 +556,6 @@
#define ABSL_INTERNAL_MSVC_2017_DBG_MODE
#endif

#undef ABSL_INTERNAL_HAS_KEYWORD

#endif // ABSL_BASE_CONFIG_H_

0 comments on commit 8ba96a8

Please sign in to comment.