[lld] r332128 - Splitting thinlto.ll test file and renaming other test files.

Rumeet Dhindsa via llvm-commits llvm-commits at lists.llvm.org
Fri May 11 12:37:08 PDT 2018


Author: rdhindsa
Date: Fri May 11 12:37:08 2018
New Revision: 332128

URL: http://llvm.org/viewvc/llvm-project?rev=332128&view=rev
Log:
Splitting thinlto.ll test file and renaming other test files.

Differential Revision: https://reviews.llvm.org/D46731


Added:
    lld/trunk/test/ELF/lto/thinlto-cant-write-index.ll
    lld/trunk/test/ELF/lto/thinlto-emit-imports.ll
    lld/trunk/test/ELF/lto/thinlto-index-file.ll
    lld/trunk/test/ELF/lto/thinlto-index-only.ll
    lld/trunk/test/ELF/lto/thinlto-no-index.ll
    lld/trunk/test/ELF/lto/thinlto-obj-path.ll
    lld/trunk/test/ELF/lto/thinlto-prefix-replace.ll
Removed:
    lld/trunk/test/ELF/lto/thinlto_emit_imports.ll
    lld/trunk/test/ELF/lto/thinlto_prefix_replace.ll
Modified:
    lld/trunk/test/ELF/lto/thinlto.ll

Added: lld/trunk/test/ELF/lto/thinlto-cant-write-index.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-cant-write-index.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-cant-write-index.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-cant-write-index.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,23 @@
+; REQUIRES: x86
+
+; Basic ThinLTO tests.
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+
+; Ensure lld generates error if unable to write to index files
+; RUN: rm -f %t2.o.thinlto.bc
+; RUN: touch %t2.o.thinlto.bc
+; RUN: chmod 400 %t2.o.thinlto.bc
+; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3 2>&1 | FileCheck %s
+; CHECK: cannot open {{.*}}2.o.thinlto.bc: {{P|p}}ermission denied
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-emit-imports.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-emit-imports.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-emit-imports.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-emit-imports.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,55 @@
+; REQUIRES: x86
+
+; Generate summary sections and test lld handling.
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+
+; Include a file with an empty module summary index, to ensure that the expected
+; output files are created regardless, for a distributed build system.
+; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o
+
+; Ensure lld generates imports files if requested for distributed backends.
+; RUN: rm -f %t3.o.imports %t3.o.thinlto.bc
+; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4
+
+; The imports file for this module contains the bitcode file for
+; Inputs/thinlto.ll
+; RUN: cat %t1.o.imports | count 1
+; RUN: cat %t1.o.imports | FileCheck %s --check-prefix=IMPORTS1
+; IMPORTS1: thinlto-emit-imports.ll.tmp2.o
+
+; The imports file for Input/thinlto.ll is empty as it does not import anything.
+; RUN: cat %t2.o.imports | count 0
+
+; The imports file for Input/thinlto_empty.ll is empty but should exist.
+; RUN: cat %t3.o.imports | count 0
+
+; The index file should be created even for the input with an empty summary.
+; RUN: ls %t3.o.thinlto.bc
+
+; Ensure lld generates error if unable to write to imports file.
+; RUN: rm -f %t3.o.imports
+; RUN: touch %t3.o.imports
+; RUN: chmod 400 %t3.o.imports
+; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4 2>&1 | FileCheck %s --check-prefix=ERR
+; ERR: cannot open {{.*}}3.o.imports: {{P|p}}ermission denied
+
+; Ensure lld doesn't generate import files when thinlto-index-only is not enabled
+; RUN: rm -f %t1.o.imports
+; RUN: rm -f %t2.o.imports
+; RUN: rm -f %t3.o.imports
+; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-emit-imports-files -shared %t1.o %t2.o %t3.o -o %t4
+; RUN: not ls %t1.o.imports
+; RUN: not ls %t2.o.imports
+; RUN: not ls %t3.o.imports
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-index-file.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-index-file.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-index-file.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-index-file.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,24 @@
+; REQUIRES: x86
+
+; Basic ThinLTO tests.
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o
+
+; Ensure lld writes linked files to linked objects file
+; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only=%t.idx -shared %t1.o %t2.o %t3.o -o %t4
+; RUN: FileCheck %s < %t.idx
+; CHECK: {{.*}}thinlto-index-file.ll.tmp1.o
+; CHECK: {{.*}}thinlto-index-file.ll.tmp2.o
+; CHECK: {{.*}}thinlto-index-file.ll.tmp3.o
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-index-only.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-index-only.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-index-only.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-index-only.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,69 @@
+; REQUIRES: x86
+
+; First ensure that the ThinLTO handling in lld handles
+; bitcode without summary sections gracefully and generates index file.
+; RUN: llvm-as %s -o %t1.o
+; RUN: llvm-as %p/Inputs/thinlto.ll -o %t2.o
+; RUN: rm -f %t3
+; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t3
+; RUN: ls %t2.o.thinlto.bc
+; RUN: not test -e %t3
+; RUN: ld.lld -m elf_x86_64 -shared %t.o %t2.o -o %t3
+; RUN: llvm-nm %t3 | FileCheck %s --check-prefix=NM
+
+; Basic ThinLTO tests.
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o
+
+; Ensure lld generates an index and not a binary if requested.
+; RUN: rm -f %t4
+; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t2.o -o %t4
+; RUN: llvm-bcanalyzer -dump %t1.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
+; RUN: llvm-bcanalyzer -dump %t2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2
+; RUN: not test -e %t4
+
+; Ensure lld generates an index even if the file is wrapped in --start-lib/--end-lib
+; RUN: rm -f %t2.o.thinlto.bc
+; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t1.o %t3.o --start-lib %t2.o --end-lib -o %t
+; RUN: ls %t2.o.thinlto.bc
+
+; NM: T f
+
+; 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-index-only.ll.tmp{{.*}}.o'
+; BACKEND1-NEXT: <ENTRY {{.*}} record string = '{{.*}}thinlto-index-only.ll.tmp{{.*}}.o'
+; BACKEND1-NEXT: </MODULE_STRTAB_BLOCK
+; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK
+; BACKEND1: <VERSION
+; BACKEND1: <FLAGS
+; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
+; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
+; BACKEND1: <COMBINED
+; BACKEND1: <COMBINED
+; BACKEND1: </GLOBALVAL_SUMMARY_BLOCK
+
+; 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-index-only.ll.tmp2.o'
+; BACKEND2-NEXT: </MODULE_STRTAB_BLOCK
+; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK
+; BACKEND2-NEXT: <VERSION
+; BACKEND2-NEXT: <FLAGS
+; BACKEND2-NEXT: <VALUE_GUID op0=1 op1=-5300342847281564238
+; BACKEND2-NEXT: <COMBINED
+; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-no-index.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-no-index.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-no-index.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-no-index.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,24 @@
+; REQUIRES: x86
+
+; Basic ThinLTO tests.
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o
+
+; Ensure lld doesn't generates index files when thinlto-index-only is not enabled
+; RUN: rm -f %t1.o.thinlto.bc %t2.o.thinlto.bc %t3.o.thinlto.bc
+; RUN: ld.lld -m elf_x86_64 -shared %t1.o %t2.o %t3.o -o %t4
+; RUN: not ls %t1.o.thinlto.bc
+; RUN: not ls %t2.o.thinlto.bc
+; RUN: not ls %t3.o.thinlto.bc
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-obj-path.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-obj-path.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-obj-path.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-obj-path.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,23 @@
+; REQUIRES: x86
+
+; RUN: opt -module-summary %s -o %t1.o
+; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
+
+; Test to ensure that thinlto-index-only with obj-path creates the file.
+; RUN: rm -f %t4.o
+; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=obj-path=%t4.o -shared %t1.o %t2.o -o %t3
+; RUN: llvm-readobj -h %t4.o | FileCheck %s
+; RUN: llvm-nm %t4.o | count 0
+
+; CHECK: Format: ELF64-x86-64
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+declare void @g(...)
+
+define void @f() {
+entry:
+  call void (...) @g()
+  ret void
+}

Added: lld/trunk/test/ELF/lto/thinlto-prefix-replace.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto-prefix-replace.ll?rev=332128&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-prefix-replace.ll (added)
+++ lld/trunk/test/ELF/lto/thinlto-prefix-replace.ll Fri May 11 12:37:08 2018
@@ -0,0 +1,23 @@
+; REQUIRES: x86
+; Check that changing the output path via thinlto-prefix-replace works
+; RUN: mkdir -p %t/oldpath
+; RUN: opt -module-summary %s -o %t/oldpath/thinlto_prefix_replace.o
+
+; Ensure that there is no existing file at the new path, so we properly
+; test the creation of the new file there.
+; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
+; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace
+; RUN: ls %t/newpath/thinlto_prefix_replace.o.thinlto.bc
+
+; Ensure that lld generates error if prefix replace option does not have 'old;new' format
+; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
+; RUN: not ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-prefix-replace=abc:def -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace 2>&1 | FileCheck %s --check-prefix=ERR
+; ERR: thinlto-prefix-replace expects 'old;new' format, but got abc:def
+
+target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-unknown-linux-gnu"
+
+define void @f() {
+entry:
+  ret void
+}

Modified: lld/trunk/test/ELF/lto/thinlto.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto.ll?rev=332128&r1=332127&r2=332128&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto.ll Fri May 11 12:37:08 2018
@@ -1,109 +1,28 @@
 ; REQUIRES: x86
 
-; First ensure that the ThinLTO handling in lld handles
-; bitcode without summary sections gracefully and generates index file.
-; RUN: llvm-as %s -o %t.o
-; RUN: llvm-as %p/Inputs/thinlto.ll -o %t2.o
-; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t.o %t2.o -o %t3
-; RUN: ls %t2.o.thinlto.bc
-; RUN: not test -e %t3
-; RUN: ld.lld -m elf_x86_64 -shared %t.o %t2.o -o %t4
-; RUN: llvm-nm %t4 | FileCheck %s --check-prefix=NM
-
 ; Basic ThinLTO tests.
-; RUN: opt -module-summary %s -o %t.o
+; RUN: opt -module-summary %s -o %t1.o
 ; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
-; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t4.o
-
-; Ensure lld generates an index and not a binary if requested.
-; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t.o %t2.o -o %t3
-; RUN: llvm-bcanalyzer -dump %t.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND1
-; RUN: llvm-bcanalyzer -dump %t2.o.thinlto.bc | FileCheck %s --check-prefix=BACKEND2
-; RUN: not test -e %t3
-
-; Ensure lld generates an index even if the file is wrapped in --start-lib/--end-lib
-; RUN: rm -f %t2.o.thinlto.bc
-; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t.o %t4.o --start-lib %t2.o --end-lib -o %t5
-; RUN: ls %t2.o.thinlto.bc
-
-; Ensure lld writes linked files to linked objects file
-; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only=%tlinkedobjfile -shared %t.o %t2.o %t4.o -o %t5
-; RUN: cat %tlinkedobjfile 2>&1 | FileCheck %s --check-prefix=IN1
-; IN1: {{.*}}thinlto.ll.tmp.o
-; IN1-NEXT: {{.*}}thinlto.ll.tmp2.o
-; IN1-NEXT: {{.*}}thinlto.ll.tmp4.o
-
-; Ensure lld generates error if unable to write to index file
-; RUN: rm -f %t4.o.thinlto.bc
-; RUN: touch %t4.o.thinlto.bc
-; RUN: chmod 400 %t4.o.thinlto.bc
-; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only -shared %t.o %t4.o -o %t5 2>&1 | FileCheck %s --check-prefix=ERR
-; ERR: cannot open {{.*}}4.o.thinlto.bc: {{P|p}}ermission denied
-
-; Ensure lld doesn't generates index files when thinlto-index-only is not enabled
-; RUN: rm -f %t.o.thinlto.bc
-; RUN: rm -f %t2.o.thinlto.bc
-; RUN: rm -f %t4.o.thinlto.bc
-; RUN: ld.lld -m elf_x86_64 -shared %t.o %t2.o %t4.o -o %t5
-; RUN: not ls %t.o.thinlto.bc
-; RUN: not ls %t2.o.thinlto.bc
-; RUN: not ls %t4.o.thinlto.bc
 
 ; First force single-threaded mode
