Create a coverage initialization function.

This function replaces the call of `atexit' from being generated in the compile
units. Basically, it registers the "writeout" and "flush" functions (if
present). It will generate calls to the `atexit' function for cleanups and final
writeout functions, but only once. This is better than checking for `main',
because a library may not have a `main' function in it.
<rdar://problem/12439551>


git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@177578 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/SDKs/darwin/usr/include/stdlib.h b/SDKs/darwin/usr/include/stdlib.h
index c18c2e4..7c973dc 100644
--- a/SDKs/darwin/usr/include/stdlib.h
+++ b/SDKs/darwin/usr/include/stdlib.h
@@ -22,6 +22,7 @@
 typedef __SIZE_TYPE__ size_t;
 
 void abort(void) __attribute__((__noreturn__));
+int atexit(void (*)(void));
 int atoi(const char *);
 void free(void *);
 char *getenv(const char *);