[llvm-commits] [llvm] r147867 - /llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
Chandler Carruth
chandlerc at google.com
Tue Jan 10 11:30:38 PST 2012
On Tue, Jan 10, 2012 at 11:10 AM, Richard Smith
<richard-llvm at metafoo.co.uk>wrote:
> Author: rsmith
> Date: Tue Jan 10 13:10:22 2012
> New Revision: 147867
>
> URL: http://llvm.org/viewvc/llvm-project?rev=147867&view=rev
> Log:
> Fix a -Wreturn-type warning in g++.
> Modified:
> llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
>
> Modified: llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h?rev=147867&r1=147866&r2=147867&view=diff
>
> ==============================================================================
> --- llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h (original)
> +++ llvm/trunk/lib/Target/ARM/MCTargetDesc/ARMBaseInfo.h Tue Jan 10
> 13:10:22 2012
> @@ -67,6 +67,7 @@
>
> inline static const char *ARMCondCodeToString(ARMCC::CondCodes CC) {
> switch (CC) {
> + default: llvm_unreachable("Unknown condition code");
>
If the enumeration is fully covered, please put the llvm_unreachable after
the switch and don't add a default. We're trying to get to a point where we
can more effectively use the compiler warnings about non-covering switches.
> case ARMCC::EQ: return "eq";
> case ARMCC::NE: return "ne";
> case ARMCC::HS: return "hs";
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120110/1b4db557/attachment.html>
More information about the llvm-commits
mailing list