xref: /minix3/external/bsd/llvm/dist/clang/test/CodeGen/PR3589-freestanding-libcalls.c (revision f4a2713ac843a11c696ec80c0a5e3e5d80b4d338)
1*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-unknown-unknown -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1
2*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-unknown-unknown -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1
3*f4a2713aSLionel Sambuc // RUN: %clang_cc1 -triple i386-unknown-unknown -ffreestanding -O2 -emit-llvm %s -o - | not grep 'declare i32 @puts'
4*f4a2713aSLionel Sambuc 
5*f4a2713aSLionel Sambuc int printf(const char *, ...);
6*f4a2713aSLionel Sambuc 
f0()7*f4a2713aSLionel Sambuc void f0() {
8*f4a2713aSLionel Sambuc   printf("hello\n");
9*f4a2713aSLionel Sambuc }
10