With the Microsoft ABI, some destructors need to offset a parameter to
get the derived this pointer, in which case the type of that parameter
should not be a pointer to the derived type.
Fixes #60465
Paths
| Differential D143233
[Clang][CodeGen] Fix this argument type for certain destructors ClosedPublic Authored by jacobly on Feb 2 2023, 5:05 PM.
Details
Diff Detail
Event TimelineComment Actions Please be sure to add release notes to clang/docs/ReleaseNotes.rst Things look reasonable to me, but it'd be nice if someone with more Windows ABI experience could take a look as well.
Comment Actions If the parameter attributes are relevant, should we change the CHECK lines in the tests to check for them? At least for some of the tests. Once we fix these tests to enable opaque pointer types, you won't actually be checking for anything. This revision is now accepted and ready to land.Feb 13 2023, 2:07 PM Comment Actions I was hoping @rnk was available for review, but otherwise this is ready to land and I don't have commit access. Comment Actions Maybe worth cherry-picking to 16 branch? I think someone will need to rebase onto the branch for that, though; there was merge conflict on the microsoft-abi-eh-cleanups.cpp change. Comment Actions
I wouldn't be opposed to picking this onto 16 given that it's fixing an ABI issue, if someone wants to do the work to cherry-pick it. Comment Actions
https://github.com/llvm/llvm-project/issues/61124 https://github.com/llvm/llvm-project-release-prs/pull/336
Revision Contents
Diff 497097 clang/docs/ReleaseNotes.rst
clang/lib/CodeGen/CGCXXABI.h
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CGExprCXX.cpp
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/test/CodeGenCXX/constructor-destructor-return-this.cpp
clang/test/CodeGenCXX/cxx2a-destroying-delete.cpp
clang/test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
clang/test/CodeGenCXX/microsoft-abi-structors.cpp
clang/test/CodeGenCXX/microsoft-abi-virtual-inheritance.cpp
|