HomePhabricator

Fix implicit fall through compiler warning. NFCI.

Authored by RKSimon on Jun 6 2021, 5:45 AM.

Description

Fix implicit fall through compiler warning. NFCI.

Details

Event Timeline

Herald added a subscriber: Restricted Project. · View Herald TranscriptJun 6 2021, 6:17 AM

This appears to change behavior - any chance of test coverage?

@dblaikie Not as far as I can work out - from what I can tell the integer types should have been legalized at that point, but preventing the implicit fall-through appeases compilers/analyzers and guarantees that we end up with a fatal error instead of a float dereference.

This appears to change behavior - any chance of test coverage?

@dblaikie Not as far as I can work out - from what I can tell the integer types should have been legalized at that point, but preventing the implicit fall-through appeases compilers/analyzers and guarantees that we end up with a fatal error instead of a float dereference.

Looks like llvm_unreachable might be more appropriate here? Since the fully covered switch (assuming that's what you mean by legalize - that the only values for the bit width should be the 8, 16, 32, 64 covered by the switch) above returns from every case?