; RUN: llvm-as %s -o %t.o

; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN:    --plugin-opt=emit-llvm \
; RUN:    -shared %t.o -o %t2.o
; RUN: llvm-dis %t2.o -o - | FileCheck %s

define void @foo() {
  call void @bar()
  ret void
}
define available_externally void @bar() {
  ret void
}

; CHECK: define available_externally void @bar() {

; RUN: llvm-as %s -o %t.o
; RUN: llvm-as %p/Inputs/available-externally.ll -o %t2.o

; RUN: %gold -plugin %llvmshlibdir/LLVMgold.so \
; RUN:    --plugin-opt=emit-llvm \
; RUN:    -shared %t.o %t2.o -o %t3.o
; RUN: llvm-dis %t3.o -o - | FileCheck %s

define void @foo() {
  call void @bar()
  call void @zed()
  ret void
}
define available_externally void @bar() {
  ret void
}
define available_externally void @zed() {
  ret void
}

; CHECK: define available_externally void @bar() {
; CHECK: define void @zed() {

Make the test a bit more interesting.
Make the test a bit more interesting.

It now covers a regular function replacing an available_externally one.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@254184 91177308-0d34-0410-b5e6-96231b3b80d8
