[llvm-commits] [llvm] r47848 - in /llvm/trunk/lib/VMCore: Function.cpp Verifier.cpp

Chris Lattner clattner at apple.com
Mon Mar 3 12:51:03 PST 2008


>> Why do you want to do this?  I think it would make sense to rename
>> isStructReturn to hasStructRetAttribute() or something, but I don't
>> think it makes sense to return true if the function returns multiple
>> results.  What does this fix?
>
> I did this to preserve the semantics - does function return structure,
> irrespective how return value is handled ?. If we want to  keep this
> predicate to check sret attr only then I'll rename this as
> hasStructRetAttribute().

Previous clients of this were safe to assume that the function's first  
argument was a pointer where the result is returned through.  I don't  
think you want to make this change.

-Chris



More information about the llvm-commits mailing list