[PATCH] D46304: [MC] Add llvm_unreachable to toString to fix compile time warning.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 1 04:17:26 PDT 2018


andreadb accepted this revision.
andreadb added a comment.
This revision is now accepted and ready to land.

Your approach is better.

Adding a default case is not a good workaround because it introduces another warning:

/Users/buildslave/as-bldslv9/lld-x86_64-darwin13/llvm.src/lib/MC/WasmObjectWriter.cpp:50:3: error: default label in switch which covers all enumeration values [-Werror,-Wcovered-switch-default]

  default:
  ^

Can you push your patch to fix the buildbots?

Cheers,
Andrea


https://reviews.llvm.org/D46304





More information about the llvm-commits mailing list