1; REQUIRES: x86 2 3; Test to ensure that thinlto-index-only with lto-obj-path creates 4; the native object file. 5; RUN: opt -module-summary %s -o %t1.obj 6; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.obj 7; RUN: rm -f %t4.obj 8; RUN: lld-link -thinlto-index-only -lto-obj-path:%t4.obj -out:t3.exe \ 9; RUN: -entry:main %t1.obj %t2.obj 10; RUN: llvm-readobj -h %t4.obj | FileCheck %s 11; RUN: llvm-nm %t4.obj 2>&1 | FileCheck %s -check-prefix=SYMBOLS 12; RUN: llvm-nm %t4.obj 2>&1 | count 1 13 14;; Ensure lld emits empty combined module if specific obj-path. 15; RUN: rm -fr %t.dir/objpath && mkdir -p %t.dir/objpath 16; RUN: lld-link /out:%t.dir/objpath/a.exe -lto-obj-path:%t4.obj \ 17; RUN: -entry:main %t1.obj %t2.obj -lldsavetemps 18; RUN: ls %t.dir/objpath/a.exe.lto.* | count 3 19 20;; Ensure lld does not emit empty combined module in default. 21; RUN: rm -fr %t.dir/objpath && mkdir -p %t.dir/objpath 22; RUN: lld-link /out:%t.dir/objpath/a.exe \ 23; RUN: -entry:main %t1.obj %t2.obj -lldsavetemps 24; RUN: ls %t.dir/objpath/a.exe.lto.* | count 2 25 26; CHECK: Format: COFF-x86-64 27; SYMBOLS: @feat.00 28 29target datalayout = "e-m:w-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 30target triple = "x86_64-pc-windows-msvc19.0.24215" 31 32declare void @g(...) 33 34define void @main() { 35 call void (...) @g() 36 ret void 37} 38