diff options
author | Reid Kleckner <reid@kleckner.net> | 2015-03-17 19:00:50 +0000 |
---|---|---|
committer | Reid Kleckner <reid@kleckner.net> | 2015-03-17 19:00:50 +0000 |
commit | bba3cb95cc548e8700eaf00f74268c1cfcef2fa8 (patch) | |
tree | 7ef4d47f50ac517278043a5b855e70d1c8427257 /clang/lib/CodeGen/MicrosoftCXXABI.cpp | |
parent | 426025222228658060bba5aaea98a1bc1b090cb0 (diff) | |
download | bcm5719-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.cpp | 2 |
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. |