aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGClass.cpp
diff options
context:
space:
mode:
authorAnders Carlsson <andersca@mac.com>2011-02-20 00:20:27 +0000
committerAnders Carlsson <andersca@mac.com>2011-02-20 00:20:27 +0000
commitc1cfdf8647a499b6b3024f4bd14a236cddb23988 (patch)
tree07b87aed1f31e66a219553c3ed564299e3ae7c8f /lib/CodeGen/CGClass.cpp
parentda4b7cf09ebfd4e4098b516081fa9dae2f5c99e0 (diff)
Add a LangOptions::areExceptionsEnabled and start using it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126062 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGClass.cpp')
-rw-r--r--lib/CodeGen/CGClass.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/CGClass.cpp b/lib/CodeGen/CGClass.cpp
index fc239a536f..8e88beb3cf 100644
--- a/lib/CodeGen/CGClass.cpp
+++ b/lib/CodeGen/CGClass.cpp
@@ -406,7 +406,8 @@ static void EmitBaseInitializer(CodeGenFunction &CGF,
CGF.EmitAggExpr(BaseInit->getInit(), AggSlot);
- if (CGF.Exceptions && !BaseClassDecl->hasTrivialDestructor())
+ if (CGF.CGM.getLangOptions().areExceptionsEnabled() &&
+ !BaseClassDecl->hasTrivialDestructor())
CGF.EHStack.pushCleanup<CallBaseDtor>(EHCleanup, BaseClassDecl,
isBaseVirtual);
}
@@ -604,7 +605,7 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
EmitAggMemberInitializer(CGF, LHS, ArrayIndexVar, MemberInit, FieldType, 0);
- if (!CGF.Exceptions)
+ if (!CGF.CGM.getLangOptions().areExceptionsEnabled())
return;
// FIXME: If we have an array of classes w/ non-trivial destructors,