<div dir="ltr">How about NoSort? That way the enum represents what is written is the script file.<div><br></div><div>Cheers,</div><div>Rafael</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On 15 September 2016 at 14:27, George Rimar <span dir="ltr"><<a href="mailto:grimar@accesssoftek.com" target="_blank">grimar@accesssoftek.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">grimar added inline comments.<br>
<span class=""><br>
================<br>
Comment at: ELF/LinkerScript.cpp:970-972<br>
@@ -969,3 +969,5 @@<br>
     return SortByAlignment;<br>
+  if (skip("SORT_NONE"))<br>
+    return SortDisabled;<br>
   return SortNone;<br>
 }<br>
----------------<br>
</span><span class="">ruiu wrote:<br>
> grimar wrote:<br>
> > ruiu wrote:<br>
> > > This naming scheme is confusing. SORT_NONE is mapped to SortDisabled, and SortNone doesn't mean SORT_NONE?<br>
> > Yes, a bit confusing, but according to documentation SORT_NONE is used to _disable_ sorting. A agree that probably better to map it to SortNone, but what is better name for absence of sorting (which is none) ? SortEmpty probably ?<br>
> I don't know. Null, Empty, Void, Dont, etc... Nothing feels right. I thought about it for a few minutes but didn't come up with a good name. Maybe just return 0?<br>
</span>It is probably a bit strange to return 0 when we have enum. Also problem is that we use the code like that:<br>
<br>
```<br>
    if (Cmd->SortInner)<br>
      std::stable_sort(V.begin(), V.end(), getComparator(Cmd->SortInner))<wbr>;<br>
    if (Cmd->SortOuter)<br>
      std::stable_sort(V.begin(), V.end(), getComparator(Cmd->SortOuter))<wbr>;<br>
```<br>
<br>
So in that case for this to work we will need to modify start value of enum:<br>
<br>
```<br>
enum SortKind { SortDisabled = 1, SortByName, SortByAlignment };<br>
```<br>
<br>
What is not very beautiful IMO. I`ll think more about that.<br>
<br>
<br>
<a href="https://reviews.llvm.org/D24604" rel="noreferrer" target="_blank">https://reviews.llvm.org/<wbr>D24604</a><br>
<br>
<br>
<br>
</blockquote></div><br></div>