Ok, just a suggestion.  If it’s being iterated over it may not be safe to change.  Lgtm otherwise <br><div class="gmail_quote"><div dir="ltr">On Mon, Nov 20, 2017 at 1:15 AM George Rimar 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">grimar added a comment.<br>
<br>
I just realized that I do not know if ordering is important or not. I know almost nothing about TableGen.<br>
Some code iterates over std::map returned, but it does not automatially means ordering is really important.<br>
<br>
And some code just applies sorting by itself (<a href="https://github.com/llvm-mirror/llvm/blob/master/utils/TableGen/CTagsEmitter.cpp#L65" rel="noreferrer" target="_blank">https://github.com/llvm-mirror/llvm/blob/master/utils/TableGen/CTagsEmitter.cpp#L65</a>):<br>
<br>
  for (const auto &C : Classes)<br>
    Tags.push_back(Tag(C->getName(), locate(C)));<br>
  for (const auto &D : Defs)<br>
    Tags.push_back(Tag(D->getName(), locate(D)));<br>
  std::sort(Tags.begin(), Tags.end());<br>
<br>
My earlier suggested approach (<a href="https://reviews.llvm.org/D40239" rel="noreferrer" target="_blank">https://reviews.llvm.org/D40239</a>) also changes ordering to insertion order, what may be excessive (if we do not need ordering)<br>
or incorrect (if we need sorted order and not just any fixed order), so I now don't think it was good idea to suggest.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D40170" rel="noreferrer" target="_blank">https://reviews.llvm.org/D40170</a><br>
<br>
<br>
<br>
</blockquote></div>