[llvm] r295799 - Fix -Wcovered-switch-default.
Sean Silva via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 21 23:01:53 PST 2017
Usually we put the unreachable outside the switch:
http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations
On Tue, Feb 21, 2017 at 5:01 PM, Rui Ueyama via llvm-commits <
llvm-commits at lists.llvm.org> wrote:
> Author: ruiu
> Date: Tue Feb 21 19:01:45 2017
> New Revision: 295799
>
> URL: http://llvm.org/viewvc/llvm-project?rev=295799&view=rev
> Log:
> Fix -Wcovered-switch-default.
>
> Modified:
> llvm/trunk/lib/Object/ArchiveWriter.cpp
>
> Modified: llvm/trunk/lib/Object/ArchiveWriter.cpp
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Object/
> ArchiveWriter.cpp?rev=295799&r1=295798&r2=295799&view=diff
> ============================================================
> ==================
> --- llvm/trunk/lib/Object/ArchiveWriter.cpp (original)
> +++ llvm/trunk/lib/Object/ArchiveWriter.cpp Tue Feb 21 19:01:45 2017
> @@ -129,9 +129,7 @@ static bool isBSDLike(object::Archive::K
> case object::Archive::K_BSD:
> case object::Archive::K_DARWIN:
> return true;
> - case object::Archive::K_MIPS64:
> - case object::Archive::K_DARWIN64:
> - case object::Archive::K_COFF:
> + default:
> llvm_unreachable("not supported for writting");
> }
> }
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170221/051ec4e9/attachment.html>
More information about the llvm-commits
mailing list