1 ; RUN: opt -module-summary %s -o %t1.o
2 ; RUN: opt -module-summary %p/Inputs/common_thinlto.ll -o %t2.o
4 ; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
5 ; RUN: --plugin-opt=save-temps \
6 ; RUN: --plugin-opt=thinlto \
8 ; RUN: -shared %t1.o %t2.o -o %t3
10 ; RUN: llvm-dis %t1.o.2.internalize.bc -o - | FileCheck %s --check-prefix=INTERNALIZE
11 ; We should not have internalized P, and it should still be common.
12 ; INTERNALIZE: @P = common global
14 ; RUN: llvm-dis %t1.o.4.opt.bc -o - | FileCheck %s --check-prefix=OPT
15 ; bar should still exist (if we had internalized P it would look dead).
18 ; RUN: llvm-nm %t3 | FileCheck %s --check-prefix=NM
21 source_filename = "common1.c"
22 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
23 target triple = "x86_64-unknown-linux-gnu"
25 @P = common global i8* (...)* null, align 8
29 store i8* (...)* bitcast (i8* ()* @bar to i8* (...)*), i8* (...)** @P, align 8
30 %call = call i32 (...) @foo()
36 define internal i8* @bar() {