Skip to content

Commit 78fbba9

Browse files
committed
[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. ```
1 parent 12c4be1 commit 78fbba9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

compiler-rt/lib/interception/interception_win.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -743,6 +743,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
743743
case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX]
744744
if (rel_offset)
745745
*rel_offset = 2;
746+
FALLTHROUGH;
746747
case 0xB841: // 41 B8 XX XX XX XX : mov r8d, XX XX XX XX
747748
return 6;
748749

0 commit comments

Comments
 (0)