<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Dec 31, 2014 at 7:57 AM, Colin LeMahieu <span dir="ltr"><<a href="mailto:colinl@codeaurora.org" target="_blank">colinl@codeaurora.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: colinl<br>
Date: Wed Dec 31 09:57:38 2014<br>
New Revision: 225043<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=225043&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=225043&view=rev</a><br>
Log:<br>
[Hexagon] Changing an llvm_unreachable to an assertion and returning 0.  Relocations aren't implemented yet but we don't need to abort for this in release builds.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp<br>
<br>
Modified: llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp?rev=225043&r1=225042&r2=225043&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp?rev=225043&r1=225042&r2=225043&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp (original)<br>
+++ llvm/trunk/lib/Target/Hexagon/MCTargetDesc/HexagonMCCodeEmitter.cpp Wed Dec 31 09:57:38 2014<br>
@@ -71,7 +71,8 @@ HexagonMCCodeEmitter::getMachineOpValue(<br>
     return MCT.getRegisterInfo()->getEncodingValue(MO.getReg());<br>
   if (MO.isImm())<br>
     return static_cast<unsigned>(MO.getImm());<br>
-  llvm_unreachable("Only Immediates and Registers implemented right now");<br>
+  assert(false && "Only Immediates and Registers implemented right now");<br>
+  return 0;<br></blockquote><div><br></div><div>Pretty sure this isn't something idiomatic in LLVM - that return 0 is an untested codepath & so not one we'd want to support. Either remove the assertion & test the codepath (even if the test is just "we don't process the relocation" with a FIXME saying we should - the test should fail when the code is fixed here, so it's easy to locate the test case to update) in all build modes, or leave the llvm_unreachable.<br><br>(at least I'm fairly sure that's the right thing to do)<br><br>- David</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 }<br>
<br>
 MCSubtargetInfo const &HexagonMCCodeEmitter::getSubtargetInfo() const {<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>