[LLVMbugs] [Bug 16226] New: [-cxx-abi microsoft] C++ objects passed by value are constructed in place on the argument stack slots
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Jun 4 13:51:25 PDT 2013
http://llvm.org/bugs/show_bug.cgi?id=16226
Bug ID: 16226
Summary: [-cxx-abi microsoft] C++ objects passed by value are
constructed in place on the argument stack slots
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 kind of a big problem, since I don't know how to represent this in LLVM
IR. I'm also not sure how to file this, since it cuts across the ABI lowering
in Clang and LLVM.
MSVC lowers this code like this:
struct S {
S();
~S();
int a, b;
};
void foo(S s) {
// ~S() is called before return
}
void bar() {
S t;
foo(t); // S(const S &) is called on t.
}
LLVM arguments are always passed by value, and there's no way to talk about the
stack space that they may or may not use depending on target architecture.
Would it make sense to invent some kind of special alloca to handle this case?
--
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/20130604/b801ffb6/attachment.html>
More information about the llvm-bugs
mailing list