diff options
author | Tom Hughes <tomhughes@google.com> | 2023-03-04 00:03:22 (GMT) |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2023-03-06 15:16:32 (GMT) |
commit | 16feffa8fa7cb6e061787ce345c16eb24326d2ce (patch) | |
tree | 96b4e5fce8cb287148427aa308c907e7c381edf6 /googletest/src/gtest.cc | |
parent | dc10c3b5e55c1101e7759bdb7bf9790cebbf4ad2 (diff) | |
download | googletest-16feffa8fa7cb6e061787ce345c16eb24326d2ce.zip googletest-16feffa8fa7cb6e061787ce345c16eb24326d2ce.tar.gz googletest-16feffa8fa7cb6e061787ce345c16eb24326d2ce.tar.bz2 |
Replace "#if GTEST_HAS_ABSL" with "#ifdef GTEST_HAS_ABSL"
This allows compilation with "-Wundef" (#3267).
PiperOrigin-RevId: 513945230
Change-Id: I45ef19c7ff3d20e97216bd031d406a03365471da
Diffstat (limited to 'googletest/src/gtest.cc')
-rw-r--r-- | googletest/src/gtest.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/googletest/src/gtest.cc b/googletest/src/gtest.cc index 7ffbf41..0dd3eba 100644 --- a/googletest/src/gtest.cc +++ b/googletest/src/gtest.cc @@ -135,7 +135,7 @@ #endif #endif -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL #include "absl/debugging/failure_signal_handler.h" #include "absl/debugging/stacktrace.h" #include "absl/debugging/symbolize.h" @@ -4958,7 +4958,7 @@ const char* const OsStackTraceGetterInterface::kElidedFramesMarker = std::string OsStackTraceGetter::CurrentStackTrace(int max_depth, int skip_count) GTEST_LOCK_EXCLUDED_(mutex_) { -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL std::string result; if (max_depth <= 0) { @@ -5007,7 +5007,7 @@ std::string OsStackTraceGetter::CurrentStackTrace(int max_depth, int skip_count) } void OsStackTraceGetter::UponLeavingGTest() GTEST_LOCK_EXCLUDED_(mutex_) { -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL void* caller_frame = nullptr; if (absl::GetStackTrace(&caller_frame, 1, 3) <= 0) { caller_frame = nullptr; @@ -5686,7 +5686,7 @@ void UnitTestImpl::PostFlagParsingInit() { ConfigureStreamingOutput(); #endif // GTEST_CAN_STREAM_RESULTS_ -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL if (GTEST_FLAG_GET(install_failure_signal_handler)) { absl::FailureSignalHandlerOptions options; absl::InstallFailureSignalHandler(options); @@ -6668,7 +6668,7 @@ void ParseGoogleTestFlagsOnlyImpl(int* argc, CharType** argv) { // Parses the command line for Google Test flags, without initializing // other parts of Google Test. void ParseGoogleTestFlagsOnly(int* argc, char** argv) { -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL if (*argc > 0) { // absl::ParseCommandLine() requires *argc > 0. auto positional_args = absl::flags_internal::ParseCommandLineImpl( @@ -6720,7 +6720,7 @@ void InitGoogleTestImpl(int* argc, CharType** argv) { g_argvs.push_back(StreamableToString(argv[i])); } -#if GTEST_HAS_ABSL +#ifdef GTEST_HAS_ABSL absl::InitializeSymbolizer(g_argvs[0].c_str()); // When using the Abseil Flags library, set the program usage message to the |