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