From 341317fda43ba257be63836d6ddb3e3d3865ac33 Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Thu, 31 Aug 2017 15:51:23 +0000 Subject: [PATCH] Revert r312240 The buildbots have shown that -Wstrict-prototypes behaves differently in GCC and Clang so we should keep it disabled until Clang follows GCC's behaviour llvm-svn: 312246 --- compiler-rt/lib/profile/GCDAProfiling.c | 4 ++-- compiler-rt/lib/profile/InstrProfiling.h | 6 +++--- compiler-rt/lib/profile/InstrProfilingFile.c | 2 +- compiler-rt/lib/profile/InstrProfilingInternal.h | 10 +++++----- compiler-rt/lib/profile/InstrProfilingUtil.h | 4 ++-- libunwind/src/config.h | 6 +++--- libunwind/src/unwind_ext.h | 2 +- llvm/cmake/modules/HandleLLVMOptions.cmake | 2 -- 8 files changed, 17 insertions(+), 19 deletions(-) diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c index eb8a937f3f26..138af6ec4033 100644 --- a/compiler-rt/lib/profile/GCDAProfiling.c +++ b/compiler-rt/lib/profile/GCDAProfiling.c @@ -92,7 +92,7 @@ static int fd = -1; /* * A list of functions to write out the data. */ -typedef void (*writeout_fn)(void); +typedef void (*writeout_fn)(); struct writeout_fn_node { writeout_fn fn; @@ -105,7 +105,7 @@ static struct writeout_fn_node *writeout_fn_tail = NULL; /* * A list of flush functions that our __gcov_flush() function should call. */ -typedef void (*flush_fn)(void); +typedef void (*flush_fn)(); struct flush_fn_node { flush_fn fn; diff --git a/compiler-rt/lib/profile/InstrProfiling.h b/compiler-rt/lib/profile/InstrProfiling.h index a644d6a8dac9..945f1c4ac38d 100644 --- a/compiler-rt/lib/profile/InstrProfiling.h +++ b/compiler-rt/lib/profile/InstrProfiling.h @@ -63,8 +63,8 @@ const char *__llvm_profile_begin_names(void); 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(void); -ValueProfNode *__llvm_profile_end_vnodes(void); +ValueProfNode *__llvm_profile_begin_vnodes(); +ValueProfNode *__llvm_profile_end_vnodes(); /*! * \brief Clear profile counters to zero. @@ -164,7 +164,7 @@ void __llvm_profile_initialize_file(void); * 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(void); +const char *__llvm_profile_get_path_prefix(); /*! \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 7ee004af6c50..8ae2b7d986bb 100644 --- a/compiler-rt/lib/profile/InstrProfilingFile.c +++ b/compiler-rt/lib/profile/InstrProfilingFile.c @@ -86,7 +86,7 @@ COMPILER_RT_WEAK lprofFilename lprofCurFilename = {0, 0, 0, {0}, {0}, 0, 0, 0, PNS_unknown}; int getpid(void); -static int getCurFilenameLength(void); +static int getCurFilenameLength(); 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 18783a768ed6..36490ef7d433 100644 --- a/compiler-rt/lib/profile/InstrProfilingInternal.h +++ b/compiler-rt/lib/profile/InstrProfilingInternal.h @@ -155,27 +155,27 @@ int lprofWriteDataImpl(ProfDataWriter *Writer, void lprofMergeValueProfData(struct ValueProfData *SrcValueProfData, __llvm_profile_data *DstData); -VPDataReaderType *lprofGetVPDataReader(void); +VPDataReaderType *lprofGetVPDataReader(); /* 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); +void lprofSetupValueProfiler(); /* 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(void); +uint64_t lprofGetLoadModuleSignature(); /* * Return non zero value if the profile data has already been * dumped to the file. */ -unsigned lprofProfileDumped(void); -void lprofSetProfileDumped(void); +unsigned lprofProfileDumped(); +void lprofSetProfileDumped(); 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 fdbfd4a274a8..9698599606e0 100644 --- a/compiler-rt/lib/profile/InstrProfilingUtil.h +++ b/compiler-rt/lib/profile/InstrProfilingUtil.h @@ -54,9 +54,9 @@ void *lprofPtrFetchAdd(void **Mem, long ByteIncr); /* Temporarily suspend SIGKILL. Return value of 1 means a restore is needed. * Other return values mean no restore is needed. */ -int lprofSuspendSigKill(void); +int lprofSuspendSigKill(); /* Restore previously suspended SIGKILL. */ -void lprofRestoreSigKill(void); +void lprofRestoreSigKill(); #endif /* PROFILE_INSTRPROFILINGUTIL_H */ diff --git a/libunwind/src/config.h b/libunwind/src/config.h index 80356d31c4c7..ac8d7d98dc31 100644 --- a/libunwind/src/config.h +++ b/libunwind/src/config.h @@ -119,9 +119,9 @@ #ifdef __cplusplus extern "C" { #endif - extern bool logAPIs(void); - extern bool logUnwinding(void); - extern bool logDWARF(void); + extern bool logAPIs(); + extern bool logUnwinding(); + extern bool logDWARF(); #ifdef __cplusplus } #endif diff --git a/libunwind/src/unwind_ext.h b/libunwind/src/unwind_ext.h index 2964b67ad0ab..c40ce6a1610f 100644 --- a/libunwind/src/unwind_ext.h +++ b/libunwind/src/unwind_ext.h @@ -23,7 +23,7 @@ extern "C" { // implemented elsewhere. extern struct _Unwind_FunctionContext * -__Unwind_SjLj_GetTopOfFunctionStack(void); +__Unwind_SjLj_GetTopOfFunctionStack(); extern void __Unwind_SjLj_SetTopOfFunctionStack(struct _Unwind_FunctionContext *fc); diff --git a/llvm/cmake/modules/HandleLLVMOptions.cmake b/llvm/cmake/modules/HandleLLVMOptions.cmake index a293dde14991..868061400231 100644 --- a/llvm/cmake/modules/HandleLLVMOptions.cmake +++ b/llvm/cmake/modules/HandleLLVMOptions.cmake @@ -581,8 +581,6 @@ if (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL)) # Enable -Wstring-conversion to catch misuse of string literals. add_flag_if_supported("-Wstring-conversion" STRING_CONVERSION_FLAG) - # Enable -Wstrict-prototypes to catch incorrectly declared functions in C. - add_flag_if_supported("-Wstrict-prototypes" STRICT_PROTOTYPES_FLAG) endif (LLVM_ENABLE_WARNINGS AND (LLVM_COMPILER_IS_GCC_COMPATIBLE OR CLANG_CL)) if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT LLVM_ENABLE_WARNINGS)