[PATCH] [ms-cxxabi] Construct and destroy call arguments in the correct order

Timur Iskhodzhanov timurrrr at google.com
Tue Dec 3 03:37:19 PST 2013


  some drive-by nitpicking


================
Comment at: lib/CodeGen/CGCall.cpp:1460
@@ +1459,3 @@
+  if (getTarget().getCXXABI().areArgsDestroyedLeftToRightInCallee()) {
+    for (unsigned i = Args.size() - 1, e = ~0U; i != e; --i)
+      EmitParmDecl(*Args[i], ArgVals[i], i + 1);
----------------
how about

  for (unsigned i = Args.size(); i != 0; --i)
    EmitParmDecl(*Args[i - 1], ArgVals[i - 1], i);

?

================
Comment at: lib/CodeGen/CGCall.cpp:2049
@@ +2048,3 @@
+    size_t CallArgsStart = Args.size();
+    for (int I = ArgTypes.size() - 1; I >= 0; --I) {
+      CallExpr::const_arg_iterator Arg = ArgBeg + I;
----------------
this isn't consistent with the other loops


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



More information about the cfe-commits mailing list