From 51f0c20dc290dc72bdad67099f597eaa12e058bd Mon Sep 17 00:00:00 2001 From: Saleem Abdulrasool Date: Wed, 4 Jan 2017 05:45:24 +0000 Subject: [PATCH] tweak definition to avoid GCC warning Use an `extern "C" { }` block around the definition rather than doing the inline definition. This avoids a GCC warning about a declaration being extern and having a definition. NFC. llvm-svn: 290937 --- libcxxabi/src/cxa_handlers.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libcxxabi/src/cxa_handlers.cpp b/libcxxabi/src/cxa_handlers.cpp index 3f781313df87..ce2cfba35fd6 100644 --- a/libcxxabi/src/cxa_handlers.cpp +++ b/libcxxabi/src/cxa_handlers.cpp @@ -104,7 +104,9 @@ terminate() _NOEXCEPT // In the future this will become: // std::atomic __cxa_new_handler(0); -extern "C" _LIBCXXABI_DATA_VIS new_handler __cxa_new_handler = 0; +extern "C" { +_LIBCXXABI_DATA_VIS new_handler __cxa_new_handler = 0; +} new_handler set_new_handler(new_handler handler) _NOEXCEPT