Build LLVM with -Wstrict-prototypes enabled

Clang 5 supports -Wstrict-prototypes. We should use it to catch any C
declarations that declare a non-prototype function.

rdar://33705313

Differential Revision: https://reviews.llvm.org/D36669

llvm-svn: 312240
diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
index 138af6e..eb8a937 100644
--- a/compiler-rt/lib/profile/GCDAProfiling.c
+++ b/compiler-rt/lib/profile/GCDAProfiling.c
@@ -92,7 +92,7 @@
 /*
  * A list of functions to write out the data.
  */
-typedef void (*writeout_fn)();
+typedef void (*writeout_fn)(void);
 
 struct writeout_fn_node {
   writeout_fn fn;
@@ -105,7 +105,7 @@
 /*
  *  A list of flush functions that our __gcov_flush() function should call.
  */
-typedef void (*flush_fn)();
+typedef void (*flush_fn)(void);
 
 struct flush_fn_node {
   flush_fn fn;
diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h
index 945f1c4..a644d6a 100644
--- a/compiler-rt/lib/profile/InstrProfiling.h
+++ b/compiler-rt/lib/profile/InstrProfiling.h
@@ -63,8 +63,8 @@
 const char *__llvm_profile_end_names(void);
 uint64_t *__llvm_profile_begin_counters(void);
 uint64_t *__llvm_profile_end_counters(void);
-ValueProfNode *__llvm_profile_begin_vnodes();
-ValueProfNode *__llvm_profile_end_vnodes();
+ValueProfNode *__llvm_profile_begin_vnodes(void);
+ValueProfNode *__llvm_profile_end_vnodes(void);
 
 /*!
  * \brief Clear profile counters to zero.
@@ -164,7 +164,7 @@
  * merge mode is turned on for instrumented programs with shared libs).
  * Side-effect: this API call will invoke malloc with dynamic memory allocation.
  */
-const char *__llvm_profile_get_path_prefix();
+const char *__llvm_profile_get_path_prefix(void);
 
 /*! \brief Get the magic token for the file format. */
 uint64_t __llvm_profile_get_magic(void);
diff --git a/compiler-rt/lib/profile/InstrProfilingFile.c b/compiler-rt/lib/profile/InstrProfilingFile.c
index 8ae2b7d..7ee004a 100644
--- a/compiler-rt/lib/profile/InstrProfilingFile.c
+++ b/compiler-rt/lib/profile/InstrProfilingFile.c
@@ -86,7 +86,7 @@
                                                    0, 0, 0, PNS_unknown};
 
 int getpid(void);
-static int getCurFilenameLength();
+static int getCurFilenameLength(void);
 static const char *getCurFilename(char *FilenameBuf);
 static unsigned doMerging() { return lprofCurFilename.MergePoolSize; }
 
diff --git a/compiler-rt/lib/profile/InstrProfilingInternal.h b/compiler-rt/lib/profile/InstrProfilingInternal.h
index 36490ef..18783a7 100644
--- a/compiler-rt/lib/profile/InstrProfilingInternal.h
+++ b/compiler-rt/lib/profile/InstrProfilingInternal.h
@@ -155,27 +155,27 @@
 void lprofMergeValueProfData(struct ValueProfData *SrcValueProfData,
                              __llvm_profile_data *DstData);
 
-VPDataReaderType *lprofGetVPDataReader();
+VPDataReaderType *lprofGetVPDataReader(void);
 
 /* Internal interface used by test to reset the max number of 
  * tracked values per value site to be \p MaxVals.
  */
 void lprofSetMaxValsPerSite(uint32_t MaxVals);
-void lprofSetupValueProfiler();
+void lprofSetupValueProfiler(void);
 
 /* Return the profile header 'signature' value associated with the current
  * executable or shared library. The signature value can be used to for
  * a profile name that is unique to this load module so that it does not
  * collide with profiles from other binaries. It also allows shared libraries
  * to dump merged profile data into its own profile file. */
-uint64_t lprofGetLoadModuleSignature();
+uint64_t lprofGetLoadModuleSignature(void);
 
 /* 
  * Return non zero value if the profile data has already been
  * dumped to the file.
  */
-unsigned lprofProfileDumped();
-void lprofSetProfileDumped();
+unsigned lprofProfileDumped(void);
+void lprofSetProfileDumped(void);
 
 COMPILER_RT_VISIBILITY extern void (*FreeHook)(void *);
 COMPILER_RT_VISIBILITY extern uint8_t *DynamicBufferIOBuffer;
diff --git a/compiler-rt/lib/profile/InstrProfilingUtil.h b/compiler-rt/lib/profile/InstrProfilingUtil.h
index 9698599..fdbfd4a 100644
--- a/compiler-rt/lib/profile/InstrProfilingUtil.h
+++ b/compiler-rt/lib/profile/InstrProfilingUtil.h
@@ -54,9 +54,9 @@
 /* Temporarily suspend SIGKILL. Return value of 1 means a restore is needed.
  * Other return values mean no restore is needed.
  */
-int lprofSuspendSigKill();
+int lprofSuspendSigKill(void);
 
 /* Restore previously suspended SIGKILL. */
-void lprofRestoreSigKill();
+void lprofRestoreSigKill(void);
 
 #endif /* PROFILE_INSTRPROFILINGUTIL_H */