[compiler-rt] r355180 - [sanitizers] Explicitly use GetModuleFileNameW with wchar_t

Martin Storsjo via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 1 00:08:11 PST 2019


Author: mstorsjo
Date: Fri Mar  1 00:08:11 2019
New Revision: 355180

URL: http://llvm.org/viewvc/llvm-project?rev=355180&view=rev
Log:
[sanitizers] Explicitly use GetModuleFileNameW with wchar_t

Alternatively we could define the string as TCHAR.

Differential Revision: https://reviews.llvm.org/D58766

Modified:
    compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc

Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc?rev=355180&r1=355179&r2=355180&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_win.cc Fri Mar  1 00:08:11 2019
@@ -1096,7 +1096,7 @@ void LogFullErrorReport(const char *buff
     do {
       filename.resize(filename.size() + 0x100);
       filename_length =
-          GetModuleFileName(NULL, filename.begin(), filename.size());
+          GetModuleFileNameW(NULL, filename.begin(), filename.size());
     } while (filename_length >= filename.size());
     TraceLoggingWrite(g_asan_provider, "AsanReportEvent",
                       TraceLoggingValue(filename.begin(), "ExecutableName"),




More information about the llvm-commits mailing list