[cfe-commits] r126299 - in /cfe/trunk: include/clang/Basic/DiagnosticFrontendKinds.td include/clang/Basic/LangOptions.h lib/Serialization/ASTReader.cpp lib/Serialization/ASTWriter.cpp

Anders Carlsson andersca at mac.com
Tue Feb 22 19:04:55 PST 2011


Author: andersca
Date: Tue Feb 22 21:04:54 2011
New Revision: 126299

URL: http://llvm.org/viewvc/llvm-project?rev=126299&view=rev
Log:
Add a CXXExceptions flag to LangOptions.

Modified:
    cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
    cfe/trunk/include/clang/Basic/LangOptions.h
    cfe/trunk/lib/Serialization/ASTReader.cpp
    cfe/trunk/lib/Serialization/ASTWriter.cpp

Modified: cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td?rev=126299&r1=126298&r2=126299&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticFrontendKinds.td Tue Feb 22 21:04:54 2011
@@ -177,12 +177,15 @@
 def warn_pch_exceptions : Error<
     "exceptions were %select{disabled|enabled}0 in PCH file but "
     "are currently %select{disabled|enabled}1">;
-def warn_pch_sjlj_exceptions : Error<
-    "sjlj-exceptions were %select{disabled|enabled}0 in PCH file but "
-    "are currently %select{disabled|enabled}1">;
 def warn_pch_objc_exceptions : Error<
     "Objective-C exceptions were %select{disabled|enabled}0 in PCH file but "
     "are currently %select{disabled|enabled}1">;
+def warn_pch_cxx_exceptions : Error<
+    "C++ exceptions were %select{disabled|enabled}0 in PCH file but "
+    "are currently %select{disabled|enabled}1">;
+def warn_pch_sjlj_exceptions : Error<
+    "sjlj-exceptions were %select{disabled|enabled}0 in PCH file but "
+    "are currently %select{disabled|enabled}1">;
 def warn_pch_objc_runtime : Error<
     "PCH file was compiled with the %select{NeXT|GNU}0 runtime but the "
     "%select{NeXT|GNU}1 runtime is selected">;

Modified: cfe/trunk/include/clang/Basic/LangOptions.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/LangOptions.h?rev=126299&r1=126298&r2=126299&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/LangOptions.h (original)
+++ cfe/trunk/include/clang/Basic/LangOptions.h Tue Feb 22 21:04:54 2011
@@ -53,8 +53,9 @@
   unsigned LaxVectorConversions : 1;
   unsigned AltiVec           : 1;  // Support AltiVec-style vector initializers.
   unsigned Exceptions        : 1;  // Support exception handling.
-  unsigned SjLjExceptions    : 1;  // Use setjmp-longjump exception handling.
   unsigned ObjCExceptions    : 1;  // Support Objective-C exceptions.
+  unsigned CXXExceptions     : 1;  // Support C++ exceptions.
+  unsigned SjLjExceptions    : 1;  // Use setjmp-longjump exception handling.
   unsigned RTTI              : 1;  // Support RTTI information.
 
   unsigned MSBitfields       : 1; // MS-compatible structure layout
@@ -165,8 +166,8 @@
     NoConstantCFStrings = 0; InlineVisibilityHidden = 0;
     C99 = Microsoft = Borland = CPlusPlus = CPlusPlus0x = 0;
     CXXOperatorNames = PascalStrings = WritableStrings = ConstStrings = 0;
-    Exceptions = SjLjExceptions = Freestanding = NoBuiltin = 0;
-    ObjCExceptions = 1;
+    Exceptions = ObjCExceptions = CXXExceptions = SjLjExceptions = 0;
+    Freestanding = NoBuiltin = 0;
     MSBitfields = 0;
     NeXTRuntime = 1;
     RTTI = 1;

Modified: cfe/trunk/lib/Serialization/ASTReader.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTReader.cpp?rev=126299&r1=126298&r2=126299&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTReader.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTReader.cpp Tue Feb 22 21:04:54 2011
@@ -97,8 +97,9 @@
                           diag::warn_pch_lax_vector_conversions);
   PARSE_LANGOPT_IMPORTANT(AltiVec, diag::warn_pch_altivec);
   PARSE_LANGOPT_IMPORTANT(Exceptions, diag::warn_pch_exceptions);
-  PARSE_LANGOPT_IMPORTANT(SjLjExceptions, diag::warn_pch_sjlj_exceptions);
   PARSE_LANGOPT_IMPORTANT(ObjCExceptions, diag::warn_pch_objc_exceptions);
+  PARSE_LANGOPT_IMPORTANT(CXXExceptions, diag::warn_pch_cxx_exceptions);
+  PARSE_LANGOPT_IMPORTANT(SjLjExceptions, diag::warn_pch_sjlj_exceptions);
   PARSE_LANGOPT_IMPORTANT(MSBitfields, diag::warn_pch_ms_bitfields);
   PARSE_LANGOPT_IMPORTANT(NeXTRuntime, diag::warn_pch_objc_runtime);
   PARSE_LANGOPT_IMPORTANT(Freestanding, diag::warn_pch_freestanding);
@@ -2799,8 +2800,9 @@
     PARSE_LANGOPT(LaxVectorConversions);
     PARSE_LANGOPT(AltiVec);
     PARSE_LANGOPT(Exceptions);
-    PARSE_LANGOPT(SjLjExceptions);
     PARSE_LANGOPT(ObjCExceptions);
+    PARSE_LANGOPT(CXXExceptions);
+    PARSE_LANGOPT(SjLjExceptions);
     PARSE_LANGOPT(MSBitfields);
     PARSE_LANGOPT(NeXTRuntime);
     PARSE_LANGOPT(Freestanding);

Modified: cfe/trunk/lib/Serialization/ASTWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Serialization/ASTWriter.cpp?rev=126299&r1=126298&r2=126299&view=diff
==============================================================================
--- cfe/trunk/lib/Serialization/ASTWriter.cpp (original)
+++ cfe/trunk/lib/Serialization/ASTWriter.cpp Tue Feb 22 21:04:54 2011
@@ -1023,8 +1023,9 @@
   Record.push_back(LangOpts.LaxVectorConversions);
   Record.push_back(LangOpts.AltiVec);
   Record.push_back(LangOpts.Exceptions);  // Support exception handling.
-  Record.push_back(LangOpts.SjLjExceptions);
   Record.push_back(LangOpts.ObjCExceptions);
+  Record.push_back(LangOpts.CXXExceptions);
+  Record.push_back(LangOpts.SjLjExceptions);
 
   Record.push_back(LangOpts.MSBitfields); // MS-compatible structure layout
   Record.push_back(LangOpts.NeXTRuntime); // Use NeXT runtime.





More information about the cfe-commits mailing list