[PATCH] D107619: [InstrProfiling] Fix warnings when building for Windows
Martin Storsjö via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 5 23:21:54 PDT 2021
mstorsjo created this revision.
mstorsjo added a reviewer: MaskRay.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.
The Headers.CountersDelta field is an uint64_t, not a pointer,
so just cast to uint32_t to truncate it.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D107619
Files:
compiler-rt/lib/profile/InstrProfilingWriter.c
Index: compiler-rt/lib/profile/InstrProfilingWriter.c
===================================================================
--- compiler-rt/lib/profile/InstrProfilingWriter.c
+++ compiler-rt/lib/profile/InstrProfilingWriter.c
@@ -286,7 +286,7 @@
/* On WIN64, label differences are truncated 32-bit values. Truncate
* CountersDelta to match. */
#ifdef _WIN64
- Header.CountersDelta = (void *)(uint32_t)Header.CountersDelta;
+ Header.CountersDelta = (uint32_t)Header.CountersDelta;
#endif
/* Write the profile header. */
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107619.364700.patch
Type: text/x-patch
Size: 533 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210806/2de84a03/attachment.bin>
More information about the llvm-commits
mailing list