1 ; RUN: llvm-as <%s >%t1
2 ; RUN: llvm-lto -exported-symbol=_uses_puts -exported-symbol=_uses_printf -o - %t1 | \
5 ; rdar://problem/16165191
6 ; runtime library implementations should not be renamed
8 target datalayout = "e-m:o-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
9 target triple = "x86_64-apple-darwin11"
11 @str = private unnamed_addr constant [13 x i8] c"hello world\0A\00"
14 ; CHECK: T _uses_printf
16 define i32 @uses_puts(i32 %i) {
18 %s = call i8* @foo(i32 %i)
19 %ret = call i32 @puts(i8* %s)
22 define i32 @uses_printf(i32 %i) {
24 %s = getelementptr [13 x i8], [13 x i8]* @str, i64 0, i64 0
25 call i32 (i8*, ...) @printf(i8* %s)
29 define hidden i32 @printf(i8* readonly nocapture %fmt, ...) {
31 %ret = call i32 @bar(i8* %fmt)
34 define hidden i32 @puts(i8* %s) {
36 %ret = call i32 @bar(i8* %s)