From fc787ecd91127b2c8458afd94e5148e2ae51a1f5 Mon Sep 17 00:00:00 2001 From: Ian Rogers Date: Thu, 9 Oct 2014 21:56:44 -0700 Subject: Enable -Wimplicit-fallthrough. Falling through switch cases on a clang build must now annotate the fallthrough with the FALLTHROUGH_INTENDED macro. Bug: 17731372 Change-Id: I836451cd5f96b01d1ababdbf9eef677fe8fa8324 --- compiler/dex/quick/gen_invoke.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'compiler/dex/quick/gen_invoke.cc') diff --git a/compiler/dex/quick/gen_invoke.cc b/compiler/dex/quick/gen_invoke.cc index 408c73d1b0..2bef7c53c5 100755 --- a/compiler/dex/quick/gen_invoke.cc +++ b/compiler/dex/quick/gen_invoke.cc @@ -552,7 +552,8 @@ static int NextSDCallInsn(CompilationUnit* cu, CallInfo* info, } else { break; } - // Intentional fallthrough for x86 + DCHECK(cu->instruction_set == kX86 || cu->instruction_set == kX86_64); + FALLTHROUGH_INTENDED; default: return -1; } @@ -596,7 +597,8 @@ static int NextVCallInsn(CompilationUnit* cu, CallInfo* info, if (CommonCallCodeLoadCodePointerIntoInvokeTgt(info, nullptr, cu, cg)) { break; // kInvokeTgt := kArg0->entrypoint } - // Intentional fallthrough for X86 + DCHECK(cu->instruction_set == kX86 || cu->instruction_set == kX86_64); + FALLTHROUGH_INTENDED; default: return -1; } @@ -641,7 +643,8 @@ static int NextInterfaceCallInsn(CompilationUnit* cu, CallInfo* info, int state, if (CommonCallCodeLoadCodePointerIntoInvokeTgt(info, nullptr, cu, cg)) { break; // kInvokeTgt := kArg0->entrypoint } - // Intentional fallthrough for X86 + DCHECK(cu->instruction_set == kX86 || cu->instruction_set == kX86_64); + FALLTHROUGH_INTENDED; default: return -1; } -- cgit v1.2.3-59-g8ed1b