[LLVMdev] Struct parameters being converted to other types

Anton Korobeynikov anton at korobeynikov.info
Mon Jan 14 22:41:43 PST 2013


> When a function with a struct parameter or return type is compiled with `clang -O0 -emit-llvm`, the resulting bitcode varies greatly depending on the type of struct.
This mostly the question for cfe-dev, not llvm-dev, since you're
talking about clang, not LLVM itself.

However, the answer is easy. The struct is lowered to something which
corresponds to C/C++ ABI on your platform for passing the struct in
proper way.

--
With best regards, Anton Korobeynikov
Faculty of Mathematics and Mechanics, Saint Petersburg State University



More information about the llvm-dev mailing list