[LLVMdev] Returning multiple values from a function
Talin
viridia at gmail.com
Mon Feb 25 08:35:54 PST 2008
The language I am working on allows multiple return values from a function:
def myfunc() -> (int, String);
let a, b = myfunc();
I can think of two ways to implement this:
1) Return one of the values as the actual return value of the function,
and quietly convert the rest to reference arguments.
2) Define a temporary, anonymous struct and return it.
Which approach is likely to be more efficient, or is there a better
approach available?
-- Talin
More information about the llvm-dev
mailing list