<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=""><div class="">The simplest and least fragile way to test this is to make a small pass like the AAEvaluator that just runs ProvenanceAnalysis::related on all values in the function and just prints out a bool value. Then you could just use FileCheck to check that the query was successful.</div><div class=""><br class=""></div>The other way is to try and create a specific sequence of instructions that hopefully will show by how the ARC optimizer moves a release that the query is correct.<br class=""><div class=""><br class=""></div><div class="">That is more fragile and probably harder to suss out exactly.</div><div class=""><br class=""></div><div class="">If you want to do the latter I think I can come up with a sequence, but really the former is the *right* thing to do.</div><div class=""><br class=""></div><div class="">Michael</div><div class=""><br class=""><div class=""><div><blockquote type="cite" class=""><div class="">On Nov 10, 2014, at 7:05 PM, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" class="">dexonsmith@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><span 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; float: none; display: inline !important;" class="">+mgottesman: any idea how to test this?</span><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=""><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=""><blockquote type="cite" 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="">On 2014-Nov-10, at 14:08, Rafael EspĂ­ndola <<a href="mailto:rafael.espindola@gmail.com" class="">rafael.espindola@gmail.com</a>> wrote:<br class=""><br class="">Private variables are can be renamed, so it is not reliable to make<br class="">decisions on the name.<br class=""><br class="">The name is also dropped by the assembler before getting to the<br class="">linker, so using the name causes a disconnect between how llvm makes a<br class="">decision (var name) and how the linker makes a decision (section it is<br class="">in).<br class=""><br class="">The attached patch changes one case where we were looking at the<br class="">variable name to use the section instead.<br class=""><br class="">I don't know what this arc pass is doing, so I am not sure how to test it.<br class=""><br class="">Cheers,<br class="">Rafael<br class=""><t.patch>_______________________________________________<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" class="">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a></blockquote></div></blockquote></div><br class=""></div></div></body></html>