[compiler-rt] 78fbba9 - [compiler-rt] On Windows, silence warning when building with Clang ToT
Alexandre Ganea via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 11 14:51:03 PDT 2025
Author: Alexandre Ganea
Date: 2025-04-11T17:50:15-04:00
New Revision: 78fbba992188c60f0f06267ca013e52db19b8c67
URL: https://github.com/llvm/llvm-project/commit/78fbba992188c60f0f06267ca013e52db19b8c67
DIFF: https://github.com/llvm/llvm-project/commit/78fbba992188c60f0f06267ca013e52db19b8c67.diff
LOG: [compiler-rt] On Windows, silence warning when building with Clang ToT
Fixes:
```
[6113/7139] Building CXX object projects\compiler-rt\lib\interception\CMakeFiles\RTInterception.x86_64.dir\interception_win.cpp.obj
C:\git\llvm-project\compiler-rt\lib\interception\interception_win.cpp(746,5): warning: unannotated fall-through between switch labels [-Wimplicit-fallthrough]
746 | case 0xB841: // 41 B8 XX XX XX XX : mov r8d, XX XX XX XX
| ^
C:\git\llvm-project\compiler-rt\lib\interception\interception_win.cpp(746,5): note: insert 'FALLTHROUGH;' to silence this warning
746 | case 0xB841: // 41 B8 XX XX XX XX : mov r8d, XX XX XX XX
| ^
| FALLTHROUGH;
C:\git\llvm-project\compiler-rt\lib\interception\interception_win.cpp(746,5): note: insert 'break;' to avoid fall-through
746 | case 0xB841: // 41 B8 XX XX XX XX : mov r8d, XX XX XX XX
| ^
| break;
1 warning generated.
```
Added:
Modified:
compiler-rt/lib/interception/interception_win.cpp
Removed:
################################################################################
diff --git a/compiler-rt/lib/interception/interception_win.cpp b/compiler-rt/lib/interception/interception_win.cpp
index b2974cf1934fb..c9a77180014c4 100644
--- a/compiler-rt/lib/interception/interception_win.cpp
+++ b/compiler-rt/lib/interception/interception_win.cpp
@@ -743,6 +743,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX]
if (rel_offset)
*rel_offset = 2;
+ FALLTHROUGH;
case 0xB841: // 41 B8 XX XX XX XX : mov r8d, XX XX XX XX
return 6;
More information about the llvm-commits
mailing list