diff --git a/owt/src/rtc_base/checks.h b/owt/src/rtc_base/checks.h index 21fca7e..316f7ff 100644 --- a/owt/src/rtc_base/checks.h +++ b/owt/src/rtc_base/checks.h @@ -329,6 +329,9 @@ class FatalLogCall final { : streamer.Call(file_, line_, message_); #else streamer.Call(file_, line_); +#endif +#ifdef __EDG__ + __builtin_unreachable(); #endif } diff --git a/owt/src/rtc_base/logging.cc b/owt/src/rtc_base/logging.cc index 13a5f02..3cd257e 100644 --- a/owt/src/rtc_base/logging.cc +++ b/owt/src/rtc_base/logging.cc @@ -464,7 +464,11 @@ void Log(const LogArgType* fmt, ...) { const char* tag = nullptr; switch (*fmt) { case LogArgType::kLogMetadata: { +#ifdef __EDG__ + meta = {va_arg(args, LogMetadata_EDG_Trivial), ERRCTX_NONE, 0}; +#else meta = {va_arg(args, LogMetadata), ERRCTX_NONE, 0}; +#endif break; } case LogArgType::kLogMetadataErr: { diff --git a/owt/src/rtc_base/logging.h b/owt/src/rtc_base/logging.h index e21c30e..88586c1 100644 --- a/owt/src/rtc_base/logging.h +++ b/owt/src/rtc_base/logging.h @@ -153,6 +153,17 @@ class LogMetadata { }; static_assert(std::is_trivial::value, ""); +#ifdef __EDG__ +struct LogMetadata_EDG_Trivial { + operator LogMetadata() const { + return LogMetadata(file_, line_and_sev_ >> 3, + static_cast(line_and_sev_ & 7)); + } + const char* file_; + uint32_t line_and_sev_; +}; +#endif + struct LogMetadataErr { LogMetadata meta; LogErrorContext err_ctx;