[PATCH] [ms-cxxabi] Construct and destroy call arguments in the correct order
Reid Kleckner
rnk at google.com
Tue Nov 26 13:01:40 PST 2013
Hi rjmccall, rsmith,
MSVC destroys arguments in the callee from left to right. Because C++
objects have to be destroyed in the reverse order of construction, clang
has to construct arguments from right to left and destroy arguments from
left to right.
This patch fixes the ordering by reversing the order of evaluation of
all call arguments under the MS C++ ABI.
Fixes PR18035.
http://llvm-reviews.chandlerc.com/D2275
Files:
include/clang/Basic/TargetCXXABI.h
lib/CodeGen/CGCall.cpp
lib/CodeGen/CGDecl.cpp
lib/CodeGen/CodeGenFunction.h
lib/Sema/SemaChecking.cpp
test/CodeGenCXX/microsoft-abi-arg-order.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D2275.1.patch
Type: text/x-patch
Size: 13311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20131126/6ca122f1/attachment.bin>
More information about the cfe-commits
mailing list