rnk added inline comments.
================ Comment at: lib/CodeGen/CodeGenFunction.h:3570 for (auto *A : llvm::make_range(Arg, ArgRange.end())) - ArgTypes.push_back(getVarArgType(A)); + ArgTypes.push_back(getVarArgType(A, CallArgTypeInfo == nullptr)); ---------------- rnk wrote: > I'm testing this change: > ``` > $ git diff > diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h > index acf8863..2662ebb 100644 > --- a/lib/CodeGen/CodeGenFunction.h > +++ b/lib/CodeGen/CodeGenFunction.h > @@ -3571,7 +3571,8 @@ public: > > // If we still have any arguments, emit them using the type of the > argument. > for (auto *A : llvm::make_range(Arg, ArgRange.end())) > - ArgTypes.push_back(getVarArgType(A)); > + ArgTypes.push_back(CalleeDecl->isVariadic() ? getVarArgType(A) > + : A->getType()); > > EmitCallArgs(Args, ArgTypes, ArgRange, CalleeDecl, ParamsToSkip, Order); > } > > ``` > > I'd like to fix this issue in a separate commit. So, that didn't work at all, but the gist of it is that I don't think we should call a function like `getVarArgType` when we aren't lowering a variadic function call. I'll look into doing it. https://reviews.llvm.org/D28166 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits