[lld] r336342 - [ELF] - Test LLD creates empty .imports file.

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 5 05:23:37 PDT 2018


Author: grimar
Date: Thu Jul  5 05:23:37 2018
New Revision: 336342

URL: http://llvm.org/viewvc/llvm-project?rev=336342&view=rev
Log:
[ELF] - Test LLD creates empty .imports file.

This covers the following code line with a test:
https://github.com/llvm-mirror/lld/blob/master/ELF/LTO.cpp#L213

After that, coverage of LTO.cpp is 100%.

Modified:
    lld/trunk/test/ELF/lto/thinlto-index-only.ll

Modified: 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=336342&r1=336341&r2=336342&view=diff
==============================================================================
--- lld/trunk/test/ELF/lto/thinlto-index-only.ll (original)
+++ lld/trunk/test/ELF/lto/thinlto-index-only.ll Thu Jul  5 05:23:37 2018
@@ -30,9 +30,13 @@
 ; RUN: not test -e %t4
 
 ; Test that LLD generates an empty index even for lazy object file that is not added to link.
-; RUN: rm -f %t1.o.thinlto.bc %t3
-; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t2.o --start-lib %t1.o --end-lib -o %t3
+; Test LLD generates empty imports file either because of thinlto-emit-imports-files option.
+; RUN: rm -f %t1.o.thinlto.bc
+; RUN: rm -f %t1.o.imports
+; RUN: ld.lld --plugin-opt=thinlto-index-only -shared %t2.o --start-lib %t1.o --end-lib \
+; RUN: --plugin-opt=thinlto-emit-imports-files -o %t3
 ; RUN: ls %t1.o.thinlto.bc
+; RUN: ls %t1.o.imports
 
 ; Ensure lld generates an error if unable to write an empty index file
 ; for lazy object file that is not added to link.




More information about the llvm-commits mailing list