[LLVMdev] byval and copy constructors / destructors.

Óscar Fuentes ofv at wanadoo.es
Fri Sep 25 23:36:02 PDT 2009

On gcc/x86, when a class or struct has a copy constructor or destructor
and is passed by value to a function, the caller creates a temporary
copy and passes a pointer to the copy. LLVM does the same.

msvc++ does not use the pointer trick. It puts the class on the stack
like any other function parameter.

How to pass a class parameter `byval' while honoring the copy
constructor and/or destructor?


More information about the llvm-dev mailing list