[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Erich Keane via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL288869: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor… (authored by erichkeane). Changed prior to commit: https://reviews.llvm.org/D27358?vs=80491=80505#toc Repository:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk accepted this revision. rnk added a comment. This revision is now accepted and ready to land. Looks good, please commit. If you don't have commit access, ask a coworker who does to land it, otherwise I'll try to get around to it at some point. Thanks for the fix! Repository: rL LLVM

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Erich Keane via Phabricator via cfe-commits
erichkeane added a comment. I'll land it, thanks! Repository: rL LLVM https://reviews.llvm.org/D27358 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 80491. jyu2 added a comment. last one missing test part diff. Sorry for that Repository: rL LLVM https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 updated this revision to Diff 80487. jyu2 added a comment. Remove unnecessary check. Repository: rL LLVM https://reviews.llvm.org/D27358 Files: CodeGen/MicrosoftCXXABI.cpp Index: CodeGen/MicrosoftCXXABI.cpp === ---

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. I changed! Thank you do much. Upload new patch. Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1530-1532 +const CXXRecordDecl *ClassDecl = + cast(CGF.CurCodeDecl)->getParent(); +if (ClassDecl != nullptr && ClassDecl->getNumVBases())

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. Looks pretty good, just one more thing. Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:1530-1532 +const CXXRecordDecl *ClassDecl = + cast(CGF.CurCodeDecl)->getParent(); +if (ClassDecl != nullptr && ClassDecl->getNumVBases())

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 set the repository for this revision to rL LLVM. jyu2 updated this revision to Diff 80462. jyu2 added a comment. A typo. Repository: rL LLVM https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 added a comment. Hi Reid, I know some problems(ms compatibility) when throw inside destructor. I have not yet look like those problems. I am new for clang. I need sometime to catch up. -:) Thank you so much for your code review. I had add new patch to address your suggestion.

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Jennifer Yu via Phabricator via cfe-commits
jyu2 removed rL LLVM as the repository for this revision. jyu2 updated this revision to Diff 80459. jyu2 added a comment. Update patch to address Reid's suggestion https://reviews.llvm.org/D27358 Files: lib/CodeGen/MicrosoftCXXABI.cpp test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp Index:

[PATCH] D27358: [MS-ABI]V-base dtor called more than needed when throw happens in v-base ctor in window. Need add "complete object flag" check in eh cleanup code.

2016-12-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. This highlights an interesting MS/Itanium C++ ABI difference. GCC and Clang emit cleanup landing pads in destructors to ensure that all subobjects are destroyed even if one throws an exception. In Mingw, both GCC and Clang print ~A and ~B for this program, but MSVC does