Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[lldb][NFC] Fix compilation issue on windows #76453

Merged
merged 3 commits into from
Jan 4, 2024

Conversation

gmh5225
Copy link
Contributor

@gmh5225 gmh5225 commented Dec 27, 2023

No description provided.

Copy link

Thank you for submitting a Pull Request (PR) to the LLVM Project!

This PR will be automatically labeled and the relevant teams will be
notified.

If you wish to, you can add reviewers by using the "Reviewers" section on this page.

If this is not working for you, it is probably because you do not have write
permissions for the repository. In which case you can instead tag reviewers by
name in a comment by using @ followed by their GitHub username.

If you have received no comments on your PR for a week, you can request a review
by "ping"ing the PR by adding a comment “Ping”. The common courtesy "ping" rate
is once a week. Please remember that you are asking for valuable time from other developers.

If you have further questions, they may be answered by the LLVM GitHub User Guide.

You can also ask questions in a comment on this PR, on the LLVM Discord or on the forums.

@llvmbot llvmbot added the lldb label Dec 27, 2023
@llvmbot
Copy link
Collaborator

llvmbot commented Dec 27, 2023

@llvm/pr-subscribers-lldb

Author: gmh (gmh5225)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/76453.diff

1 Files Affected:

  • (modified) lldb/source/Plugins/Process/Windows/Common/TargetThreadWindows.cpp (+2-2)
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)

@DavidSpickett
Copy link
Collaborator

Our Windows bot actually uses clang-cl, I assume msvc is checking the calling convention here.

Going by https://learn.microsoft.com/en-us/cpp/cpp/stdcall?view=msvc-170, it should be stdcall and WINAPI is just stdcall (https://learn.microsoft.com/en-us/office/client-developer/excel/developing-dlls?redirectedfrom=MSDN#exporting-functions-and-commands).

@DavidSpickett
Copy link
Collaborator

Please update lldb/unittests/Thread/ThreadTest.cpp as well.

@gmh5225
Copy link
Contributor Author

gmh5225 commented Jan 3, 2024

Please update lldb/unittests/Thread/ThreadTest.cpp as well.

Thanks for your correction.

@DavidSpickett DavidSpickett merged commit f3f4387 into llvm:main Jan 4, 2024
4 checks passed
@gmh5225 gmh5225 deleted the gmh5225-patch-1 branch January 5, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants