1; RUN: llvm-as %s -o %t.o
2; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O0 -o %t.dylib %t.o
3; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O0 %s
4; RUN: %ld64 -lto_library %llvmshlibdir/libLTO.dylib -arch x86_64 -dylib -mllvm -O2 -o %t.dylib %t.o
5; RUN: llvm-nm -no-llvm-bc %t.dylib | FileCheck --check-prefix=CHECK-O2 %s
6; REQUIRES: X86
7
8target triple = "x86_64-apple-macosx10.8.0"
9
10; CHECK-O0: t _f1
11; CHECK-O2-NOT: _f1
12define internal void @f1() {
13  ret void
14}
15
16; CHECK-O0: T _f2
17; CHECK-O2: T _f2
18define void @f2() {
19  call void @f1()
20  ret void
21}
22