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

#include <stdio.h>

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