PGO: Declare zero-argument C functions as foo(void)

It turns out this is C code.  Specify foo(void).

<rdar://problem/15943240>

llvm-svn: 204396
This commit is contained in:
Duncan P. N. Exon Smith 2014-03-20 20:55:00 +00:00
parent d7fa5bd431
commit 71704754d6
5 changed files with 30 additions and 22 deletions

View File

@ -51,9 +51,9 @@ typedef struct __llvm_profile_data {
*/
void __llvm_profile_write_buffer(FILE *OutputFile);
const __llvm_profile_data *__llvm_profile_data_begin();
const __llvm_profile_data *__llvm_profile_data_end();
const char *__llvm_profile_names_begin();
const char *__llvm_profile_names_end();
uint64_t *__llvm_profile_counters_begin();
uint64_t *__llvm_profile_counters_end();
const __llvm_profile_data *__llvm_profile_data_begin(void);
const __llvm_profile_data *__llvm_profile_data_end(void);
const char *__llvm_profile_names_begin(void);
const char *__llvm_profile_names_end(void);
uint64_t *__llvm_profile_counters_begin(void);
uint64_t *__llvm_profile_counters_end(void);

View File

@ -29,7 +29,7 @@ void __llvm_profile_set_filename(const char *Filename) {
CurrentFilename = Filename;
}
void __llvm_profile_write_file() {
void __llvm_profile_write_file(void) {
const char *Filename = CurrentFilename;
#define UPDATE_FILENAME(NextFilename) \
@ -41,7 +41,7 @@ void __llvm_profile_write_file() {
__llvm_profile_write_file_with_name(Filename);
}
void __llvm_profile_register_write_file_atexit() {
void __llvm_profile_register_write_file_atexit(void) {
static int HasBeenRegistered = 0;
if (!HasBeenRegistered) {

View File

@ -14,7 +14,7 @@
* or if it hasn't been called, the \c LLVM_PROFILE_FILE environment variable,
* or if that's not set, \c "default.profdata".
*/
void __llvm_profile_write_file();
void __llvm_profile_write_file(void);
/*!
* \brief Set the filename for writing instrumentation data.
@ -25,4 +25,4 @@ void __llvm_profile_write_file();
void __llvm_profile_set_filename(const char *Name);
/*! \brief Register to write instrumentation data to file at exit. */
void __llvm_profile_register_write_file_atexit();
void __llvm_profile_register_write_file_atexit(void);

View File

@ -17,9 +17,13 @@ extern char NamesEnd __asm("section$end$__DATA$__llvm_prf_names");
extern uint64_t CountersStart __asm("section$start$__DATA$__llvm_prf_cnts");
extern uint64_t CountersEnd __asm("section$end$__DATA$__llvm_prf_cnts");
const __llvm_profile_data *__llvm_profile_data_begin() { return &DataStart; }
const __llvm_profile_data *__llvm_profile_data_end() { return &DataEnd; }
const char *__llvm_profile_names_begin() { return &NamesStart; }
const char *__llvm_profile_names_end() { return &NamesEnd; }
uint64_t *__llvm_profile_counters_begin() { return &CountersStart; }
uint64_t *__llvm_profile_counters_end() { return &CountersEnd; }
const __llvm_profile_data *__llvm_profile_data_begin(void) {
return &DataStart;
}
const __llvm_profile_data *__llvm_profile_data_end(void) {
return &DataEnd;
}
const char *__llvm_profile_names_begin(void) { return &NamesStart; }
const char *__llvm_profile_names_end(void) { return &NamesEnd; }
uint64_t *__llvm_profile_counters_begin(void) { return &CountersStart; }
uint64_t *__llvm_profile_counters_end(void) { return &CountersEnd; }

View File

@ -51,9 +51,13 @@ void __llvm_profile_register_function(void *Data_) {
#undef UPDATE_LAST
}
const __llvm_profile_data *__llvm_profile_data_begin() { return DataFirst; }
const __llvm_profile_data *__llvm_profile_data_end() { return DataLast; }
const char *__llvm_profile_names_begin() { return NamesFirst; }
const char *__llvm_profile_names_end() { return NamesLast; }
uint64_t *__llvm_profile_counters_begin() { return CountersFirst; }
uint64_t *__llvm_profile_counters_end() { return CountersLast; }
const __llvm_profile_data *__llvm_profile_data_begin(void) {
return DataFirst;
}
const __llvm_profile_data *__llvm_profile_data_end(void) {
return DataLast;
}
const char *__llvm_profile_names_begin(void) { return NamesFirst; }
const char *__llvm_profile_names_end(void) { return NamesLast; }
uint64_t *__llvm_profile_counters_begin(void) { return CountersFirst; }
uint64_t *__llvm_profile_counters_end(void) { return CountersLast; }