http://llvm.org/bugs/show_bug.cgi?id=16390
Bug ID: 16390
Summary: [Windows] C++ objects are passed as byval when using
Itanium C++ ABI
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: [email protected]
Reporter: [email protected]
CC: [email protected], [email protected]
Classification: Unclassified
This is because C and C++ structs on Windows are passed directly in argument
stack slots.
However, for C++ objects this is actually totally broken, since they have to be
copied with the copy ctor. Furthermore, those objects are cleaned up by the
callee, which isn't consistent with Itanium or standard C++. Implementing this
corner of the C++ ABI is covered by http://llvm.org/bugs/show_bug.cgi?id=16226
.
If we're targetting win32 (not mingw or cygwin) and we're using the Itanium C++
ABI, then we fail to call the copy ctor on these objects.
Long term, it's not actually clear if we want to support our own hybrid win32 C
ABI + Itanium C++ ABI where we pass standard layout structs byval and C++
objects indirectly. I'd much rather force users to pick between a mingw ABI
and a win32 ABI which encompasses both C and C++.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs