[compiler-rt] Silence warning with MSVC 19.38 (Visual Studio 2022 17.8.3)

This fixes:
```
C:\git\llvm-project\compiler-rt\lib\orc\coff_platform.cpp(512): warning C4189: 'JDState': local variable is initialized but not referenced
```
This commit is contained in:
Alexandre Ganea 2024-01-02 18:03:34 -05:00
parent c5bbf40d98
commit 63a3c4cc85

View File

@ -509,7 +509,6 @@ Error COFFPlatformRuntimeState::deregisterObjectSections(
<< HeaderAddr.getValue(); << HeaderAddr.getValue();
return make_error<StringError>(ErrStream.str()); return make_error<StringError>(ErrStream.str());
} }
auto &JDState = I->second;
for (auto &KV : Secs) { for (auto &KV : Secs) {
if (auto Err = deregisterBlockRange(HeaderAddr, KV.second)) if (auto Err = deregisterBlockRange(HeaderAddr, KV.second))
return Err; return Err;
@ -687,7 +686,14 @@ struct ThrowInfo {
ORC_RT_INTERFACE void __stdcall __orc_rt_coff_cxx_throw_exception( ORC_RT_INTERFACE void __stdcall __orc_rt_coff_cxx_throw_exception(
void *pExceptionObject, ThrowInfo *pThrowInfo) { void *pExceptionObject, ThrowInfo *pThrowInfo) {
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wmultichar"
#endif
constexpr uint32_t EH_EXCEPTION_NUMBER = 'msc' | 0xE0000000; constexpr uint32_t EH_EXCEPTION_NUMBER = 'msc' | 0xE0000000;
#ifdef __clang__
#pragma clang diagnostic pop
#endif
constexpr uint32_t EH_MAGIC_NUMBER1 = 0x19930520; constexpr uint32_t EH_MAGIC_NUMBER1 = 0x19930520;
auto BaseAddr = COFFPlatformRuntimeState::get().findJITDylibBaseByPC( auto BaseAddr = COFFPlatformRuntimeState::get().findJITDylibBaseByPC(
reinterpret_cast<uint64_t>(pThrowInfo)); reinterpret_cast<uint64_t>(pThrowInfo));