Make a pass to remove the Expression::Return instruction

So it doesn't appear in the LLR and the C++ codegen can be simplified.
In particular, this removes the need to throw/catch exception to handle return
across generated lambdas
This commit is contained in:
Olivier Goffart 2023-09-06 14:10:26 +02:00 committed by GitHub
parent a565ed53fd
commit cf19749943
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 511 additions and 96 deletions

View file

@ -117,16 +117,6 @@ inline vtable::Layout drop_in_place(ComponentRef component)
# endif
#endif // !defined(DOXYGEN)
template<typename T>
struct ReturnWrapper
{
ReturnWrapper(T val) : value(std::move(val)) { }
T value;
};
template<>
struct ReturnWrapper<void>
{
};
} // namespace private_api
template<typename T>