Fix -Wpointer-sign warning

llvm-svn: 253770
This commit is contained in:
Xinliang David Li 2015-11-21 07:26:46 +00:00
parent cf24bbb12d
commit f7185dcccd
2 changed files with 6 additions and 6 deletions

View File

@ -42,7 +42,7 @@ int __llvm_profile_write_buffer_internal(
* This is an internal function not intended to be used externally.
*/
typedef struct ProfDataIOVec {
const char *Data;
const void *Data;
size_t ElmSize;
size_t NumElm;
} ProfDataIOVec;

View File

@ -60,11 +60,11 @@ __attribute__((visibility("hidden"))) int llvmWriteProfDataImpl(
/* Write the data. */
ProfDataIOVec IOVec[] = {
{(const char *)&Header, sizeof(__llvm_profile_header), 1},
{(const char *)DataBegin, sizeof(__llvm_profile_data), DataSize},
{(const char *)CountersBegin, sizeof(uint64_t), CountersSize},
{(const char *)NamesBegin, sizeof(char), NamesSize},
{(const char *)Zeroes, sizeof(char), Padding}};
{&Header, sizeof(__llvm_profile_header), 1},
{DataBegin, sizeof(__llvm_profile_data), DataSize},
{CountersBegin, sizeof(uint64_t), CountersSize},
{NamesBegin, sizeof(char), NamesSize},
{Zeroes, sizeof(char), Padding}};
if (Writer(IOVec, sizeof(IOVec) / sizeof(ProfDataIOVec), &WriterCtx))
return -1;
if (ValueDataBegin) {