[PATCH] D24492: [LTO] Switch to the new resolution-based API.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 28 10:43:28 PDT 2016


pcc added inline comments.

================
Comment at: lld/ELF/LTO.cpp:150
@@ +149,3 @@
+  unsigned MaxTasks = LtoObj->getMaxTasks();
+  std::vector<SmallString<128>> Filenames(MaxTasks);
+  Buff.resize(MaxTasks);
----------------
ruiu wrote:
> Filenames is not a large vector, so please use std::string for simplicity.
Once you make the change below, `Filenames` will be unused and you can remove it.

================
Comment at: lld/ELF/LTO.cpp:166
@@ +165,3 @@
+  for (unsigned I = 0; I != MaxTasks; ++I) {
+    if (!Filenames[I].empty()) {
+      // Do we want to move this to the LTO API?
----------------
This could be `if (!Buff[I].empty())`, then you can make this a for-range loop.


https://reviews.llvm.org/D24492





More information about the llvm-commits mailing list