forked from OSchip/llvm-project
parent
cf24bbb12d
commit
f7185dcccd
|
@ -42,7 +42,7 @@ int __llvm_profile_write_buffer_internal(
|
||||||
* This is an internal function not intended to be used externally.
|
* This is an internal function not intended to be used externally.
|
||||||
*/
|
*/
|
||||||
typedef struct ProfDataIOVec {
|
typedef struct ProfDataIOVec {
|
||||||
const char *Data;
|
const void *Data;
|
||||||
size_t ElmSize;
|
size_t ElmSize;
|
||||||
size_t NumElm;
|
size_t NumElm;
|
||||||
} ProfDataIOVec;
|
} ProfDataIOVec;
|
||||||
|
|
|
@ -60,11 +60,11 @@ __attribute__((visibility("hidden"))) int llvmWriteProfDataImpl(
|
||||||
|
|
||||||
/* Write the data. */
|
/* Write the data. */
|
||||||
ProfDataIOVec IOVec[] = {
|
ProfDataIOVec IOVec[] = {
|
||||||
{(const char *)&Header, sizeof(__llvm_profile_header), 1},
|
{&Header, sizeof(__llvm_profile_header), 1},
|
||||||
{(const char *)DataBegin, sizeof(__llvm_profile_data), DataSize},
|
{DataBegin, sizeof(__llvm_profile_data), DataSize},
|
||||||
{(const char *)CountersBegin, sizeof(uint64_t), CountersSize},
|
{CountersBegin, sizeof(uint64_t), CountersSize},
|
||||||
{(const char *)NamesBegin, sizeof(char), NamesSize},
|
{NamesBegin, sizeof(char), NamesSize},
|
||||||
{(const char *)Zeroes, sizeof(char), Padding}};
|
{Zeroes, sizeof(char), Padding}};
|
||||||
if (Writer(IOVec, sizeof(IOVec) / sizeof(ProfDataIOVec), &WriterCtx))
|
if (Writer(IOVec, sizeof(IOVec) / sizeof(ProfDataIOVec), &WriterCtx))
|
||||||
return -1;
|
return -1;
|
||||||
if (ValueDataBegin) {
|
if (ValueDataBegin) {
|
||||||
|
|
Loading…
Reference in New Issue