[PATCH] D26130: [ELF] - Implemented --symbol-ordering-file option.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 08:44:52 PST 2016


grimar added inline comments.


================
Comment at: ELF/SymbolListFile.cpp:66
+  unsigned I = 0;
+  SmallVector<StringRef, 32> Arr;
+  MB.getBuffer().split(Arr, '\n');
----------------
rafael wrote:
> I would probably just use 0 instead of 32. This will not be small in any interesting case.
Done.


================
Comment at: ELF/Writer.cpp:668
+        continue;
+      SectionsOrder.insert({D->Section, It->second});
+    }
----------------
rafael wrote:
> In case two symbols point to the same section, we probably want the first one to win. This means that this should probably use the minimum.
Right. It used minimum when had one more "crazy" loop outsize, but after switching to DenseMap this logic gone accidentally. Fixed.


https://reviews.llvm.org/D26130





More information about the llvm-commits mailing list