No that’s fine, only makes sense to use it if it fits naturally. As long as you tried. Lgtm as is<br><div class="gmail_quote"><div dir="ltr">On Tue, Aug 7, 2018 at 2:11 PM Stella Stamenova via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">stella.stamenova added a comment.<br>
<br>
In <a href="https://reviews.llvm.org/D50397#1191201" rel="noreferrer" target="_blank">https://reviews.llvm.org/D50397#1191201</a>, @zturner wrote:<br>
<br>
> We have a function somewhere in lit utils that does this, but I’m OOO so I<br>
> can’t look for it. Can you try to find it?<br>
<br>
<br>
You are thinking of to_string in util.py. I could use it here, but the code in Test.py explicitly ignores any errors from the encode/decode calls while to_string raises an exception when it fails to encode. I could modify to_string to take an optional parameter to determine whether to raise an exception instead of having some of the same functionality in Test.py.<br>
<br>
<br>
Repository:<br>
rL LLVM<br>
<br>
<a href="https://reviews.llvm.org/D50397" rel="noreferrer" target="_blank">https://reviews.llvm.org/D50397</a><br>
<br>
<br>
<br>
</blockquote></div>