[WinEH] Mark calls inside cleanups as noinline
This works around PR25162. The MSVC tables make it very difficult to correctly inline a C++ destructor that contains try / catch. We've attempted to address PR25162 in LLVM's backend, but it feels pretty infeasible. MSVC and ICC both appear to avoid inlining such complex destructors. Long term, we want to fix this by making the inliner smart enough to know when it is inlining into a cleanup, so it can inline simple destructors (~unique_ptr and ~vector) while avoiding destructors containing try / catch. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251576 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- lib/CodeGen/CGCall.cpp 8 additions, 2 deletionslib/CodeGen/CGCall.cpp
- lib/CodeGen/CGCleanup.cpp 14 additions, 9 deletionslib/CodeGen/CGCleanup.cpp
- lib/CodeGen/CodeGenFunction.h 5 additions, 0 deletionslib/CodeGen/CodeGenFunction.h
- test/CodeGenCXX/microsoft-abi-eh-cleanups.cpp 14 additions, 10 deletionstest/CodeGenCXX/microsoft-abi-eh-cleanups.cpp
Loading
Please register or sign in to comment