1*304d0d55SRumeet Dhindsa; REQUIRES: x86
2*304d0d55SRumeet Dhindsa
3*304d0d55SRumeet Dhindsa; RUN: opt -module-summary %s -o %t1.o
4*304d0d55SRumeet Dhindsa; RUN: opt -module-summary %p/Inputs/thinlto.ll -o %t2.o
5*304d0d55SRumeet Dhindsa
6*304d0d55SRumeet Dhindsa; Test to ensure that thinlto-index-only with obj-path creates the file.
7*304d0d55SRumeet Dhindsa; RUN: rm -f %t4.o
8*304d0d55SRumeet Dhindsa; RUN: ld.lld --plugin-opt=thinlto-index-only --plugin-opt=obj-path=%t4.o -shared %t1.o %t2.o -o %t3
9*304d0d55SRumeet Dhindsa; RUN: llvm-readobj -h %t4.o | FileCheck %s
10*304d0d55SRumeet Dhindsa; RUN: llvm-nm %t4.o | count 0
11*304d0d55SRumeet Dhindsa
12*304d0d55SRumeet Dhindsa; CHECK: Format: ELF64-x86-64
13*304d0d55SRumeet Dhindsa
14*304d0d55SRumeet Dhindsatarget datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
15*304d0d55SRumeet Dhindsatarget triple = "x86_64-unknown-linux-gnu"
16*304d0d55SRumeet Dhindsa
17*304d0d55SRumeet Dhindsadeclare void @g(...)
18*304d0d55SRumeet Dhindsa
19*304d0d55SRumeet Dhindsadefine void @f() {
20*304d0d55SRumeet Dhindsaentry:
21*304d0d55SRumeet Dhindsa  call void (...) @g()
22*304d0d55SRumeet Dhindsa  ret void
23*304d0d55SRumeet Dhindsa}
24