summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-06-21 12:45:15 +0000
committerReid Kleckner <reid@kleckner.net>2013-06-21 12:45:15 +0000
commit23f4c4b64f1a35be406c66ab4e0113a8522b4905 (patch)
tree32d612ab8a5015a669c0c918d0843099be1cf479 /clang/lib/CodeGen/MicrosoftCXXABI.cpp
parentae4e1ec4e6c616e50794d895555f8ebb49dd05f5 (diff)
downloadbcm5719-llvm-23f4c4b64f1a35be406c66ab4e0113a8522b4905.tar.gz
bcm5719-llvm-23f4c4b64f1a35be406c66ab4e0113a8522b4905.zip
[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 llvm-svn: 184543
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 1ff794695cb..929130bc476 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -36,7 +36,7 @@ public:
}
RecordArgABI getRecordArgABI(const CXXRecordDecl *RD) const {
- if (RD->hasNonTrivialCopyConstructor())
+ if (RD->hasNonTrivialCopyConstructor() || RD->hasNonTrivialDestructor())
return RAA_DirectInMemory;
return RAA_Default;
}
OpenPOWER on IntegriCloud