-; RUN: rm -f %t.lto.o %t1.lto.o
-; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t.o %t2.o -o %t
-; RUN: llvm-nm %t1.lto.o | FileCheck %s --check-prefix=NM1
-; RUN: llvm-nm %t2.lto.o | FileCheck %s --check-prefix=NM2
+; RUN: rm -f %t31.lto.o %t32.lto.o
+; RUN: ld.lld -save-temps --thinlto-jobs=1 -shared %t1.o %t2.o -o %t3
+; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
+; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
 
 ; Next force multi-threaded mode
-; RUN: rm -f %t2.lto.o %t21.lto.o
-; RUN: ld.lld -save-temps --thinlto-jobs=2 -shared %t.o %t2.o -o %t2
-; RUN: llvm-nm %t21.lto.o | FileCheck %s --check-prefix=NM1
-; RUN: llvm-nm %t22.lto.o | FileCheck %s --check-prefix=NM2
+; RUN: rm -f %t31.lto.o %t32.lto.o
+; RUN: ld.lld -save-temps --thinlto-jobs=2 -shared %t1.o %t2.o -o %t3
+; RUN: llvm-nm %t31.lto.o | FileCheck %s --check-prefix=NM1
+; RUN: llvm-nm %t32.lto.o | FileCheck %s --check-prefix=NM2
 
 ; Then check without --thinlto-jobs (which currently default to hardware_concurrency)
 ; We just check that we don't crash or fail (as it's not sure which tests are
 ; stable on the final output file itself.
-; RUN: ld.lld -shared %t.o %t2.o -o %t2
+; RUN: ld.lld -shared %t1.o %t2.o -o %t2
 
-; Test to ensure that thinlto-index-only with obj-path creates the file.
-; RUN: rm -f %t5.o
-; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=obj-path=%t5.o -shared %t.o %t2.o -o %t4
-; RUN: llvm-readobj -h %t5.o | FileCheck %s --check-prefix=FORMAT
-; RUN: llvm-nm %t5.o | count 0
-
-; NM: T f
 ; NM1: T f
-; NM1-NOT: U g
 ; NM2: T g
-; FORMAT: Format: ELF64-x86-64
-
-; 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: </MODULE_STRTAB_BLOCK
-; BACKEND1: <GLOBALVAL_SUMMARY_BLOCK
-; BACKEND1: <VERSION
-; BACKEND1: <FLAGS
-; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
-; BACKEND1: <VALUE_GUID op0={{1|2}} op1={{-3706093650706652785|-5300342847281564238}}
-; BACKEND1: <COMBINED
-; BACKEND1: <COMBINED
-; BACKEND1: </GLOBALVAL_SUMMARY_BLOCK
-
-; 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: </MODULE_STRTAB_BLOCK
-; BACKEND2-NEXT: <GLOBALVAL_SUMMARY_BLOCK
-; BACKEND2-NEXT: <VERSION
-; BACKEND2-NEXT: <FLAGS
-; BACKEND2-NEXT: <VALUE_GUID op0=1 op1=-5300342847281564238
-; BACKEND2-NEXT: <COMBINED
-; BACKEND2-NEXT: </GLOBALVAL_SUMMARY_BLOCK
 
 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
 target triple = "x86_64-unknown-linux-gnu"

