projects
/
platform
/
upstream
/
llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
aefdce8
)
[InstrProfiling] Fix warnings when building for Windows
author
Martin Storsjö
<martin@martin.st>
Fri, 6 Aug 2021 06:19:25 +0000
(09:19 +0300)
committer
Martin Storsjö
<martin@martin.st>
Mon, 9 Aug 2021 08:39:11 +0000
(11:39 +0300)
The Headers.CountersDelta field is an uint64_t, not a pointer,
so just cast to uint32_t to truncate it.
Differential Revision: https://reviews.llvm.org/D107619
compiler-rt/lib/profile/InstrProfilingWriter.c
patch
|
blob
|
history
diff --git
a/compiler-rt/lib/profile/InstrProfilingWriter.c
b/compiler-rt/lib/profile/InstrProfilingWriter.c
index
030befc
..
5ed968f
100644
(file)
--- a/
compiler-rt/lib/profile/InstrProfilingWriter.c
+++ b/
compiler-rt/lib/profile/InstrProfilingWriter.c
@@
-286,7
+286,7
@@
lprofWriteDataImpl(ProfDataWriter *Writer, const __llvm_profile_data *DataBegin,
/* 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. */