[flang-commits] [flang] [flang] GETPID runtime and lower intrinsic implementation (PR #70442)

Yi Wu via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 06:56:07 PST 2023


================
@@ -15,6 +15,18 @@
 #include <cstdlib>
 #include <limits>
 
+#ifdef _WIN32
+#define WIN32_LEAN_AND_MEAN
+#define NOMINMAX
+#include <windows.h>
+
+// On Windows GetCurrentProcessId returns a DWORD aka uint32_t
+#include <processthreadsapi.h>
+#define getpid GetCurrentProcessId
----------------
PAX-12-WU wrote:

Not really, thought it would be more straightforward and understandable this way. A sec let me change it back

https://github.com/llvm/llvm-project/pull/70442


More information about the flang-commits mailing list