<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Mar 22, 2015 at 6:38 AM, Simon Pilgrim <span dir="ltr"><<a href="mailto:llvm-dev@redking.me.uk" target="_blank">llvm-dev@redking.me.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: rksimon<br>
Date: Sun Mar 22 08:38:36 2015<br>
New Revision: 232913<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=232913&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=232913&view=rev</a><br>
Log:<br>
Fixed MSVC compile warning issue introduced in r232837<br>
<br>
- was reporting 'warning C4715: 'getType32' : not all control paths return a value'<br>
<br>
Modified:<br>
llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp?rev=232913&r1=232912&r2=232913&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp?rev=232913&r1=232912&r2=232913&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp (original)<br>
+++ llvm/trunk/lib/Target/X86/MCTargetDesc/X86ELFObjectWriter.cpp Sun Mar 22 08:38:36 2015<br>
@@ -164,7 +164,8 @@ enum X86_32RelType { RT32_32, RT32_16, R<br>
<br>
static X86_32RelType getType32(X86_64RelType T) {<br>
switch (T) {<br>
- case RT64_64:<br>
+ default:<br></blockquote><div><br></div><div>This switch was fully covered. The coding standard recommends not to have default cases for fully covered switches: <a href="http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations">http://llvm.org/docs/CodingStandards.html#don-t-use-default-labels-in-fully-covered-switches-over-enumerations</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
+ //case RT64_64:<br></blockquote><div><br></div><div>Please avoid commenting out code. This can be confusing to those who revisit the code later.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
llvm_unreachable("Unimplemented");<br>
case RT64_32:<br>
case RT64_32S:<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>