[lld] r296042 - [COFF] added test for thinlto

Bob Haarman via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 23 15:42:24 PST 2017


Author: inglorion
Date: Thu Feb 23 17:42:24 2017
New Revision: 296042

URL: http://llvm.org/viewvc/llvm-project?rev=296042&view=rev
Log:
[COFF] added test for thinlto

Summary: Creates bitcode files suitable for use with ThinLTO, then checks that the linker can build an executable from them.

Reviewers: ruiu, pcc

Reviewed By: pcc

Subscribers: mehdi_amini, Prazek, llvm-commits

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

Added:
    lld/trunk/test/COFF/thinlto.ll

Added: lld/trunk/test/COFF/thinlto.ll
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/test/COFF/thinlto.ll?rev=296042&view=auto
==============================================================================
--- lld/trunk/test/COFF/thinlto.ll (added)
+++ lld/trunk/test/COFF/thinlto.ll Thu Feb 23 17:42:24 2017
@@ -0,0 +1,18 @@
+; RUN: rm -fr %T/thinlto
+; RUN: mkdir %T/thinlto
+; RUN: opt -thinlto-bc -o %T/thinlto/main.obj %s
+; RUN: opt -thinlto-bc -o %T/thinlto/foo.obj %S/Inputs/lto-dep.ll
+; RUN: lld-link /lldsavetemps /out:%T/thinlto/main.exe /entry:main /subsystem:console %T/thinlto/main.obj %T/thinlto/foo.obj
+; RUN: llvm-nm %T/thinlto/main.exe.lto.obj | FileCheck %s
+
+; CHECK-NOT: U foo
+
+target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
+target triple = "x86_64-pc-windows-msvc"
+
+define i32 @main() {
+  call void @foo()
+  ret i32 0
+}
+
+declare void @foo()




More information about the llvm-commits mailing list