llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

Possibly missplaced comment

Open hawkinsw opened this issue 1 year ago • 2 comments

https://github.com/llvm/llvm-project/blob/73f5f83b192b0a27f7edae5365c247961d9f1bd9/lldb/source/Core/ModuleList.cpp#L809

I am a huge fan of lldb and I try to help where I can. I noticed that there were two instances of the comment above in ModuleList::GetSharedModule that do not appear to be in the proper spot.

They appear near calls to FindModules on the shared module list instance -- and that does take a local lock on the list while it is executing but, because it is an RAII lock, it is dropped upon function completion.

I went back through the blame and attempted to see whether the comment was moved because of a copy/paste error but cannot seem to find anything.

It seems like the comment should go near

https://github.com/llvm/llvm-project/blob/73f5f83b192b0a27f7edae5365c247961d9f1bd9/lldb/source/Core/ModuleList.cpp#L794

All this is to say ... if it is the case that the comment is misplaced, I would be more than happy to submit a PR. However, I wanted to confirm with you all first because I am not an expert on this code and could be absolutely getting it wrong.

Thank you for everything! Will

hawkinsw avatar Jul 04 '24 02:07 hawkinsw