summaryrefslogtreecommitdiff
path: root/lib/profile/InstrProfilingUtil.c
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-06-17 18:12:50 +0000
committerReid Kleckner <rnk@google.com>2016-06-17 18:12:50 +0000
commit45769d7967f4593ebe90da50d898edc7fe48da98 (patch)
tree516dc51fffa70fc5a759bf87242995cf2ccb4182 /lib/profile/InstrProfilingUtil.c
parentd80ed424db5879f5250e0be79332bc4c31a8ef29 (diff)
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. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273026 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingUtil.c')
-rw-r--r--lib/profile/InstrProfilingUtil.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/profile/InstrProfilingUtil.c b/lib/profile/InstrProfilingUtil.c
index e87ab7640..be1012117 100644
--- a/lib/profile/InstrProfilingUtil.c
+++ b/lib/profile/InstrProfilingUtil.c
@@ -12,6 +12,7 @@
#ifdef _WIN32
#include <direct.h>
+#include <io.h>
#include <windows.h>
#else
#include <sys/stat.h>