diff --git a/src/trace_processor/util/regex.h b/src/trace_processor/util/regex.h index ffc9ec2f846..bf7a650ad1b 100644 --- a/src/trace_processor/util/regex.h +++ b/src/trace_processor/util/regex.h @@ -24,7 +24,6 @@ #include #include "perfetto/base/build_config.h" -#include "perfetto/base/compiler.h" #include "perfetto/base/logging.h" #include "perfetto/base/status.h" #include "perfetto/ext/base/status_or.h" @@ -33,12 +32,6 @@ #include #endif -#if PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) -#define PERFETTO_WIN_NORETURN PERFETTO_NORETURN -#else -#define PERFETTO_WIN_NORETURN -#endif - namespace perfetto::trace_processor::regex { constexpr bool IsRegexSupported() { @@ -101,8 +94,7 @@ class Regex { // The first element is the full match. Subsequent elements are parenthesized // subexpressions. // Returns nullopt if there is no match. - void Submatch(const char* s, - std::vector& out) PERFETTO_WIN_NORETURN { + void Submatch(const char* s, std::vector& out) { #if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN) PERFETTO_CHECK(regex_); const auto& rgx = regex_.value(); @@ -124,9 +116,8 @@ class Regex { } } #else - base::ignore_result(s); - base::ignore_result(out); - PERFETTO_FATAL("Windows regex is not supported."); + if (s) + PERFETTO_FATAL("Windows regex is not supported."); #endif }