summaryrefslogtreecommitdiffstats
path: root/clang/lib/AST/CXXABI.h
diff options
context:
space:
mode:
authorDavid Majnemer <david.majnemer@gmail.com>2015-03-06 18:53:55 +0000
committerDavid Majnemer <david.majnemer@gmail.com>2015-03-06 18:53:55 +0000
commite7a818fec88726844e8acbfeb43da94dea81f4ca (patch)
treea318bfea08dc92c45a33ddbe7d52cf1a0225f83a /clang/lib/AST/CXXABI.h
parenteafe55200c2cc996f24c27e2d26aa3bef897ff04 (diff)
downloadbcm5719-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/lib/AST/CXXABI.h')
-rw-r--r--clang/lib/AST/CXXABI.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/clang/lib/AST/CXXABI.h b/clang/lib/AST/CXXABI.h
index 8e9e358525e..62c96f901e6 100644
--- a/clang/lib/AST/CXXABI.h
+++ b/clang/lib/AST/CXXABI.h
@@ -20,6 +20,7 @@
namespace clang {
class ASTContext;
+class CXXConstructorDecl;
class MemberPointerType;
class MangleNumberingContext;
@@ -41,6 +42,14 @@ public:
/// Returns a new mangling number context for this C++ ABI.
virtual MangleNumberingContext *createMangleNumberingContext() const = 0;
+
+ /// Adds a mapping from class to copy constructor for this C++ ABI.
+ virtual void addCopyConstructorForExceptionObject(CXXRecordDecl *,
+ CXXConstructorDecl *) = 0;
+
+ /// Retrieves the mapping from class to copy constructor for this C++ ABI.
+ virtual const CXXConstructorDecl *
+ getCopyConstructorForExceptionObject(CXXRecordDecl *) = 0;
};
/// Creates an instance of a C++ ABI class.
OpenPOWER on IntegriCloud