[profile] Fifth speculative fix for Android after D68351
authorVedant Kumar <vsk@apple.com>
Fri, 1 Nov 2019 00:03:51 +0000 (17:03 -0700)
committerVedant Kumar <vsk@apple.com>
Fri, 1 Nov 2019 00:03:52 +0000 (17:03 -0700)
commit197bad50896c5b05d31e8aa7839d0a9357c6a4a3
tree98adee10194e6727ed5be025fe8f1c01d07a8e8a
parent92a25fbf11da51c8e3573b81a877d3b226990c07
[profile] Fifth speculative fix for Android after D68351

Use the printf macros from inttypes.h to sidestep -Wformat issues:

/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:425:14: error: format specifies type 'long long' but the argument has type 'off_t' (aka 'long') [-Werror,-Wformat]
             CurrentFileOffset, PageSize);
             ^~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
                                         ~~~~~~  ^~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:461:41: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
        strerror(errno), CountersBegin, PageAlignedCountersLength, Fileno,
                                        ^~~~~~~~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
                                         ~~~~~~  ^~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingFile.c:462:9: error: format specifies type 'unsigned long long' but the argument has type 'uint64_t' (aka 'unsigned long') [-Werror,-Wformat]
        FileOffsetToCounters);
        ^~~~~~~~~~~~~~~~~~~~
/var/lib/buildbot/sanitizer-buildbot6/sanitizer-x86_64-linux-android/build/llvm-project/compiler-rt/lib/profile/InstrProfilingPort.h:114:50: note: expanded from macro 'PROF_ERR'
  fprintf(stderr, "LLVM Profile Error: " Format, __VA_ARGS__);
compiler-rt/lib/profile/InstrProfilingFile.c