[flang-commits] [llvm] [clang-tools-extra] [compiler-rt] [clang] [libc] [flang] [lldb] [lldb][NFC] Fix compilation issue on windows (PR #76453)

via flang-commits flang-commits at lists.llvm.org
Wed Jan 3 11:40:35 PST 2024


https://github.com/gmh5225 updated https://github.com/llvm/llvm-project/pull/76453

>From 362c9380964e13878afae57428028f93bd80d03a Mon Sep 17 00:00:00 2001
From: gmh <13917777+gmh5225 at users.noreply.github.com>
Date: Thu, 28 Dec 2023 01:00:40 +0800
Subject: [PATCH 1/2] [lldb][NFC] Fix compilation issue on windows

---
 .../Plugins/Process/Windows/Common/TargetThreadWindows.cpp    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
index ad67e764fe10f2..a69c10081ff190 100644
--- a/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
+++ b/lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp
@@ -29,8 +29,8 @@
 using namespace lldb;
 using namespace lldb_private;
 
-using GetThreadDescriptionFunctionPtr = HRESULT
-WINAPI (*)(HANDLE hThread, PWSTR *ppszThreadDescription);
+using GetThreadDescriptionFunctionPtr =
+    HRESULT(WINAPI *)(HANDLE hThread, PWSTR *ppszThreadDescription);
 
 TargetThreadWindows::TargetThreadWindows(ProcessWindows &process,
                                          const HostThread &thread)

>From db9a5b3fa99b4e24ef8f164c0bb86c2a0e8c646c Mon Sep 17 00:00:00 2001
From: gmh <13917777+gmh5225 at users.noreply.github.com>
Date: Thu, 4 Jan 2024 03:40:27 +0800
Subject: [PATCH 2/2] [lldb][NFC] Fix compilation issue on windows

---
 lldb/unittests/Thread/ThreadTest.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/lldb/unittests/Thread/ThreadTest.cpp b/lldb/unittests/Thread/ThreadTest.cpp
index 4c660e9815c3ef..542585969c07b1 100644
--- a/lldb/unittests/Thread/ThreadTest.cpp
+++ b/lldb/unittests/Thread/ThreadTest.cpp
@@ -34,8 +34,8 @@ using namespace lldb;
 namespace {
 
 #ifdef _WIN32
-using SetThreadDescriptionFunctionPtr = HRESULT
-WINAPI (*)(HANDLE hThread, PCWSTR lpThreadDescription);
+using SetThreadDescriptionFunctionPtr =
+    HRESULT(WINAPI *)(HANDLE hThread, PCWSTR lpThreadDescription);
 
 static SetThreadDescriptionFunctionPtr SetThreadName;
 #endif



More information about the flang-commits mailing list