diff options
author | Timur Iskhodzhanov <timurrrr@google.com> | 2013-08-21 06:25:03 +0000 |
---|---|---|
committer | Timur Iskhodzhanov <timurrrr@google.com> | 2013-08-21 06:25:03 +0000 |
commit | 88fd439a24c3e889ea1b55e167e542b6d17b2242 (patch) | |
tree | b3544b746f2b96f5e9364ced9880556ea00c54e9 /clang/lib/CodeGen/CGExprCXX.cpp | |
parent | ed89b5c6e70733f86092496b469fe385b834d02f (diff) | |
download | bcm5719-llvm-88fd439a24c3e889ea1b55e167e542b6d17b2242.tar.gz bcm5719-llvm-88fd439a24c3e889ea1b55e167e542b6d17b2242.zip |
Abstract out virtual calls and virtual function prologue code generation; implement them for -cxx-abi microsoft
llvm-svn: 188870
Diffstat (limited to 'clang/lib/CodeGen/CGExprCXX.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGExprCXX.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGExprCXX.cpp b/clang/lib/CodeGen/CGExprCXX.cpp index 5ec135ea506..43318a73d56 100644 --- a/clang/lib/CodeGen/CGExprCXX.cpp +++ b/clang/lib/CodeGen/CGExprCXX.cpp @@ -299,7 +299,7 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, if (const CXXConstructorDecl *Ctor = dyn_cast<CXXConstructorDecl>(MD)) { Callee = CGM.GetAddrOfFunction(GlobalDecl(Ctor, Ctor_Complete), Ty); } else if (UseVirtualCall) { - Callee = BuildVirtualCall(MD, This, Ty); + Callee = CGM.getCXXABI().getVirtualFunctionPointer(*this, MD, This, Ty); } else { if (getLangOpts().AppleKext && MD->isVirtual() && @@ -312,6 +312,9 @@ RValue CodeGenFunction::EmitCXXMemberCallExpr(const CXXMemberCallExpr *CE, } } + if (MD->isVirtual()) + This = CGM.getCXXABI().adjustThisArgumentForVirtualCall(*this, MD, This); + return EmitCXXMemberCall(MD, CE->getExprLoc(), Callee, ReturnValue, This, /*ImplicitParam=*/0, QualType(), CE->arg_begin(), CE->arg_end()); |