1; RUN: opt -module-summary %s -o %t1.o 2; RUN: opt -module-summary -o %t2.o %S/Inputs/not-prevailing.ll 3; RUN: llvm-lto2 run -o %t3.o %t1.o %t2.o -r %t1.o,foo,x -r %t1.o,zed,px -r %t1.o,bar,x \ 4; RUN: -r %t2.o,bar,x -save-temps 5 6; Check that 'foo' and 'bar' were not inlined. 7; CHECK: <zed>: 8; CHECK-NEXT: {{.*}} pushq %rbx 9; CHECK-NEXT: {{.*}} callq 0x6 <zed+0x6> 10; CHECK-NEXT: {{.*}} movl %eax, %ebx 11; CHECK-NEXT: {{.*}} callq 0xd <zed+0xd> 12; CHECK-NEXT: {{.*}} movl %ebx, %eax 13; CHECK-NEXT: {{.*}} popq %rbx 14; CHECK-NEXT: {{.*}} retq 15 16; RUN: llvm-objdump -d %t3.o.1 | FileCheck %s 17; RUN: llvm-readelf --symbols %t3.o.1 | FileCheck %s --check-prefix=SYMBOLS 18 19; Check that 'foo' and 'bar' produced as undefined. 20; SYMBOLS: NOTYPE GLOBAL DEFAULT UND bar 21; SYMBOLS: NOTYPE GLOBAL DEFAULT UND foo 22; SYMBOLS: FUNC GLOBAL DEFAULT 2 zed 23 24target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" 25target triple = "x86_64-unknown-linux-gnu" 26 27$foo = comdat any 28define weak i32 @foo() comdat { 29 ret i32 65 30} 31 32declare void @bar() 33 34define i32 @zed() { 35 %1 = tail call i32 @foo() 36 call void @bar() 37 ret i32 %1 38} 39