diff options
author | Alexandre Ganea <aganea@havenstudios.com> | 2024-07-05 20:46:55 -0400 |
---|---|---|
committer | Alexandre Ganea <aganea@havenstudios.com> | 2024-07-05 20:49:40 -0400 |
commit | 10e1b935e5d9017067207d62ababa733df088ecd (patch) | |
tree | 1a32e28ec20b495eecc61680b0118942ec5c735e | |
parent | 593f708118aef792f434185547f74fedeaf51dd4 (diff) | |
download | llvm-10e1b935e5d9017067207d62ababa733df088ecd.zip llvm-10e1b935e5d9017067207d62ababa733df088ecd.tar.gz llvm-10e1b935e5d9017067207d62ababa733df088ecd.tar.bz2 |
[compiler-rt] Silence function cast warning when building with Clang ToT targetting Windows
-rw-r--r-- | compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp | 9 | ||||
-rw-r--r-- | compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp | 9 |
2 files changed, 18 insertions, 0 deletions
diff --git a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp index db80eb3..24ea82a 100644 --- a/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerUtilWindows.cpp @@ -238,6 +238,11 @@ size_t PageSize() { return PageSizeCached; } +#if defined(__clang__) +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +#endif + void SetThreadName(std::thread &thread, const std::string &name) { typedef HRESULT(WINAPI * proc)(HANDLE, PCWSTR); HMODULE kbase = GetModuleHandleA("KernelBase.dll"); @@ -255,6 +260,10 @@ void SetThreadName(std::thread &thread, const std::string &name) { } } +#if defined(__clang__) +#pragma clang diagnostic pop +#endif + } // namespace fuzzer #endif // LIBFUZZER_WINDOWS diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp index aae3e76..a7ffe0e4 100644 --- a/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp +++ b/compiler-rt/lib/sanitizer_common/sanitizer_symbolizer_win.cpp @@ -55,6 +55,11 @@ bool TrySymInitialize() { } // namespace +# if defined(__clang__) +# pragma clang diagnostic push +# pragma clang diagnostic ignored "-Wcast-function-type-mismatch" +# endif + // Initializes DbgHelp library, if it's not yet initialized. Calls to this // function should be synchronized with respect to other calls to DbgHelp API // (e.g. from WinSymbolizerTool). @@ -133,6 +138,10 @@ void InitializeDbgHelpIfNeeded() { } } +# if defined(__clang__) +# pragma clang diagnostic pop +# endif + bool WinSymbolizerTool::SymbolizePC(uptr addr, SymbolizedStack *frame) { InitializeDbgHelpIfNeeded(); |