[llvm] [llvm] annotate interfaces in llvm/Support for DLL export (PR #136014)
Andrew Rogers via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 23 14:20:03 PDT 2025
andrurogerz wrote:
I did a bit more clean-up of the manual fixups I had made and force-pushed so the commit history is clean. I found there were a number of classes where I unnecessarily promoted the export macro to the class level. I think I had done these prior to concluding we should do method-level annotations.
The classes I was able to revert back to original IDS auto-modded were:
```
BinaryStreamReader
InitializeCOMRAII
OptionCategory
SubCommand
directory_entry
InitLLVM
line_iterator
SMDiagnostic
StringSaver
Timer
CleanupInstaller
ToolOutputFile
WithColor
```
I also did some quick experimenting and found that the times where the export macro truly requires promotion to class-level is when the class (not a parent or child) has a virtual method that is defined external to class declaration (e.g., in the implementation file not the header). I think we can detect and automate this case in IDS to further avoid the need for manual fixups, and I will take a look into doing that.
https://github.com/llvm/llvm-project/pull/136014
More information about the llvm-commits
mailing list