This diff fixes linkage and visibility of template parameter objects.
The associated GitHub issue: https://github.com/llvm/llvm-project/issues/51571#
Test plan:
1/ ninja check-all
2/ bootstrapped Clang passes tests
Paths
| Differential D145859
[Clang][CodeGen] Fix linkage and visibility of template parameter objects ClosedPublic Authored by alexander-shaposhnikov on Mar 11 2023, 9:38 PM.
Details Summary This diff fixes linkage and visibility of template parameter objects. Test plan:
Diff Detail
Event Timelinealexander-shaposhnikov created this object with visibility "All Users". Comment Actions Looks good. If you want to look at the visibility side of this separately I think that's fine (I only called it out here because we often consider them at the same time).
This revision is now accepted and ready to land.Mar 13 2023, 3:58 PM efriedma changed the visibility from "All Users" to "Public (No Login Required)".Mar 13 2023, 4:01 PM alexander-shaposhnikov retitled this revision from [Clang][CodeGen] Fix linkage of template parameter objects to [Clang][CodeGen] Fix linkage and visibility of template parameter objects. alexander-shaposhnikov marked an inline comment as done. This revision was landed with ongoing or failed builds.Mar 14 2023, 11:23 AM Closed by commit rG8403ccdcd28c: [Clang][CodeGen] Fix linkage and visibility of template parameter objects (authored by alexander-shaposhnikov). · Explain Why This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 505175 clang/lib/CodeGen/CodeGenModule.cpp
clang/test/CodeGenCXX/template-param-objects-linkage.cpp
clang/test/CodeGenCXX/template-param-objects-visibility.cpp
clang/test/CodeGenCXX/template-param-objects.cpp
|
I think we should be taking the visibility into account in some way too. For example, if the type of the template parameter object involves a type with hidden visibility, then the template parameter object itself should have hidden visibility.
Can we call setGVProperties(GV, TPO); here? It looks like that would do the right thing for visibility.