mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-09 01:29:52 +00:00
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:
parent
d7fa5bd431
commit
71704754d6
@ -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);
|
||||
|
@ -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) {
|
||||
|
@ -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);
|
||||
|
@ -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; }
|
||||
|
@ -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; }
|
||||
|
Loading…
Reference in New Issue
Block a user