mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-02 08:01:11 +03:00
Propagate "nothrow" to LLVM IR (#1202)
Invoke nothrow callees only in try-blocks with at least 1 catch-block, otherwise call them directly. Errors thrown by nothrow callees can thus still be caught inside a try-catch-statement (and this is apparently required for release builds too). Most calls will be direct calls though, and this small change will lead to substantially less IR as we then skip the clean-ups after an Error. Proper clean-up when unwinding after an Error seems not to be guaranteed anyway. There are apparent RAII front-end optimizations for structs with nothrow dtor - see PR #1656.
This commit is contained in:
parent
798cda0649
commit
f4a22f232b
5 changed files with 97 additions and 5 deletions
|
@ -14,7 +14,6 @@
|
|||
#include "gen/tollvm.h"
|
||||
#include "ir/irdsymbol.h"
|
||||
|
||||
|
||||
IrFunction::IrFunction(FuncDeclaration *fd) : FMF() {
|
||||
decl = fd;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue