[PATCH] MS ABI: Implement copy-ctor closures, finish implementing throw
Reid Kleckner
rnk at google.com
Tue Mar 10 17:28:06 PDT 2015
================
Comment at: include/clang/Basic/ABI.h:28-29
@@ -29,1 +27,4 @@
+ Ctor_Comdat, ///< The COMDAT used for ctors
+ Ctor_CopyingClosure, ///< Copying closure variant of a ctor
+ Ctor_DefaultClosure, ///< Default closure variant of a ctor
};
----------------
I'm not super psyched about adding to this enum. What do you think about adding custom entry points to the MS C++ ABI that just tweak internal bools?
================
Comment at: lib/AST/MicrosoftMangle.cpp:782-788
@@ -781,9 +784,9 @@
- const auto *CD = cast<CXXConstructorDecl>(ND);
- if (CD->isDefaultConstructor()) {
- Out << "?_F";
- } else if (CD->isCopyConstructor()) {
+ if (Structor == getStructor(ND)) {
+ if (StructorType == Ctor_CopyingClosure) {
Out << "?_O";
- } else {
- llvm_unreachable("unexpected constructor closure!");
+ return;
+ }
+ if (StructorType == Ctor_DefaultClosure) {
+ Out << "?_F";
+ return;
}
- } else {
----------------
Oh dear, does isCopyConstructor() return false for the variadic test case?
http://reviews.llvm.org/D8225
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list