[libcxx-commits] [libcxxabi] 913844f - [libcxxabi] allow downstreams to override _LIBCPP_VERBOSE_ABORT

Nick Desaulniers via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 18 14:03:10 PDT 2023


Author: Nick Desaulniers
Date: 2023-05-18T14:02:48-07:00
New Revision: 913844f55ac464aad8e88b50dde66896d9494491

URL: https://github.com/llvm/llvm-project/commit/913844f55ac464aad8e88b50dde66896d9494491
DIFF: https://github.com/llvm/llvm-project/commit/913844f55ac464aad8e88b50dde66896d9494491.diff

LOG: [libcxxabi] allow downstreams to override _LIBCPP_VERBOSE_ABORT

@asbirlea reports that Google does this for sanitizer analysis
downstream. Looks like a few #defines are added into a header which is
then injected into the build.

Reviewed By: vitalybuka, ldionne, #libc_abi

Differential Revision: https://reviews.llvm.org/D150825

Added: 
    

Modified: 
    libcxxabi/src/demangle/DemangleConfig.h

Removed: 
    


################################################################################
diff  --git a/libcxxabi/src/demangle/DemangleConfig.h b/libcxxabi/src/demangle/DemangleConfig.h
index 5ae933c033d52..d5e11432d9867 100644
--- a/libcxxabi/src/demangle/DemangleConfig.h
+++ b/libcxxabi/src/demangle/DemangleConfig.h
@@ -11,11 +11,14 @@
 #ifndef LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
 #define LIBCXXABI_DEMANGLE_DEMANGLE_CONFIG_H
 
-// Must be defined before pulling in headers from libc++.
+// Must be defined before pulling in headers from libc++. Allow downstream
+// build systems to override this value.
 // https://libcxx.llvm.org/UsingLibcxx.html#enabling-the-safe-libc-mode
+#ifndef _LIBCPP_VERBOSE_ABORT
 #define _LIBCPP_VERBOSE_ABORT(...) abort_message(__VA_ARGS__)
-
 #include "../abort_message.h"
+#endif
+
 #include <ciso646>
 
 #ifdef _MSC_VER


        


More information about the libcxx-commits mailing list