MS ABI: Implement copy-ctor closures, finish implementing throw
authorDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)
committerDavid Majnemer <david.majnemer@gmail.com>
Wed, 11 Mar 2015 18:36:39 +0000 (18:36 +0000)
commitdfa6d2067c8c782c83be69a61fe59a0240535df6
tree6223cf5bbe42de63a13b9301deb125b41e56de86
parent4320495319466c12543985ff7e653aedf81f8f36
MS ABI: Implement copy-ctor closures, finish implementing throw

This adds support for copy-constructor closures.  These are generated
when the C++ runtime has to call a copy-constructor with a particular
calling convention or with default arguments substituted in to the call.

Because the runtime has no mechanism to call the function with a
different calling convention or know-how to evaluate the default
arguments at run-time, we create a thunk which will do all the
appropriate work and package it in a way the runtime can use.

Differential Revision: http://reviews.llvm.org/D8225

llvm-svn: 231952
14 files changed:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/Mangle.h
clang/include/clang/Basic/ABI.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/CXXABI.h
clang/lib/AST/ItaniumCXXABI.cpp
clang/lib/AST/ItaniumMangle.cpp
clang/lib/AST/MicrosoftCXXABI.cpp
clang/lib/AST/MicrosoftMangle.cpp
clang/lib/CodeGen/CGCall.cpp
clang/lib/CodeGen/CodeGenTypes.h
clang/lib/CodeGen/MicrosoftCXXABI.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/test/CodeGenCXX/microsoft-abi-throw.cpp