Support precise zone stats for Windows

MSVC does not have cxxabi.h. Also, MSVC does not need demangling in this case.

Bug: v8:10572
Change-Id: I27f2335ba6cb2bb35132bad23ce95b78b66cd3fa
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/4103520
Commit-Queue: Choongwoo Han <choongwoo.han@microsoft.com>
Reviewed-by: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/main@{#84851}
This commit is contained in:
Choongwoo Han 2022-12-13 11:39:44 -08:00 committed by V8 LUCI CQ
parent c04ca9cc63
commit bda14cb7ed

View File

@ -4,7 +4,7 @@
#ifdef V8_ENABLE_PRECISE_ZONE_STATS
#if defined(__clang__) || defined(__GLIBCXX__)
#if (defined(__clang__) || defined(__GLIBCXX__)) && !defined(_MSC_VER)
#include <cxxabi.h>
#endif // __GLIBCXX__
#include <cinttypes>
@ -33,7 +33,7 @@ class Demangler {
}
const char* demangle(std::type_index type_id) {
#if defined(__clang__) || defined(__GLIBCXX__)
#if (defined(__clang__) || defined(__GLIBCXX__)) && !defined(_MSC_VER)
int status = -1;
char* result =
abi::__cxa_demangle(type_id.name(), buffer_, &buffer_len_, &status);