<div dir="ltr"><div><div>Hi,<br><br></div><div>I would like to propose to remove the CleanupHackLevel from CGException.cpp.  This hack was originally written for the old exception handling intrinsics, which have several issues with function inliner.  (Read [1] for more background on this hack.)<br>

<br>Since LLVM 3.0, the new exception handling mechanism has been proposed and implemented [1].  The landingpad and resume instructions are added to LLVM IR.  AFAIK, the new exception handling mechanism works very well, and solved most of the problems.<br>

</div><br>From the svn log, the CleanupHackLevel code hasn't be used for a long time.  It is guarded by a compile-time constant `CleanupHackLevel`.  The alternative cases will be considered as the dead code and removed by the compiler.  In addition, there is no test case covering these cases.  I feel that it's a good time to remove them.<br>

<br></div><div>I have attached the patch to remove the code.  Please have a look.  Feel free to let me know if you have any suggestions.  Thanks.<br><br></div><div>Sincerely,<br></div><div>Logan<br></div><div><br>
[1] <a href="http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/041748.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/llvmdev/2011-July/041748.html</a><br></div></div>