[PATCH] MS ABI: Generate default constructor closures
David Majnemer
david.majnemer at gmail.com
Fri Mar 13 14:47:42 PDT 2015
Hi rnk, hansw,
The MS ABI utilizes a compiler generated function called the "vector
constructor iterator" to construct arrays of objects with
non-trivial constructors/destructors. For this to work, the constructor
must follow a specific calling convention. A thunk must be created if
the default constructor has default arguments, is variadic or is
otherwise incompatible. This thunk is called the default constructor
closure.
N.B. Default constructor closures are only generated if the default
constructor is exported because clang itself does not utilize vector
constructor iterators. Failing to export the default constructor
closure will result in link/load failure if a translation unit compiled
with MSVC is on the import side.
http://reviews.llvm.org/D8331
Files:
lib/AST/MicrosoftMangle.cpp
lib/CodeGen/CGCall.cpp
lib/CodeGen/CodeGenTypes.h
lib/CodeGen/MicrosoftCXXABI.cpp
lib/Sema/SemaDecl.cpp
test/CodeGenCXX/dllexport.cpp
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D8331.21960.patch
Type: text/x-patch
Size: 10605 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150313/d4a66b77/attachment.bin>
More information about the cfe-commits
mailing list