summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CGException.cpp
diff options
context:
space:
mode:
authorReid Kleckner <rnk@google.com>2016-03-01 19:51:48 +0000
committerReid Kleckner <rnk@google.com>2016-03-01 19:51:48 +0000
commit8f1b1f59213fc257c5b4169855e54a7e935d0232 (patch)
treefcd620dc5ce9bc1cdaec78bc1caa0f9befeed307 /clang/lib/CodeGen/CGException.cpp
parent2daaa1ceca4f4bce9893e1bd36860148dc04788c (diff)
downloadbcm5719-llvm-8f1b1f59213fc257c5b4169855e54a7e935d0232.tar.gz
bcm5719-llvm-8f1b1f59213fc257c5b4169855e54a7e935d0232.zip
Reword a misleading comment discussing landingpads and SEH
SEH doesn't use landingpads anymore. llvm-svn: 262382
Diffstat (limited to 'clang/lib/CodeGen/CGException.cpp')
-rw-r--r--clang/lib/CodeGen/CGException.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp
index 3c730008326..1b66141fb1d 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)
OpenPOWER on IntegriCloud