1; REQUIRES: x86
2
3; RUN: opt -thinlto-bc %s -o %t1.obj
4; RUN: opt -thinlto-bc %p/Inputs/thinlto.ll -o %t2.obj
5
6; Ensure module re-ordering in LTO::runThinLTO does not affect the processing order.
7
8; RUN: lld-link -thinlto-index-only:%t3 /entry:main %t1.obj %t2.obj
9; RUN: cat %t3 | FileCheck %s --check-prefix=NORMAL
10; NORMAL: thinlto-module-order.ll.tmp1.o
11; NORMAL: thinlto-module-order.ll.tmp2.o
12
13; RUN: lld-link -thinlto-index-only:%t3 /entry:main %t2.obj %t1.obj
14; RUN: cat %t3 | FileCheck %s --check-prefix=REVERSED
15; REVERSED: thinlto-module-order.ll.tmp2.o
16; REVERSED: thinlto-module-order.ll.tmp1.o
17
18target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
19target triple = "x86_64-pc-windows-msvc19.0.24215"
20
21declare void @g(...)
22
23define void @main() {
24  call void (...) @g()
25  ret void
26}
27