[libc++abi] Fix unused function when building with LIBCXXABI_SILENT_TERMINATE

This fixes:
src/cxa_default_handlers.cpp:25:13: error: unused function 'demangling_terminate_handler' [-Werror,-Wunused-function]

Patch by Thomas Anderson!

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

llvm-svn: 323397
This commit is contained in:
Peter Collingbourne 2018-01-25 01:38:43 +00:00
parent 567175f3c1
commit a674a8fd1e
1 changed files with 1 additions and 1 deletions

View File

@ -19,6 +19,7 @@
#include "cxa_exception.hpp" #include "cxa_exception.hpp"
#include "private_typeinfo.h" #include "private_typeinfo.h"
#if !defined(LIBCXXABI_SILENT_TERMINATE)
static const char* cause = "uncaught"; static const char* cause = "uncaught";
__attribute__((noreturn)) __attribute__((noreturn))
@ -84,7 +85,6 @@ static void demangling_unexpected_handler()
std::terminate(); std::terminate();
} }
#if !defined(LIBCXXABI_SILENT_TERMINATE)
static std::terminate_handler default_terminate_handler = demangling_terminate_handler; static std::terminate_handler default_terminate_handler = demangling_terminate_handler;
static std::terminate_handler default_unexpected_handler = demangling_unexpected_handler; static std::terminate_handler default_unexpected_handler = demangling_unexpected_handler;
#else #else