summaryrefslogtreecommitdiffstats
path: root/test/CodeGen/PR3589-freestanding-libcalls.c
blob: 8b8282fb80b9dc90875904515113e138b946b8af (plain)
1
2
3
4
5
6
7
8
9
// RUN: %clang_cc1 -emit-llvm %s -o - | grep 'declare i32 @printf' | count 1
// RUN: %clang_cc1 -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 1
// RUN: %clang_cc1 -ffreestanding -O2 -emit-llvm %s -o - | grep 'declare i32 @puts' | count 0

int printf(const char *, ...);

void f0() {
  printf("hello\n");
}