2019-04-16 03:48:32 +08:00
|
|
|
; REQUIRES: x86
|
|
|
|
; RUN: rm -fr %t
|
|
|
|
; RUN: mkdir %t %t/a %t/b
|
|
|
|
; RUN: opt -thinlto-bc -o %t/main.obj %s
|
|
|
|
; RUN: opt -thinlto-bc -o %t/a/bar.obj %S/Inputs/lto-dep.ll
|
|
|
|
; RUN: opt -thinlto-bc -o %t/b/bar.obj %S/Inputs/bar.ll
|
|
|
|
; RUN: llvm-ar crs %t/libbar.lib %t/a/bar.obj %t/b/bar.obj
|
|
|
|
; RUN: lld-link -out:%t/main.exe -entry:main -lldsavetemps \
|
|
|
|
; RUN: -subsystem:console %t/main.obj %t/libbar.lib
|
|
|
|
; RUN: FileCheck %s < %t/main.exe.resolution.txt
|
|
|
|
|
2019-04-16 05:43:28 +08:00
|
|
|
; CHECK: {{/|\\\\thinlto-archivecollision.ll.tmp/main.obj$}}
|
|
|
|
; CHECK: {{^-r=.*/|\\\\thinlto-archivecollision.ll.tmp/main.obj,main,px$}}
|
|
|
|
; CHECK: {{/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+$}}
|
|
|
|
; CHECK-NEXT: {{^-r=.*/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+,foo,p$}}
|
|
|
|
; CHECK-NEXT: {{/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+$}}
|
|
|
|
; CHECK-NEXT: {{^-r=.*/|\\\\thinlto-archivecollision.ll.tmp/libbar.libbar.obj[0-9]+,bar,p$}}
|
2019-04-16 03:48:32 +08:00
|
|
|
|
2019-08-28 09:08:54 +08:00
|
|
|
target datalayout = "e-m:w-i64:64-f80:128-n8:16:32:64-S128"
|
2019-04-16 03:48:32 +08:00
|
|
|
target triple = "x86_64-pc-windows-msvc"
|
|
|
|
|
|
|
|
declare void @bar()
|
|
|
|
declare void @foo()
|
|
|
|
|
|
|
|
define i32 @main() {
|
|
|
|
call void @foo()
|
|
|
|
call void @bar()
|
|
|
|
ret i32 0
|
|
|
|
}
|