[PATCH] D46592: Always append a job # to a --save-temps file if there are more than one task.
Rui Ueyama via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 8 11:04:06 PDT 2018
ruiu created this revision.
ruiu added a reviewer: pcc.
Herald added subscribers: arichardson, emaste.
Herald added a reviewer: espindola.
It is a bit nitpicking, but I think the new naming scheme is what the
people would expect. For example, if we have three tasks,
foo0.lto.o
foo1.lto.o
foo2.lto.o
is more natural than
foo.lto.o
foo1.lto.o
foo2.lto.o
(But do we need this logic in the first place? I thought that we could
just always append a job number even when there's only one job.)
https://reviews.llvm.org/D46592
Files:
lld/ELF/LTO.cpp
lld/test/ELF/lto/parallel-internalize.ll
lld/test/ELF/lto/parallel.ll
Index: lld/test/ELF/lto/parallel.ll
===================================================================
--- lld/test/ELF/lto/parallel.ll
+++ lld/test/ELF/lto/parallel.ll
@@ -2,7 +2,7 @@
; RUN: llvm-as -o %t.bc %s
; RUN: rm -f %t.lto.o %t1.lto.o
; RUN: ld.lld -m elf_x86_64 --lto-partitions=2 -save-temps -o %t %t.bc -shared
-; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s
+; RUN: llvm-nm %t0.lto.o | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
Index: lld/test/ELF/lto/parallel-internalize.ll
===================================================================
--- lld/test/ELF/lto/parallel-internalize.ll
+++ lld/test/ELF/lto/parallel-internalize.ll
@@ -4,7 +4,7 @@
; RUN: ld.lld -m elf_x86_64 --lto-partitions=2 -save-temps -o %t %t.bc \
; RUN: -e foo --lto-O0
; RUN: llvm-readobj -t -dyn-symbols %t | FileCheck %s
-; RUN: llvm-nm %t.lto.o | FileCheck --check-prefix=CHECK0 %s
+; RUN: llvm-nm %t0.lto.o | FileCheck --check-prefix=CHECK0 %s
; RUN: llvm-nm %t1.lto.o | FileCheck --check-prefix=CHECK1 %s
; CHECK: Symbols [
Index: lld/ELF/LTO.cpp
===================================================================
--- lld/ELF/LTO.cpp
+++ lld/ELF/LTO.cpp
@@ -256,7 +256,7 @@
if (Buff[I].empty())
continue;
if (Config->SaveTemps) {
- if (I == 0)
+ if (MaxTasks == 1)
saveBuffer(Buff[I], Config->OutputFile + ".lto.o");
else
saveBuffer(Buff[I], Config->OutputFile + Twine(I) + ".lto.o");
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46592.145733.patch
Type: text/x-patch
Size: 1584 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180508/0237a0e5/attachment-0001.bin>
More information about the llvm-commits
mailing list