[libcxx-commits] [PATCH] D76027: [libc++abi] NFC: Simplify extern C declaration

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Mar 11 14:42:01 PDT 2020

ldionne created this revision.
Herald added a reviewer: EricWF.
Herald added subscribers: libcxx-commits, llvm-commits, dexonsmith, jkorous.
Herald added projects: LLVM, libc++abi.
Herald added a reviewer: libc++abi.
EricWF accepted this revision.
EricWF added a comment.
This revision is now accepted and ready to land.

Why was this file ever getting built as plain C anyway?
All of the libc++abi source files that use it should be C++.

It seems to me that abort_message.h is always included in a C++ file, so
it's fine to assume that it's C++ code.

  rG LLVM Github Monorepo



Index: libcxxabi/src/abort_message.h
--- libcxxabi/src/abort_message.h
+++ libcxxabi/src/abort_message.h
@@ -11,16 +11,7 @@
 #include "cxxabi.h"
-#ifdef __cplusplus
-extern "C" {
 abort_message(const char *format, ...) __attribute__((format(printf, 1, 2)));
-#ifdef __cplusplus

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76027.249758.patch
Type: text/x-patch
Size: 484 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20200311/fc9685de/attachment-0001.bin>

More information about the libcxx-commits mailing list