summaryrefslogtreecommitdiff
path: root/test/COFF/thinlto.ll
diff options
context:
space:
mode:
Diffstat (limited to 'test/COFF/thinlto.ll')
-rw-r--r--test/COFF/thinlto.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/COFF/thinlto.ll b/test/COFF/thinlto.ll
new file mode 100644
index 000000000000..11b689d6327e
--- /dev/null
+++ b/test/COFF/thinlto.ll
@@ -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()