[LLVMdev] Multiple Returns
Chris Lattner
sabre at nondot.org
Mon Apr 26 12:49:03 PDT 2004
On Mon, 26 Apr 2004, Bill Wendling wrote:
> Quick question: What is the best way to have multiple return values from
> a function? Would that be placing these into a structure and returning
> that to the caller?
Yup, that's what the C front-end currently does. It transforms functions
like this:
Struct foo()
into:
void foo(Struct *S)
And foo fills in the indicated structure.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list