[LLVMbugs] [Bug 16390] New: [Windows] C++ objects are passed as byval when using Itanium C++ ABI

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jun 20 10:12:04 PDT 2013


            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: unassignedclangbugs at nondot.org
          Reporter: reid.kleckner at gmail.com
                CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
    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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20130620/9ed6ea8b/attachment.html>

More information about the llvm-bugs mailing list