summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-17 22:08:05 +0000
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2014-03-17 22:08:05 +0000
commitfd118ad8539b03d08865fec4a91be18adc7cce32 (patch)
treee4838b1e2fcc540ad32d6d60062da61ab54d4301 /lib
parent1fd0981e810adfb93c29d7f65658bb7dd99fe29a (diff)
Rename __ProfileData to __llvm_pgo_data
<rdar://problem/15943240> git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@204083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/profile/PGOProfiling.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/profile/PGOProfiling.c b/lib/profile/PGOProfiling.c
index 2d919942b..9e7b93e46 100644
--- a/lib/profile/PGOProfiling.c
+++ b/lib/profile/PGOProfiling.c
@@ -32,16 +32,16 @@ typedef unsigned int uint32_t;
typedef unsigned long long uint64_t;
#endif
-typedef struct __ProfileData {
+typedef struct __llvm_pgo_data {
const uint32_t NameSize;
const uint32_t NumCounters;
const char *const Name;
const uint64_t *const Counters;
-} __ProfileData;
+} __llvm_pgo_data;
/* TODO: Calculate these with linker magic. */
-static __ProfileData *First = NULL;
-static __ProfileData *Final = NULL;
+static __llvm_pgo_data *First = NULL;
+static __llvm_pgo_data *Final = NULL;
/*!
* \brief Register an instrumented function.
*
@@ -53,7 +53,7 @@ static __ProfileData *Final = NULL;
*/
void __llvm_pgo_register_function(void *Data_) {
/* TODO: Only emit this function if we can't use linker magic. */
- __ProfileData *Data = (__ProfileData*)Data_;
+ __llvm_pgo_data *Data = (__llvm_pgo_data*)Data_;
if (!First || Data < First)
First = Data;
if (!Final || Data > Final)
@@ -61,13 +61,13 @@ void __llvm_pgo_register_function(void *Data_) {
}
/*! \brief Get the first instrumentation record. */
-static __ProfileData *getFirst() {
+static __llvm_pgo_data *getFirst() {
/* TODO: Use extern + linker magic instead of a static variable. */
return First;
}
/*! \brief Get the last instrumentation record. */
-static __ProfileData *getLast() {
+static __llvm_pgo_data *getLast() {
/* TODO: Use extern + linker magic instead of a static variable. */
return Final + 1;
}
@@ -75,7 +75,7 @@ static __ProfileData *getLast() {
/* TODO: void __llvm_pgo_get_size_for_buffer(void); */
/* TODO: void __llvm_pgo_write_buffer(char *Buffer); */
-static void writeFunction(FILE *OutputFile, const __ProfileData *Data) {
+static void writeFunction(FILE *OutputFile, const __llvm_pgo_data *Data) {
/* TODO: Requires libc: break requirement by writing directly to a buffer
* instead of a FILE stream.
*/
@@ -91,7 +91,7 @@ static void writeFunction(FILE *OutputFile, const __ProfileData *Data) {
/*! \brief Write instrumentation data to the given file. */
void __llvm_pgo_write_file(const char *OutputName) {
/* TODO: Requires libc: move to separate translation unit. */
- __ProfileData *I, *E;
+ __llvm_pgo_data *I, *E;
FILE *OutputFile;
if (!OutputName || !OutputName[0])
return;