[llvm] r193160 - Fix the -Werror -Wpedantic clang selfhost build

Alp Toker alp at nuanti.com
Tue Oct 22 05:30:55 PDT 2013


Author: alp
Date: Tue Oct 22 07:30:55 2013
New Revision: 193160

URL: http://llvm.org/viewvc/llvm-project?rev=193160&view=rev
Log:
Fix the -Werror -Wpedantic clang selfhost build

This is a stopgap fix for cast warnings introduced in r192864.

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

Modified:
    llvm/trunk/lib/Support/ErrorHandling.cpp

Modified: llvm/trunk/lib/Support/ErrorHandling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Support/ErrorHandling.cpp?rev=193160&r1=193159&r2=193160&view=diff
==============================================================================
--- llvm/trunk/lib/Support/ErrorHandling.cpp (original)
+++ llvm/trunk/lib/Support/ErrorHandling.cpp Tue Oct 22 07:30:55 2013
@@ -107,13 +107,13 @@ void llvm::llvm_unreachable_internal(con
 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() {





More information about the llvm-commits mailing list