From: Reid Kleckner Date: Tue, 1 Mar 2016 19:51:48 +0000 (+0000) Subject: Reword a misleading comment discussing landingpads and SEH X-Git-Tag: llvmorg-3.9.0-rc1~12778 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8f1b1f59213fc257c5b4169855e54a7e935d0232;p=platform%2Fupstream%2Fllvm.git Reword a misleading comment discussing landingpads and SEH SEH doesn't use landingpads anymore. llvm-svn: 262382 --- diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 3c73000..1b66141 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -686,8 +686,10 @@ llvm::BasicBlock *CodeGenFunction::getInvokeDestImpl() { 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)