Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 3 additions & 12 deletions src/trace_processor/util/regex.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
#include <vector>

#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"
Expand All @@ -33,12 +32,6 @@
#include <regex.h>
#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() {
Expand Down Expand Up @@ -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<std::string_view>& out) PERFETTO_WIN_NORETURN {
void Submatch(const char* s, std::vector<std::string_view>& out) {
#if !PERFETTO_BUILDFLAG(PERFETTO_OS_WIN)
PERFETTO_CHECK(regex_);
const auto& rgx = regex_.value();
Expand All @@ -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
}

Expand Down