[llvm] [NFC][MC] Use `llvm_unreachable` for unreachable case (PR #152930)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 11 09:31:03 PDT 2025
================
@@ -72,7 +72,7 @@ static void emitCATTR(raw_ostream &OS, StringRef Name, GOFF::ESDRmode Rmode,
OS << "64";
break;
case GOFF::ESD_RMODE_None:
- break;
+ llvm_unreachable("GOFF::ESD_RMODE_None should not be handled here");
----------------
MaskRay wrote:
I would move `GOFF::ESD_RMODE_None:` above to make it clear that this case has already been handled and use an empty llvm_unreachable as it's obvious.
https://github.com/llvm/llvm-project/pull/152930
More information about the llvm-commits
mailing list