brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.5 KiB · 8eda805 Raw
38 lines · plain
1; RUN: opt -module-summary %s -o %t.o2; RUN: opt -module-summary %p/Inputs/thinlto_alias.ll -o %t2.o3 4; Ensure that a preempted weak symbol that is linked in as a local5; copy is handled properly. Specifically, the local copy will be promoted,6; and internalization should be able to use the original non-promoted7; name to locate the summary (otherwise internalization will abort because8; it expects to locate summaries for all definitions).9; Note that gold picks the first copy of weakfunc() as the prevailing one,10; so listing %t2.o first is sufficient to ensure that this copy is11; preempted.12; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \13; RUN:     --plugin-opt=thinlto \14; RUN:     --plugin-opt=save-temps \15; RUN:     -o %t3.o %t2.o %t.o16; RUN: llvm-nm %t3.o | FileCheck %s17; RUN: llvm-dis %t.o.4.opt.bc -o - | FileCheck --check-prefix=OPT %s18; RUN: llvm-dis %t2.o.4.opt.bc -o - | FileCheck --check-prefix=OPT2 %s19 20; This does not currently pass because the gold plugin now uses the21; combined summary rather than the IRMover to change the module's linkage22; during the ThinLTO backend. The internalization step implemented by IRMover23; for preempted symbols has not yet been implemented for the combined summary.24; XFAIL: *25 26; CHECK-NOT: U f27; OPT: define hidden void @weakfunc.llvm.0()28; OPT2: define weak void @weakfunc()29 30target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"31target triple = "x86_64-unknown-linux-gnu"32 33@weakfuncAlias = alias void (...), @weakfunc34define weak void @weakfunc() {35entry:36  ret void37}38