llvm-project/compiler-rt/lib/profile
Reid Kleckner 652d70f3e1 Fix most MSVC warnings in compiler-rt profiling library
Here's the warnings and how they were fixed:

- InstrProfilingUtil.c(110): warning C4013: '_open_osfhandle' undefined; assuming extern returning int

Include io.h to get the prototype.

- warning C4005: 'FILE_MAP_EXECUTE': macro redefinition

Stop trying to support pre-XP versions of Windows, don't attempt to
define this macro.

- InstrProfilingWriter.c(271): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Header'
- InstrProfilingWriter.c(275): warning C4221: nonstandard extension used: 'Data': cannot be initialized using address of automatic variable 'Zeroes'

Turn this warning off. This is definitely legal in C++, all compilers
accept it, and I only have room for half of one language standard in my
brain.

- InstrProfilingValue.c(320): warning C4113: 'uint32_t (__cdecl *)()' differs in parameter lists from 'uint32_t (__cdecl *)(void)'

Fix this with an explicit (void) in the prototype.

- InstrProfilingMerge.c.obj : warning LNK4006: _VPMergeHook already defined in InstrProfilingMergeFile.c.obj; second definition ignored

Last remaining warning. This is from linking a selectany definition with
a strong definition. We need to sort out weak symbols in compiler-rt in
general, though.

llvm-svn: 273026
2016-06-17 18:12:50 +00:00
..
CMakeLists.txt Fix most MSVC warnings in compiler-rt profiling library 2016-06-17 18:12:50 +00:00
GCDAProfiling.c [GCDA] Unlock arc file before closing it 2016-03-05 20:10:25 +00:00
InstrProfData.inc [profile] Hide some external symbols in InstrProfData.inc 2016-06-08 16:39:43 +00:00
InstrProfiling.c [profile] Un-hide two symbols 2016-06-08 01:33:15 +00:00
InstrProfiling.h [profile] Hide some external symbols in InstrProfData.inc 2016-06-08 16:39:43 +00:00
InstrProfilingBuffer.c Reapply r268840: [profile] Simplify value profile writing 2016-05-10 00:17:31 +00:00
InstrProfilingFile.c [profile] Update a warning message (NFC) 2016-06-14 17:23:13 +00:00
InstrProfilingInternal.h [profile] in-process merging support part-3 2016-06-08 23:43:56 +00:00
InstrProfilingMerge.c [profile] in-process merging support part-3 2016-06-08 23:43:56 +00:00
InstrProfilingMergeFile.c [PGO] internal API name cleanups (for better consistency) 2016-03-06 04:18:13 +00:00
InstrProfilingPlatformDarwin.c [profile] initialize static pool properly 2016-05-22 16:36:03 +00:00
InstrProfilingPlatformLinux.c [profile] initialize static pool properly 2016-05-22 16:36:03 +00:00
InstrProfilingPlatformOther.c [profile] initialize static pool properly 2016-05-22 16:36:03 +00:00
InstrProfilingPort.h Fix most MSVC warnings in compiler-rt profiling library 2016-06-17 18:12:50 +00:00
InstrProfilingRuntime.cc [PGO] cleanup: unify prefix for portability macros 2015-12-16 03:29:15 +00:00
InstrProfilingUtil.c Fix most MSVC warnings in compiler-rt profiling library 2016-06-17 18:12:50 +00:00
InstrProfilingUtil.h [profile] in-process mergeing support (part-2) 2016-06-06 03:17:58 +00:00
InstrProfilingValue.c Fix most MSVC warnings in compiler-rt profiling library 2016-06-17 18:12:50 +00:00
InstrProfilingWriter.c Avoid leak. Free before resetting. 2016-05-16 23:28:35 +00:00
WindowsMMap.c [PGO] Enable building compiler-rt profile support library on Windows 2016-01-05 17:27:01 +00:00
WindowsMMap.h Fix most MSVC warnings in compiler-rt profiling library 2016-06-17 18:12:50 +00:00