]> granicus.if.org Git - clang/commit
[ms-cxxabi] Destroy temporary record arguments in the callee
authorReid Kleckner <reid@kleckner.net>
Fri, 21 Jun 2013 12:45:15 +0000 (12:45 +0000)
committerReid Kleckner <reid@kleckner.net>
Fri, 21 Jun 2013 12:45:15 +0000 (12:45 +0000)
commit9b60195ad4843c9e2e231673a0dbc0d5c8c6eb2b
treeb798c2ab6da7e12b21265d756fd18f02c8634f70
parent8c5f948beae22f1b65b8c29b4ba2ac1e3b7dacb5
[ms-cxxabi] Destroy temporary record arguments in the callee

Itanium destroys them in the caller at the end of the full expression,
but MSVC destroys them in the callee.  This is further complicated by
the need to emit EH-only destructor cleanups in the caller.

This should help clang compile MSVC's debug iterators more correctly.
There is still an outstanding issue in PR5064 of a memcpy emitted by the
LLVM backend, which is not correct for C++ records.

Fixes PR16226.

Reviewers: rjmccall

Differential Revision: http://llvm-reviews.chandlerc.com/D929

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184543 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/TargetCXXABI.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGCall.h
lib/CodeGen/CGDecl.cpp
lib/CodeGen/MicrosoftCXXABI.cpp
lib/Sema/SemaChecking.cpp
test/CodeGenCXX/microsoft-abi-exceptions.cpp [new file with mode: 0644]
test/CodeGenCXX/microsoft-abi-sret-and-byval.cpp
test/SemaCXX/microsoft-dtor-lookup.cpp