Fold a binary operator with constant operands when expanding code for a SCEV.
[llvm-complete.git] / runtime / GCCLibraries / libc / io.c
blobe09283ada5a6265d1402e2a36b5db554729ba20b
1 //===-- io.c - IO routines for LLVM libc Library ------------------*- C -*-===//
2 //
3 // A lot of this code is ripped gratuitously from glibc and libiberty.
4 //
5 //===----------------------------------------------------------------------===//
7 int putchar(int);
9 // The puts() function writes the string pointed to by s, followed by a
10 // NEWLINE character, to the standard output stream stdout. On success the
11 // number of characters written is returned; otherwise they return EOF.
13 int puts(const char *S) {
14 const char *Str = S;
15 while (*Str) putchar(*Str++);
16 putchar('\n');
17 return Str+1-S;