[config] Remove RETSIGTYPE from config.h.cmake, NFC
authorReid Kleckner <rnk@google.com>
Fri, 3 Jun 2022 23:21:42 +0000 (16:21 -0700)
committerReid Kleckner <rnk@google.com>
Tue, 7 Jun 2022 18:35:25 +0000 (11:35 -0700)
This doesn't need to be configurable. It was hardcoded to void in all
LLVM build systems.

llvm/cmake/config-ix.cmake
llvm/include/llvm/Config/config.h.cmake
llvm/lib/Support/Unix/Signals.inc
llvm/utils/gn/secondary/llvm/include/llvm/Config/BUILD.gn
utils/bazel/llvm-project-overlay/llvm/include/llvm/Config/config.h
utils/bazel/llvm_configs/config.h.cmake

index 0da93ec..9a375a6 100644 (file)
@@ -539,9 +539,6 @@ else()
   set(LLVM_ENABLE_DIA_SDK 0)
 endif( MSVC )
 
-# FIXME: Signal handler return type, currently hardcoded to 'void'
-set(RETSIGTYPE void)
-
 if( LLVM_ENABLE_THREADS )
   # Check if threading primitives aren't supported on this platform
   if( NOT HAVE_PTHREAD_H AND NOT WIN32 )
index 307a289..0055bc0 100644 (file)
 /* Define to the vendor of this package. */
 #cmakedefine PACKAGE_VENDOR "${PACKAGE_VENDOR}"
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE ${RETSIGTYPE}
-
 /* Define if std::is_trivially_copyable is supported */
 #cmakedefine HAVE_STD_IS_TRIVIALLY_COPYABLE ${HAVE_STD_IS_TRIVIALLY_COPYABLE}
 
index 575e2aa..23ac012 100644 (file)
@@ -79,8 +79,8 @@
 
 using namespace llvm;
 
-static RETSIGTYPE SignalHandler(int Sig);  // defined below.
-static RETSIGTYPE InfoSignalHandler(int Sig);  // defined below.
+static void SignalHandler(int Sig);  // defined below.
+static void InfoSignalHandler(int Sig);  // defined below.
 
 using SignalHandlerFunctionType = void (*)();
 /// The function to call if ctrl-c is pressed.
@@ -362,7 +362,7 @@ void sys::CleanupOnSignal(uintptr_t Context) {
 }
 
 // The signal handler that runs.
-static RETSIGTYPE SignalHandler(int Sig) {
+static void SignalHandler(int Sig) {
   // Restore the signal behavior to default, so that the program actually
   // crashes when we return and the signal reissues.  This also ensures that if
   // we crash in our signal handler that the program will terminate immediately
@@ -406,7 +406,7 @@ static RETSIGTYPE SignalHandler(int Sig) {
 #endif
 }
 
-static RETSIGTYPE InfoSignalHandler(int Sig) {
+static void InfoSignalHandler(int Sig) {
   SaveAndRestore<int> SaveErrnoDuringASignalHandler(errno);
   if (SignalHandlerFunctionType CurrentInfoFunction = InfoSignalFunction)
     CurrentInfoFunction();
index 225c11a..951dabe 100644 (file)
@@ -129,7 +129,6 @@ write_cmake_config("config") {
     "PACKAGE_STRING=LLVM ${llvm_version}git",
     "PACKAGE_VERSION=${llvm_version}git",
     "PACKAGE_VENDOR=",
-    "RETSIGTYPE=void",
     "LLVM_GISEL_COV_ENABLED=",
     "LLVM_GISEL_COV_PREFIX=",
 
index 85b43ed..d5b6034 100644 (file)
 /* Define to the vendor of this package. */
 /* #undef PACKAGE_VENDOR */
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#define RETSIGTYPE void
-
 /* Define if std::is_trivially_copyable is supported */
 #define HAVE_STD_IS_TRIVIALLY_COPYABLE 1
 
index 307a289..0055bc0 100644 (file)
 /* Define to the vendor of this package. */
 #cmakedefine PACKAGE_VENDOR "${PACKAGE_VENDOR}"
 
-/* Define as the return type of signal handlers (`int' or `void'). */
-#cmakedefine RETSIGTYPE ${RETSIGTYPE}
-
 /* Define if std::is_trivially_copyable is supported */
 #cmakedefine HAVE_STD_IS_TRIVIALLY_COPYABLE ${HAVE_STD_IS_TRIVIALLY_COPYABLE}