[libcxx-commits] [PATCH] D149092: [libcxxabi] disable lib{std}c++ assertions
Nick Desaulniers via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Wed May 3 11:28:15 PDT 2023
nickdesaulniers added a comment.
In D149092#4316297 <https://reviews.llvm.org/D149092#4316297>, @nickdesaulniers wrote:
> Looking at libcxx/include/__verbose_abort, we might also be able to provide a definition of `_LIBCPP_VERBOSE_ABORT` perhaps?
Yeah, this diff seems to work. Will use that instead:
diff --git a/libcxxabi/src/cxa_demangle.cpp b/libcxxabi/src/cxa_demangle.cpp
index 2c0f82bbb207..03085cb5903b 100644
--- a/libcxxabi/src/cxa_demangle.cpp
+++ b/libcxxabi/src/cxa_demangle.cpp
@@ -10,6 +10,7 @@
// file does not yet support:
// - C++ modules TS
+#include "demangle/DemangleConfig.h"
#include "demangle/ItaniumDemangle.h"
#include "__cxxabi_config.h"
#include <cassert>
diff --git a/libcxxabi/src/demangle/DemangleConfig.h b/libcxxabi/src/demangle/DemangleConfig.h
index 9d818535b094..bebef7713522 100644
--- a/libcxxabi/src/demangle/DemangleConfig.h
+++ b/libcxxabi/src/demangle/DemangleConfig.h
@@ -11,7 +11,11 @@
#ifndef LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
#define LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
+// Must be defined befor pulling in headers from libc++.
+#define _LIBCPP_VERBOSE_ABORT(...) abort_message(__VA_ARGS__)
+
#include <ciso646>
+#include "../abort_message.h"
#ifdef _MSC_VER
// snprintf is implemented in VS 2015
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149092/new/
https://reviews.llvm.org/D149092
More information about the libcxx-commits
mailing list