<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 23, 2015 at 10:22 PM, Craig Topper via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: ctopper<br>
Date: Tue Nov 24 00:22:43 2015<br>
New Revision: 253955<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=253955&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=253955&view=rev</a><br>
Log:<br>
[TableGen] Use array_pod_sort. NFC<br>
<br>
Modified:<br>
llvm/trunk/utils/TableGen/CodeGenTarget.cpp<br>
<br>
Modified: llvm/trunk/utils/TableGen/CodeGenTarget.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=253955&r1=253954&r2=253955&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenTarget.cpp?rev=253955&r1=253954&r2=253955&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/utils/TableGen/CodeGenTarget.cpp (original)<br>
+++ llvm/trunk/utils/TableGen/CodeGenTarget.cpp Tue Nov 24 00:22:43 2015<br>
@@ -217,7 +217,8 @@ CodeGenRegBank &CodeGenTarget::getRegBan<br>
<br>
void CodeGenTarget::ReadRegAltNameIndices() const {<br>
RegAltNameIndices = Records.getAllDerivedDefinitions("RegAltNameIndex");<br>
- std::sort(RegAltNameIndices.begin(), RegAltNameIndices.end(), LessRecord());<br>
+ array_pod_sort(RegAltNameIndices.begin(), RegAltNameIndices.end(),<br>
+ LessRecord());<br>
}<br></blockquote><div><br></div><div>array_pod_sort with an explicit comparator takes a qsort-like comparator, so this is probably not behaving as intended.</div><div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
/// getRegisterByName - If there is a register with the specific AsmName,<br>
@@ -253,7 +254,7 @@ void CodeGenTarget::ReadLegalValueTypes(<br>
LegalValueTypes.insert(LegalValueTypes.end(), RC.VTs.begin(), RC.VTs.end());<br>
<br>
// Remove duplicates.<br>
- std::sort(LegalValueTypes.begin(), LegalValueTypes.end());<br>
+ array_pod_sort(LegalValueTypes.begin(), LegalValueTypes.end());<br>
LegalValueTypes.erase(std::unique(LegalValueTypes.begin(),<br>
LegalValueTypes.end()),<br>
LegalValueTypes.end());<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div><br></div></div>