[Support] Silence warning with Clang ToT.
authorAlexandre Ganea <alex_toresh@yahoo.fr>
Mon, 20 Feb 2023 22:16:21 +0000 (17:16 -0500)
committerAlexandre Ganea <alex_toresh@yahoo.fr>
Mon, 20 Feb 2023 23:25:20 +0000 (18:25 -0500)
This fixes the following warning on Windows with latest Clang:
```
[160/3057] Building CXX object lib/Support/CMakeFiles/LLVMSupport.dir/Signals.cpp.obj
In file included from C:/git/llvm-project/llvm/lib/Support/Signals.cpp:260:
C:/git/llvm-project/llvm/lib/Support/Windows/Signals.inc(834,15): warning: comparison of integers of different signs: 'int' and 'unsigned int' [-Wsign-compare]
  if (RetCode == (0xE0000000 | EX_IOERR))
      ~~~~~~~ ^   ~~~~~~~~~~~~~~~~~~~~~
1 warning generated.```

llvm/lib/Support/Windows/Signals.inc

index 4bf699f..cb82f55 100644 (file)
@@ -830,7 +830,7 @@ void sys::CleanupOnSignal(uintptr_t Context) {
   //
   // 0xE0000000 is combined with the return code in the exception raised in
   // CrashRecoveryContext::HandleExit().
-  int RetCode = (int)EP->ExceptionRecord->ExceptionCode;
+  unsigned RetCode = EP->ExceptionRecord->ExceptionCode;
   if (RetCode == (0xE0000000 | EX_IOERR))
     return;
   LLVMUnhandledExceptionFilter(EP);