[PATCH] D46372: Update ThinLTO test

Rumeet Dhindsa via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 2 17:22:49 PDT 2018


rdhindsa created this revision.
Herald added subscribers: llvm-commits, eraman, arichardson, inglorion, emaste.
Herald added a reviewer: espindola.

Updated thinLTO test to not include forward or backward slash for testing. (It was erroring out on windows)
Added code to not generate empty index files only if thinlto-index-only option is turned on.


Repository:
  rLLD LLVM Linker

https://reviews.llvm.org/D46372

Files:
  lld/ELF/LTO.cpp
  lld/test/ELF/lto/thinlto.ll


Index: lld/test/ELF/lto/thinlto.ll
===================================================================
--- lld/test/ELF/lto/thinlto.ll
+++ lld/test/ELF/lto/thinlto.ll
@@ -58,8 +58,8 @@
 ; The backend index for this module contains summaries from itself and
 ; Inputs/thinlto.ll, as it imports from the latter.
 ; BACKEND1: <MODULE_STRTAB_BLOCK
-; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}/thinlto.ll.tmp{{.*}}.o'
-; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}/thinlto.ll.tmp{{.*}}.o'
+; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
+; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp{{.*}}.o'
 ; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK
 ; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK
 ; BACKEND1: <VERSION
@@ -73,7 +73,7 @@
 ; The backend index for Input/thinlto.ll contains summaries from itself only,
 ; as it does not import anything.
 ; BACKEND2: <MODULE_STRTAB_BLOCK
-; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}/thinlto.ll.tmp2.o'
+; BACKEND2-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto.ll.tmp2.o'
 ; BACKEND2-NEXT: </MODULE_STRTAB_BLOCK
 ; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK
 ; BACKEND2-NEXT: <VERSION
Index: lld/ELF/LTO.cpp
===================================================================
--- lld/ELF/LTO.cpp
+++ lld/ELF/LTO.cpp
@@ -196,7 +196,9 @@
   std::tie(OldPrefix, NewPrefix) = Config->ThinLTOPrefixReplace.split(';');
 
   // Create the empty files which, if indexed, will be overwritten later.
-  writeEmptyDistributedBuildOutputs(Obj.getName(), OldPrefix, NewPrefix, false);
+  if (Config->ThinLTOIndexOnly)
+    writeEmptyDistributedBuildOutputs(Obj.getName(), OldPrefix, NewPrefix,
+                                      false);
 
   unsigned SymNum = 0;
   std::vector<Symbol *> Syms = F.getSymbols();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46372.144958.patch
Type: text/x-patch
Size: 1804 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180503/fe67f797/attachment.bin>


More information about the llvm-commits mailing list