[PATCH] D30277: [COFF] added test for thinlto

Bob Haarman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 16:15:58 PST 2017


inglorion updated this revision to Diff 89440.
inglorion edited the summary of this revision.
inglorion added a comment.

@pcc: How is this instead?


https://reviews.llvm.org/D30277

Files:
  test/COFF/thinlto.ll


Index: test/COFF/thinlto.ll
===================================================================
--- /dev/null
+++ test/COFF/thinlto.ll
@@ -0,0 +1,25 @@
+; 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-dis %T/thinlto/main.obj.5.precodegen.bc
+; RUN: FileCheck -check-prefix=MAIN %s < %T/thinlto/main.obj.5.precodegen.ll
+; RUN: llvm-dis %T/thinlto/foo.obj.5.precodegen.bc
+; RUN: FileCheck -check-prefix=FOO %s < %T/thinlto/foo.obj.5.precodegen.ll
+
+; MAIN: define i32 @main(
+; MAIN-NOT: @foo
+
+; FOO: define void @foo(
+; FOO-NOT: define {{.*}} @internal(
+
+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()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30277.89440.patch
Type: text/x-patch
Size: 1005 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170223/6426630b/attachment.bin>


More information about the llvm-commits mailing list