summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/MicrosoftCXXABI.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-03-17 19:00:50 +0000
committerReid Kleckner <reid@kleckner.net>2015-03-17 19:00:50 +0000
commitbba3cb95cc548e8700eaf00f74268c1cfcef2fa8 (patch)
tree7ef4d47f50ac517278043a5b855e70d1c8427257 /clang/lib/CodeGen/MicrosoftCXXABI.cpp
parent426025222228658060bba5aaea98a1bc1b090cb0 (diff)
downloadbcm5719-llvm-bba3cb95cc548e8700eaf00f74268c1cfcef2fa8.tar.gz
bcm5719-llvm-bba3cb95cc548e8700eaf00f74268c1cfcef2fa8.zip
MS ABI: Delay default constructor closure checking until the outermost class scope ends
Previously, we would error out on this code because the default argument wasn't parsed until the end of Outer: struct __declspec(dllexport) Outer { struct __declspec(dllexport) Inner { Inner(void *p = 0); }; }; Now we do the checking on the closing brace of Outer instead of Inner. llvm-svn: 232519
Diffstat (limited to 'clang/lib/CodeGen/MicrosoftCXXABI.cpp')
-rw-r--r--clang/lib/CodeGen/MicrosoftCXXABI.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/MicrosoftCXXABI.cpp b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
index 89f0d4fa3bf..6ab57f430f8 100644
--- a/clang/lib/CodeGen/MicrosoftCXXABI.cpp
+++ b/clang/lib/CodeGen/MicrosoftCXXABI.cpp
@@ -3309,6 +3309,8 @@ MicrosoftCXXABI::getAddrOfCXXCtorClosure(const CXXConstructorDecl *CD,
QualType RecordTy = getContext().getRecordType(RD);
llvm::Function *ThunkFn = llvm::Function::Create(
ThunkTy, getLinkageForRTTI(RecordTy), ThunkName.str(), &CGM.getModule());
+ ThunkFn->setCallingConv(static_cast<llvm::CallingConv::ID>(
+ FnInfo.getEffectiveCallingConvention()));
bool IsCopy = CT == Ctor_CopyingClosure;
// Start codegen.
OpenPOWER on IntegriCloud