summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGVTables.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2013-12-17 19:46:40 +0000
committerReid Kleckner <reid@kleckner.net>2013-12-17 19:46:40 +0000
commit89077a1b008a575c148e08f138aa7c270d4f7323 (patch)
tree36f30bee9777818abc9efb1096f33e92e4e92922 /clang/lib/CodeGen/CGVTables.cpp
parentf869ad15a3d86a56d311e80406d4fdaf17060080 (diff)
downloadbcm5719-llvm-89077a1b008a575c148e08f138aa7c270d4f7323.tar.gz
bcm5719-llvm-89077a1b008a575c148e08f138aa7c270d4f7323.zip
[ms-cxxabi] The 'most derived' ctor parameter usually comes last
Unlike Itanium's VTTs, the 'most derived' boolean or bitfield is the last parameter for non-variadic constructors, rather than the second. For variadic constructors, the 'most derived' parameter comes after the 'this' parameter. This affects constructor calls and constructor decls in a variety of places. Reviewers: timurrrr Differential Revision: http://llvm-reviews.chandlerc.com/D2405 llvm-svn: 197518
Diffstat (limited to 'clang/lib/CodeGen/CGVTables.cpp')
-rw-r--r--clang/lib/CodeGen/CGVTables.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/CGVTables.cpp b/clang/lib/CodeGen/CGVTables.cpp
index 894e81ca297..a5967fddf24 100644
--- a/clang/lib/CodeGen/CGVTables.cpp
+++ b/clang/lib/CodeGen/CGVTables.cpp
@@ -253,7 +253,7 @@ void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD,
FunctionArgList FunctionArgs;
// Create the implicit 'this' parameter declaration.
- CGM.getCXXABI().BuildInstanceFunctionParams(*this, ResultType, FunctionArgs);
+ CGM.getCXXABI().buildThisParam(*this, FunctionArgs);
// Add the rest of the parameters.
for (FunctionDecl::param_const_iterator I = MD->param_begin(),
@@ -261,6 +261,9 @@ void CodeGenFunction::StartThunk(llvm::Function *Fn, GlobalDecl GD,
I != E; ++I)
FunctionArgs.push_back(*I);
+ if (isa<CXXDestructorDecl>(MD))
+ CGM.getCXXABI().addImplicitStructorParams(*this, ResultType, FunctionArgs);
+
// Start defining the function.
StartFunction(GlobalDecl(), ResultType, Fn, FnInfo, FunctionArgs,
SourceLocation());
OpenPOWER on IntegriCloud