• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llvm-as %s -o %t.o
2; RUN: llvm-as %p/Inputs/resolve-to-alias.ll -o %t2.o
3
4; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
5; RUN:    --plugin-opt=emit-llvm \
6; RUN:    -shared %t.o %t2.o -o %t.bc
7; RUN: llvm-dis %t.bc -o %t.ll
8; RUN: FileCheck --check-prefix=PASS1 %s < %t.ll
9; RUN: FileCheck --check-prefix=PASS2 %s < %t.ll
10
11; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
12; RUN:    --plugin-opt=emit-llvm \
13; RUN:    -shared %t2.o %t.o -o %t.bc
14; RUN: llvm-dis %t.bc -o %t.ll
15; RUN: FileCheck --check-prefix=PASS1 %s < %t.ll
16; RUN: FileCheck --check-prefix=PASS2 %s < %t.ll
17
18target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
19
20define void @foo() {
21  call void @bar()
22  ret void
23}
24declare void @bar()
25
26; PASS1: @bar = alias void (), void ()* @zed
27
28; PASS1:      define void @foo() {
29; PASS1-NEXT:   call void @bar()
30; PASS1-NEXT:   ret void
31; PASS1-NEXT: }
32
33; PASS2:      define void @zed() {
34; PASS2-NEXT:   ret void
35; PASS2-NEXT: }
36