1 ; RUN: llvm-as %s -o %t1.o
2 ; RUN: llvm-as %p/Inputs/alias-alias-1.ll -o %t2.o
3 ; RUN: llvm-lto2 run -o %t3.o %t1.o %t2.o -r %t2.o,a, -r %t2.o,d,px -r %t1.o,a,p -r %t1.o,c,p -r %t1.o,b -save-temps
4 ; RUN: llvm-dis < %t3.o.0.0.preopt.bc -o - | FileCheck %s
5 ; RUN: FileCheck --check-prefix=RES %s < %t3.o.resolution.txt
8 ; CHECK: @c = global i32 1
9 ; CHECK-NEXT: @d = global i32* @a
11 ; CHECK-NEXT: @a = weak alias i32, i32* @b
12 ; CHECK-NEXT: @b = internal alias i32, i32* @c
15 ; RES-NEXT: {{^}}-r={{.*}}1.o,c,p{{$}}
16 ; RES-NEXT: {{^}}-r={{.*}}1.o,a,p{{$}}
17 ; RES-NEXT: {{^}}-r={{.*}}1.o,b,{{$}}
19 ; RES-NEXT: {{^}}-r={{.*}}2.o,a,{{$}}
20 ; RES-NEXT: {{^}}-r={{.*}}2.o,d,px{{$}}
22 target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
23 target triple = "x86_64-unknown-linux-gnu"
25 @a = weak alias i32, i32* @b
26 @b = alias i32, i32* @c