<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On May 29, 2015, at 10:59 AM, David Blaikie <<a href="mailto:dblaikie@gmail.com" class="">dblaikie@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><br class="Apple-interchange-newline"><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">On Fri, May 29, 2015 at 10:19 AM, Pete Cooper<span class="Apple-converted-space"> </span><span dir="ltr" class=""><<a href="mailto:peter_cooper@apple.com" target="_blank" class="">peter_cooper@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br class=""><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: pete<br class="">Date: Fri May 29 12:19:11 2015<br class="">New Revision: 238579<br class=""><br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D238579-26view-3Drev&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=2goU0rsq0jb8Iak-WAhku3mu8e_OEb9Y7lnUmkOgt1E&s=hBYQYeFnOh1YyjcmzYCShn0U2LCMPZqQLGhHja0LmeI&e=" target="_blank" class="">http://llvm.org/viewvc/llvm-project?rev=238579&view=rev</a><br class="">Log:<br class="">Fix crash in MCExpr::print.<br class=""><br class="">Symbols are no longer required to be named, but this leads to a crash here if an<br class="">unnamed symbol checks that its first character is '$'.<br class=""><br class="">Change the code to first check for a name, then check its first character.<br class=""><br class="">No test case i'm afraid as this is debugging code, but any test case with temp labels<br class="">and 'llc --debug --filetype=obj' would have crashed.<br class=""></blockquote><div class=""><br class="">I think I missed a step - why wouldn't we have a test that does that? (llc --debug --filetype=obj)?<br class=""></div></div></div></blockquote>I guess we could, I just didn’t think we tended to have tests that do --debug.  I’ve got no problem adding it if you want.</div><div><br class=""></div><div>Cheers,</div><div>Pete<br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_quote" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div class=""> </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;"><br class="">Modified:<br class="">   <span class="Apple-converted-space"> </span>llvm/trunk/lib/MC/MCExpr.cpp<br class=""><br class="">Modified: llvm/trunk/lib/MC/MCExpr.cpp<br class="">URL:<span class="Apple-converted-space"> </span><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__llvm.org_viewvc_llvm-2Dproject_llvm_trunk_lib_MC_MCExpr.cpp-3Frev-3D238579-26r1-3D238578-26r2-3D238579-26view-3Ddiff&d=AwMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=mQ4LZ2PUj9hpadE3cDHZnIdEwhEBrbAstXeMaFoB9tg&m=2goU0rsq0jb8Iak-WAhku3mu8e_OEb9Y7lnUmkOgt1E&s=HbjLpXGmjYn8E9gzGQSOfasjJabstpccQvA6t1duAnE&e=" target="_blank" class="">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/MCExpr.cpp?rev=238579&r1=238578&r2=238579&view=diff</a><br class="">==============================================================================<br class="">--- llvm/trunk/lib/MC/MCExpr.cpp (original)<br class="">+++ llvm/trunk/lib/MC/MCExpr.cpp Fri May 29 12:19:11 2015<br class="">@@ -43,7 +43,7 @@ void MCExpr::print(raw_ostream &OS) cons<br class="">     const MCSymbol &Sym = SRE.getSymbol();<br class="">     // Parenthesize names that start with $ so that they don't look like<br class="">     // absolute names.<br class="">-    bool UseParens = Sym.getName()[0] == '$';<br class="">+    bool UseParens = !Sym.getName().empty() && Sym.getName()[0] == '$';<br class="">     if (UseParens)<br class="">       OS << '(' << Sym << ')';<br class="">     else<br class=""><br class=""><br class="">_______________________________________________<br class="">llvm-commits mailing list<br class=""><a href="mailto:llvm-commits@cs.uiuc.edu" class="">llvm-commits@cs.uiuc.edu</a><br class=""><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></div></blockquote></div><br class=""></body></html>