r262382 - Reword a misleading comment discussing landingpads and SEH

Reid Kleckner via cfe-commits cfe-commits at lists.llvm.org
Tue Mar 1 11:51:48 PST 2016


Author: rnk
Date: Tue Mar  1 13:51:48 2016
New Revision: 262382

URL: http://llvm.org/viewvc/llvm-project?rev=262382&view=rev
Log:
Reword a misleading comment discussing landingpads and SEH

SEH doesn't use landingpads anymore.

Modified:
    cfe/trunk/lib/CodeGen/CGException.cpp

Modified: cfe/trunk/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGException.cpp?rev=262382&r1=262381&r2=262382&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGException.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGException.cpp Tue Mar  1 13:51:48 2016
@@ -686,8 +686,10 @@ llvm::BasicBlock *CodeGenFunction::getIn
   assert(EHStack.requiresLandingPad());
   assert(!EHStack.empty());
 
-  // If exceptions are disabled, there are usually no landingpads. However, when
-  // SEH is enabled, functions using SEH still get landingpads.
+  // If exceptions are disabled and SEH is not in use, then there is no invoke
+  // destination. SEH "works" even if exceptions are off. In practice, this
+  // means that C++ destructors and other EH cleanups don't run, which is
+  // consistent with MSVC's behavior.
   const LangOptions &LO = CGM.getLangOpts();
   if (!LO.Exceptions) {
     if (!LO.Borland && !LO.MicrosoftExt)




More information about the cfe-commits mailing list