Removed: lld/trunk/test/ELF/lto/thinlto_emit_imports.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto_emit_imports.ll?rev=332127&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto_emit_imports.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto_emit_imports.ll (removed)
@@ -1,55 +0,0 @@
-; REQUIRES: x86
-
-; Generate summary sections and test lld handling.
-; RUN: opt -module-summary %s -o %t.o
-; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
-
-; Include a file with an empty module summary index, to ensure that the expected
-; output files are created regardless, for a distributed build system.
-; RUN: opt -module-summary %p/Inputs/thinlto_empty.ll -o %t3.o
-
-; Ensure lld generates imports files if requested for distributed backends.
-; RUN: rm -f %t3.o.imports %t3.o.thinlto.bc
-; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t.o %t2.o %t3.o -o %t4
-
-; The imports file for this module contains the bitcode file for
-; Inputs/thinlto.ll
-; RUN: cat %t.o.imports | count 1
-; RUN: cat %t.o.imports | FileCheck %s --check-prefix=IMPORTS1
-; IMPORTS1: thinlto_emit_imports.ll.tmp2.o
-
-; The imports file for Input/thinlto.ll is empty as it does not import anything.
-; RUN: cat %t2.o.imports | count 0
-
-; The imports file for Input/thinlto_empty.ll is empty but should exist.
-; RUN: cat %t3.o.imports | count 0
-
-; The index file should be created even for the input with an empty summary.
-; RUN: ls %t3.o.thinlto.bc
-
-; Ensure lld generates error if unable to write to imports file.
-; RUN: rm -f %t3.o.imports
-; RUN: touch %t3.o.imports
-; RUN: chmod 400 %t3.o.imports
-; RUN: not ld.lld -m elf_x86_64 --plugin-opt=thinlto-index-only --plugin-opt=thinlto-emit-imports-files -shared %t.o %t2.o %t3.o -o %t4 2>&1 | FileCheck %s --check-prefix=ERR
-; ERR: cannot open {{.*}}3.o.imports: {{P|p}}ermission denied
-
-; Ensure lld doesn't generate import files when thinlto-index-only is not enabled
-; RUN: rm -f %t.o.imports
-; RUN: rm -f %t2.o.imports
-; RUN: rm -f %t3.o.imports
-; RUN: ld.lld -m elf_x86_64 --plugin-opt=thinlto-emit-imports-files -shared %t.o %t2.o %t3.o -o %t4
-; RUN: not ls %t.o.imports
-; RUN: not ls %t2.o.imports
-; RUN: not ls %t4.o.imports
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-declare void @g(...)
-
-define void @f() {
-entry:
-  call void (...) @g()
-  ret void
-}

Removed: lld/trunk/test/ELF/lto/thinlto_prefix_replace.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/ELF/lto/thinlto_prefix_replace.ll?rev=332127&view=auto
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto_prefix_replace.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto_prefix_replace.ll (removed)
@@ -1,23 +0,0 @@
-; REQUIRES: x86
-; Check that changing the output path via thinlto-prefix-replace works
-; RUN: mkdir -p %t/oldpath
-; RUN: opt -module-summary %s -o %t/oldpath/thinlto_prefix_replace.o
-
-; Ensure that there is no existing file at the new path, so we properly
-; test the creation of the new file there.
-; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
-; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-prefix-replace="%t/oldpath/;%t/newpath/" -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace
-; RUN: ls %t/newpath/thinlto_prefix_replace.o.thinlto.bc
-
-; Ensure that lld generates error if prefix replace option does not have 'old;new' format
-; RUN: rm -f %t/newpath/thinlto_prefix_replace.o.thinlto.bc
-; RUN: not ld.lld --plugin-opt=thinlto-index-only --plugin-opt=thinlto-prefix-replace=abc:def -shared %t/oldpath/thinlto_prefix_replace.o -o %t/thinlto_prefix_replace 2>&1 | FileCheck %s --check-prefix=ERR
-; ERR: thinlto-prefix-replace expects 'old;new' format, but got abc:def
-
-target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
-target triple = "x86_64-unknown-linux-gnu"
-
-define void @f() {
-entry:
-  ret void
-}




More information about the llvm-commits mailing list