brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 90f9d6f Raw
38 lines · plain
1; RUN: llvm-link %s %S/Inputs/alias.ll -S -o - | FileCheck --check-prefix=C1 %s2; RUN: llvm-link %S/Inputs/alias.ll %s -S -o - | FileCheck --check-prefix=C2 %s3 4; FIXME:5; The C1 direction is incorrect.6; When moving an alias to an existing module and we want to discard the aliasee7; (the C2 case), the IRMover knows to copy the aliasee as internal.8; When moving a replacement to an aliasee to a module that has an alias (C1),9; a replace all uses with blindly changes the alias.10; The C1 case doesn't happen when using a system linker with a plugin because11; the linker does full symbol resolution first.12; Given that this is a problem only with llvm-link and its 1 module at a time13; linking, it should probably learn to changes the aliases in the destination14; before using the IRMover.15 16@foo = weak global i32 017; C1-DAG: @foo = alias i32, ptr @zed18; C2-DAG: @foo = alias i32, ptr @zed19 20@bar = alias i32, ptr @foo21; C1-DAG: @bar = alias i32, ptr @foo22 23; C2-DAG: @foo.1 = internal global i32 024; C2-DAG: @bar = alias i32, ptr @foo.125 26@foo2 = weak global i32 027; C1-DAG: @foo2 = alias i16, ptr @zed28; C2-DAG: @foo2 = alias i16, ptr @zed29 30@bar2 = alias i32, ptr @foo231; C1-DAG: @bar2 = alias i32, ptr @foo232 33; C2-DAG: @foo2.2 = internal global i32 034; C2-DAG: @bar2 = alias i32, ptr @foo2.235 36; C1-DAG: @zed = global i32 4237; C2-DAG: @zed = global i32 4238