diff options
author | Reid Kleckner <rnk@google.com> | 2016-06-23 15:40:42 +0000 |
---|---|---|
committer | Reid Kleckner <rnk@google.com> | 2016-06-23 15:40:42 +0000 |
commit | 1f08b20f0448ff64eda0ec6553bbe9f0b5c31d33 (patch) | |
tree | cea048822058dae3ede1281a90bef4d263cd5145 /lib/profile/InstrProfilingUtil.c | |
parent | 84e4423f37265b78ad5ff1d6f63cf8f7d32cb3bb (diff) |
Use CreateFileA and add a FIXME to switch to the wide variant
No functional change. Required to build with -DUNICODE, as is done in
http://reviews.llvm.org/D21643
git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@273571 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/profile/InstrProfilingUtil.c')
-rw-r--r-- | lib/profile/InstrProfilingUtil.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/profile/InstrProfilingUtil.c b/lib/profile/InstrProfilingUtil.c index be1012117..dc58d731b 100644 --- a/lib/profile/InstrProfilingUtil.c +++ b/lib/profile/InstrProfilingUtil.c @@ -103,8 +103,9 @@ COMPILER_RT_VISIBILITY FILE *lprofOpenFileEx(const char *ProfileName) { f = fdopen(fd, "r+b"); #elif defined(_WIN32) - HANDLE h = CreateFile(ProfileName, GENERIC_READ | GENERIC_WRITE, 0, 0, - OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); + // FIXME: Use the wide variants to handle Unicode filenames. + HANDLE h = CreateFileA(ProfileName, GENERIC_READ | GENERIC_WRITE, 0, 0, + OPEN_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0); if (h == INVALID_HANDLE_VALUE) return NULL; |