This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Don't return a dangling reference in getCallableResults().
ClosedPublic

Authored by definelicht on Oct 25 2022, 2:10 AM.

Details

Summary

Use the getReturnTypes() API (which returns an ArrayRef<Type>)
rather than the getReturnType() API (which returns a Type) to avoid
returning a dangling reference in LLVMFuncOp::getCallableResults().

Diff Detail

Event Timeline

definelicht created this revision.Oct 25 2022, 2:10 AM
Herald added a project: Restricted Project. · View Herald Transcript
definelicht requested review of this revision.Oct 25 2022, 2:10 AM
ftynse accepted this revision.Oct 25 2022, 2:34 AM
This revision is now accepted and ready to land.Oct 25 2022, 2:34 AM