diff options
author | David Majnemer <david.majnemer@gmail.com> | 2015-03-06 18:53:55 +0000 |
---|---|---|
committer | David Majnemer <david.majnemer@gmail.com> | 2015-03-06 18:53:55 +0000 |
commit | e7a818fec88726844e8acbfeb43da94dea81f4ca (patch) | |
tree | a318bfea08dc92c45a33ddbe7d52cf1a0225f83a /clang/include | |
parent | eafe55200c2cc996f24c27e2d26aa3bef897ff04 (diff) | |
download | bcm5719-llvm-e7a818fec88726844e8acbfeb43da94dea81f4ca.tar.gz bcm5719-llvm-e7a818fec88726844e8acbfeb43da94dea81f4ca.zip |
MS ABI: Insert copy-constructors into the CatchableType
Find all unambiguous public classes of the exception object's class type
and reference all of their copy constructors. Yes, this is not
conforming but it is necessary in order to implement their ABI. This is
because the copy constructor is actually referenced by the metadata
describing which catch handlers are eligible to handle the exception
object.
N.B. This doesn't yet handle the copy constructor closure case yet,
that work is ongoing.
Differential Revision: http://reviews.llvm.org/D8101
llvm-svn: 231499
Diffstat (limited to 'clang/include')
-rw-r--r-- | clang/include/clang/AST/ASTContext.h | 6 | ||||
-rw-r--r-- | clang/include/clang/AST/Mangle.h | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/clang/include/clang/AST/ASTContext.h b/clang/include/clang/AST/ASTContext.h index 9b22aa4a83f..de6b8c668de 100644 --- a/clang/include/clang/AST/ASTContext.h +++ b/clang/include/clang/AST/ASTContext.h @@ -2193,6 +2193,12 @@ public: /// it is not used. bool DeclMustBeEmitted(const Decl *D); + const CXXConstructorDecl * + getCopyConstructorForExceptionObject(CXXRecordDecl *RD); + + void addCopyConstructorForExceptionObject(CXXRecordDecl *RD, + CXXConstructorDecl *CD); + void setManglingNumber(const NamedDecl *ND, unsigned Number); unsigned getManglingNumber(const NamedDecl *ND) const; diff --git a/clang/include/clang/AST/Mangle.h b/clang/include/clang/AST/Mangle.h index be5c2e2855d..ef030d26b4f 100644 --- a/clang/include/clang/AST/Mangle.h +++ b/clang/include/clang/AST/Mangle.h @@ -203,8 +203,8 @@ public: virtual void mangleCXXCatchableTypeArray(QualType T, uint32_t NumEntries, raw_ostream &Out) = 0; - virtual void mangleCXXCatchableType(QualType T, uint32_t Size, - raw_ostream &Out) = 0; + virtual void mangleCXXCatchableType(QualType T, const CXXConstructorDecl *CD, + uint32_t Size, raw_ostream &Out) = 0; virtual void mangleCXXRTTIBaseClassDescriptor( const CXXRecordDecl *Derived, uint32_t NVOffset, int32_t VBPtrOffset, |