]> granicus.if.org Git - clang/commitdiff
Fix a tiny goof in the Driver's logic which caused the explicit presence
authorChandler Carruth <chandlerc@gmail.com>
Mon, 28 Feb 2011 07:25:18 +0000 (07:25 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 28 Feb 2011 07:25:18 +0000 (07:25 +0000)
of -fexceptions to disably C++ exceptions. The correct code was in the
ObjC branch, this just mirrors that logic on the C++ side of things.
Thanks to John Wiegley for pointing this out.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@126640 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Driver/Tools.cpp

index 475b904b063429720a8726f3082d160192c081b5..6f373658eb55c627ee1ef7588bd1dd903b5c8804 100644 (file)
@@ -845,7 +845,7 @@ static void addExceptionArgs(const ArgList &Args, types::ID InputType,
                                  options::OPT_fno_exceptions)) {
       if (A->getOption().matches(options::OPT_fcxx_exceptions))
         CXXExceptionsEnabled = true;
-      else
+      else if (A->getOption().matches(options::OPT_fno_cxx_exceptions))
         CXXExceptionsEnabled = false;
     }