Fix the -Werror -Wpedantic clang selfhost build
authorAlp Toker <alp@nuanti.com>
Tue, 22 Oct 2013 12:30:55 +0000 (12:30 +0000)
committerAlp Toker <alp@nuanti.com>
Tue, 22 Oct 2013 12:30:55 +0000 (12:30 +0000)
This is a stopgap fix for cast warnings introduced in r192864.

A proper fix should be investigated by the author when possible.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193160 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Support/ErrorHandling.cpp

index a0b7619cd2b481ac04d9aab3883adab8b9ef13fb..1eafb96fde0949b319db038a1e1d5d99195e7f8c 100644 (file)
@@ -107,13 +107,13 @@ void llvm::llvm_unreachable_internal(const char *msg, const char *file,
 static void bindingsErrorHandler(void *user_data, const std::string& reason,
                                  bool gen_crash_diag) {
   LLVMFatalErrorHandler handler =
-    reinterpret_cast<LLVMFatalErrorHandler>(user_data);
+      LLVM_EXTENSION reinterpret_cast<LLVMFatalErrorHandler>(user_data);
   handler(reason.c_str());
 }
 
 void LLVMInstallFatalErrorHandler(LLVMFatalErrorHandler Handler) {
-  install_fatal_error_handler(
-    bindingsErrorHandler, reinterpret_cast<void*>(Handler));
+  install_fatal_error_handler(bindingsErrorHandler,
+                              LLVM_EXTENSION reinterpret_cast<void *>(Handler));
 }
 
 void LLVMResetFatalErrorHandler() {