diff options
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/include/llvm/Support/Process.h | 6 | ||||
-rw-r--r-- | llvm/lib/Support/Windows/Process.inc | 2 | ||||
-rw-r--r-- | llvm/unittests/Support/ProcessTest.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/llvm/include/llvm/Support/Process.h b/llvm/include/llvm/Support/Process.h index 4256d4a03b9..0baf7b911c1 100644 --- a/llvm/include/llvm/Support/Process.h +++ b/llvm/include/llvm/Support/Process.h @@ -50,13 +50,13 @@ protected: public: /// \brief Operating system specific type to identify a process. /// - /// Note that the windows one is defined to 'void *' as this is the - /// documented type for HANDLE on windows, and we don't want to pull in the + /// Note that the windows one is defined to 'unsigned long' as this is the + /// documented type for DWORD on windows, and we don't want to pull in the /// Windows headers here. #if defined(LLVM_ON_UNIX) typedef pid_t id_type; #elif defined(LLVM_ON_WIN32) - typedef void *id_type; // Must match the type of HANDLE. + typedef unsigned long id_type; // Must match the type of DWORD. #else #error Unsupported operating system. #endif diff --git a/llvm/lib/Support/Windows/Process.inc b/llvm/lib/Support/Windows/Process.inc index ad9412852f1..359b99f5131 100644 --- a/llvm/lib/Support/Windows/Process.inc +++ b/llvm/lib/Support/Windows/Process.inc @@ -40,7 +40,7 @@ using namespace sys; process::id_type self_process::get_id() { - return GetCurrentProcess(); + return GetCurrentProcessId(); } static TimeValue getTimeValueFromFILETIME(FILETIME Time) { diff --git a/llvm/unittests/Support/ProcessTest.cpp b/llvm/unittests/Support/ProcessTest.cpp index e57c0e6eaf8..eff9c711a1a 100644 --- a/llvm/unittests/Support/ProcessTest.cpp +++ b/llvm/unittests/Support/ProcessTest.cpp @@ -26,7 +26,7 @@ TEST(ProcessTest, SelfProcess) { #if defined(LLVM_ON_UNIX) EXPECT_EQ(getpid(), process::get_self()->get_id()); #elif defined(LLVM_ON_WIN32) - EXPECT_EQ(GetCurrentProcess(), process::get_self()->get_id()); + EXPECT_EQ(GetCurrentProcessId(), process::get_self()->get_id()); #endif EXPECT_LT(1u, process::get_self()->page_size()); |