[PATCH] [ms-cxxabi] The "most derived" ctor parameter comes last

Timur Iskhodzhanov timurrrr at google.com
Fri Dec 13 10:40:05 PST 2013



================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:798
@@ -801,3 +797,3 @@
 
-  llvm::Value *ImplicitParam = 0;
-  QualType ImplicitParamTy;
+  // C++11 [class.mfct.non-static]p2:
+  //   If a non-static member function of a class X is called for an object that
----------------
I think this deserves a separate patch.
Also, why is it MS ABI specific?

================
Comment at: lib/CodeGen/CodeGenFunction.cpp:697
@@ -696,3 +696,3 @@
   CurGD = GD;
-  const CXXMethodDecl *MD;
+  const CXXMethodDecl *MD = 0;
   if ((MD = dyn_cast<CXXMethodDecl>(FD)) && MD->isInstance()) {
----------------
`= 0` is not needed here.

================
Comment at: lib/CodeGen/MicrosoftCXXABI.cpp:825
@@ -812,1 +824,3 @@
+  CGF.EmitCall(CGM.getTypes().arrangeCXXMethodCall(Args, FPT, required), Callee,
+               ReturnValueSlot(), Args, D);
 }
----------------
Hm, I don't like duplication code here.
In my version of the patch, I've added something like a `bool ImplicitParameterFollowsExplicit` parameter to EmitCXXMemberCall.

What do you think?

================
Comment at: lib/CodeGen/CodeGenFunction.h:2495
@@ -2494,2 +2494,3 @@
 
+public:
   /// EmitCallArgs - Emit call arguments for a function.
----------------
I don't like changing the public interface here, see my suggestion below.


http://llvm-reviews.chandlerc.com/D2405



More information about the cfe-commits mailing list