Displaying 1 result from an estimated 1 matches for "mayfail".
2020 Jan 26
2
[RFC] Replacing inalloca with llvm.call.setup and preallocated
...ormal cleanup to
call `llvm.eh.teardown`. Consider:
```c++
#define RETURN_IF_ERR(maybeError) \
({ \
auto val = maybeError; \
if (val.isError()) \
return val.getError(); \
val.getValue; \
})
ErrorOr<int> mayFail();
void use_callsetup(int, Foo);
void f(bool cond) {
use_callsetup(RETURN_IF_ERR(mayFail()), Foo());
}
```
### Inlining non-EH code into EH code
If exceptions are disabled, the frontend should not emit exceptional
cleanups
to teardown the call region. However, this code could be inlined into a...