brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.0 KiB · 38013f7 Raw
40 lines · plain
1; RUN: opt -module-summary %s -o %t1.o2; RUN: opt -module-summary %p/Inputs/common_thinlto.ll -o %t2.o3 4; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \5; RUN:    --plugin-opt=save-temps \6; RUN:    --plugin-opt=thinlto \7; RUN:    -m elf_x86_64 \8; RUN:    -shared %t1.o %t2.o -o %t39 10; RUN: llvm-dis %t1.o.2.internalize.bc -o - | FileCheck %s --check-prefix=INTERNALIZE11; We should not have internalized P, and it should still be common.12; INTERNALIZE: @P = common global13 14; RUN: llvm-dis %t1.o.4.opt.bc -o - | FileCheck %s --check-prefix=OPT15; bar should still exist (if we had internalized P it would look dead).16; OPT: @bar17 18; RUN: llvm-nm %t3 | FileCheck %s --check-prefix=NM19; NM: bar20 21source_filename = "common1.c"22target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"23target triple = "x86_64-unknown-linux-gnu"24 25@P = common global ptr null, align 826 27define i32 @main() {28entry:29  store ptr @bar, ptr @P, align 830  %call = call i32 (...) @foo()31  ret i32 032}33 34declare i32 @foo(...)35 36define internal ptr @bar() {37entry:38  ret ptr null39}40