]> granicus.if.org Git - clang/commitdiff
Get rid of the areExceptionsEnabled() getter from LangOptions.
authorAnders Carlsson <andersca@mac.com>
Mon, 28 Feb 2011 00:33:03 +0000 (00:33 +0000)
committerAnders Carlsson <andersca@mac.com>
Mon, 28 Feb 2011 00:33:03 +0000 (00:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126598 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/LangOptions.h
lib/Analysis/CFG.cpp
lib/CodeGen/CGClass.cpp
lib/CodeGen/CGDeclCXX.cpp
lib/CodeGen/CGException.cpp

index 0bd983e8e6c68a1dbc307b924905ae080d057268..35dfdb6c3a9f131750b47ce99c3cf8ce061f191d 100644 (file)
@@ -239,10 +239,6 @@ public:
   void setSignedOverflowBehavior(SignedOverflowBehaviorTy V) {
     SignedOverflowBehavior = (unsigned)V;
   }
-
-  bool areExceptionsEnabled() const {
-    return Exceptions;
-  }
 };
 
 /// Floating point control options
index cc6e9c592a1e30d9b65c41802d669899d6d47b4f..d2cccc8d2b923a511973800f9398a1d359872915 100644 (file)
@@ -1099,7 +1099,7 @@ CFGBlock *CFGBuilder::VisitCallExpr(CallExpr *C, AddStmtChoice asc) {
   bool AddEHEdge = false;
 
   // Languages without exceptions are assumed to not throw.
-  if (Context->getLangOptions().areExceptionsEnabled()) {
+  if (Context->getLangOptions().Exceptions) {
     if (BuildOpts.AddEHEdges)
       AddEHEdge = true;
   }
index cd28bbe44db539290d0ce616974abfbd6f0f40fe..fbc5f3f030c8f798f3671b82449773dc588251eb 100644 (file)
@@ -407,7 +407,7 @@ static void EmitBaseInitializer(CodeGenFunction &CGF,
 
   CGF.EmitAggExpr(BaseInit->getInit(), AggSlot);
   
-  if (CGF.CGM.getLangOptions().areExceptionsEnabled() && 
+  if (CGF.CGM.getLangOptions().Exceptions && 
       !BaseClassDecl->hasTrivialDestructor())
     CGF.EHStack.pushCleanup<CallBaseDtor>(EHCleanup, BaseClassDecl,
                                           isBaseVirtual);
@@ -606,7 +606,7 @@ static void EmitMemberInitializer(CodeGenFunction &CGF,
     
     EmitAggMemberInitializer(CGF, LHS, ArrayIndexVar, MemberInit, FieldType, 0);
     
-    if (!CGF.CGM.getLangOptions().areExceptionsEnabled())
+    if (!CGF.CGM.getLangOptions().Exceptions)
       return;
 
     // FIXME: If we have an array of classes w/ non-trivial destructors, 
index e295267896eb577e44c83f15ca0d5b3e1f3d93e3..8b37e9af3c6d830d5f1c60359b2d45e3ea4c992c 100644 (file)
@@ -166,7 +166,7 @@ CreateGlobalInitOrDestructFunction(CodeGenModule &CGM,
       Fn->setSection(Section);
   }
 
-  if (!CGM.getLangOptions().areExceptionsEnabled())
+  if (!CGM.getLangOptions().Exceptions)
     Fn->setDoesNotThrow();
 
   return Fn;
index 4bce081e48dd5c23885ab6b76a632c7bd2594f05..eb907e1fff21831afc6e5b2a4f77dbf15bb4fd3a 100644 (file)
@@ -439,7 +439,7 @@ void CodeGenFunction::EmitCXXThrowExpr(const CXXThrowExpr *E) {
 }
 
 void CodeGenFunction::EmitStartEHSpec(const Decl *D) {
-  if (!CGM.getLangOptions().areExceptionsEnabled())
+  if (!CGM.getLangOptions().Exceptions)
     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 (!CGM.getLangOptions().areExceptionsEnabled())
+  if (!CGM.getLangOptions().Exceptions)
     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 (!CGM.getLangOptions().areExceptionsEnabled())
+  if (!CGM.getLangOptions().Exceptions)
     return 0;
 
   // Check the innermost scope for a cached landing pad.  If this is