diff options
Diffstat (limited to 'clang/lib/CodeGen')
-rw-r--r-- | clang/lib/CodeGen/CGClass.cpp | 5 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGDeclCXX.cpp | 2 | ||||
-rw-r--r-- | clang/lib/CodeGen/CGException.cpp | 6 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.cpp | 3 | ||||
-rw-r--r-- | clang/lib/CodeGen/CodeGenFunction.h | 1 |
5 files changed, 8 insertions, 9 deletions
diff --git a/clang/lib/CodeGen/CGClass.cpp b/clang/lib/CodeGen/CGClass.cpp index fc239a536f9..8e88beb3cf0 100644 --- a/clang/lib/CodeGen/CGClass.cpp +++ b/clang/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, diff --git a/clang/lib/CodeGen/CGDeclCXX.cpp b/clang/lib/CodeGen/CGDeclCXX.cpp index 8b37e9af3c6..e295267896e 100644 --- a/clang/lib/CodeGen/CGDeclCXX.cpp +++ b/clang/lib/CodeGen/CGDeclCXX.cpp @@ -166,7 +166,7 @@ CreateGlobalInitOrDestructFunction(CodeGenModule &CGM, Fn->setSection(Section); } - if (!CGM.getLangOptions().Exceptions) + if (!CGM.getLangOptions().areExceptionsEnabled()) Fn->setDoesNotThrow(); return Fn; diff --git a/clang/lib/CodeGen/CGException.cpp b/clang/lib/CodeGen/CGException.cpp index 0e717e26ab3..6181965748c 100644 --- a/clang/lib/CodeGen/CGException.cpp +++ b/clang/lib/CodeGen/CGException.cpp @@ -439,7 +439,7 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) { } void CodeGenFunction::EmitStartEHSpec(const Decl *D) { - if (!Exceptions) + if (!CGM.getLangOptions().areExceptionsEnabled()) return; const FunctionDecl* FD = dyn_cast_or_null<FunctionDecl>(D); @@ -467,7 +467,7 @@ void CodeGenFunction::EmitStartEHSpec(const Decl *D) { } void CodeGenFunction::EmitEndEHSpec(const Decl *D) { - if (!Exceptions) + if (!CGM.getLangOptions().areExceptionsEnabled()) return; const FunctionDecl* FD = dyn_cast_or_null<FunctionDecl>(D); @@ -541,7 +541,7 @@ llvm::BasicBlock *CodeGenFunction::getInvokeDestImpl() { assert(EHStack.requiresLandingPad()); assert(!EHStack.empty()); - if (!Exceptions) + if (!CGM.getLangOptions().areExceptionsEnabled()) return 0; // Check the innermost scope for a cached landing pad. If this is diff --git a/clang/lib/CodeGen/CodeGenFunction.cpp b/clang/lib/CodeGen/CodeGenFunction.cpp index 96716ad9ccf..f1b72863cac 100644 --- a/clang/lib/CodeGen/CodeGenFunction.cpp +++ b/clang/lib/CodeGen/CodeGenFunction.cpp @@ -39,8 +39,7 @@ CodeGenFunction::CodeGenFunction(CodeGenModule &cgm) CXXThisDecl(0), CXXThisValue(0), CXXVTTDecl(0), CXXVTTValue(0), OutermostConditional(0), TerminateLandingPad(0), TerminateHandler(0), TrapBB(0) { - - Exceptions = getContext().getLangOptions().Exceptions; + CatchUndefined = getContext().getLangOptions().CatchUndefined; CGM.getCXXABI().getMangleContext().startNewFunction(); } diff --git a/clang/lib/CodeGen/CodeGenFunction.h b/clang/lib/CodeGen/CodeGenFunction.h index c19de38dc9b..67ef41448e8 100644 --- a/clang/lib/CodeGen/CodeGenFunction.h +++ b/clang/lib/CodeGen/CodeGenFunction.h @@ -582,7 +582,6 @@ public: /// we prefer to insert allocas. llvm::AssertingVH<llvm::Instruction> AllocaInsertPt; - bool Exceptions; bool CatchUndefined; const CodeGen::CGBlockInfo *BlockInfo; |