[PATCH] D58106: [compiler-rt] [profile] Provide lprofGetHostName for all windows environments

Martin Storsjö via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 12 00:28:34 PST 2019


mstorsjo created this revision.
mstorsjo added reviewers: rnk, compnerd.
Herald added subscribers: Sanitizers, llvm-commits, jdoerfert, dberris.
Herald added projects: LLVM, Sanitizers.

This function doesn't use anything MSVC specific but works fine for any `_WIN32` target.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D58106

Files:
  lib/profile/InstrProfilingUtil.c


Index: lib/profile/InstrProfilingUtil.c
===================================================================
--- lib/profile/InstrProfilingUtil.c
+++ lib/profile/InstrProfilingUtil.c
@@ -81,7 +81,7 @@
 
 #endif
 
-#ifdef _MSC_VER
+#ifdef _WIN32
 COMPILER_RT_VISIBILITY int lprofGetHostName(char *Name, int Len) {
   WCHAR Buffer[COMPILER_RT_MAX_HOSTLEN];
   DWORD BufferSize = sizeof(Buffer);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D58106.186410.patch
Type: text/x-patch
Size: 392 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190212/4baa3fb0/attachment.bin>


More information about the cfe-commits mailing list