[llvm-branch-commits] [cfe-branch] r168611 - in /cfe/branches/release_32: ./ lib/CodeGen/CGException.cpp

Pawel Wodnicki pawel at 32bitmicro.com
Mon Nov 26 13:20:28 PST 2012


Author: pawel
Date: Mon Nov 26 15:20:28 2012
New Revision: 168611

URL: http://llvm.org/viewvc/llvm-project?rev=168611&view=rev
Log:
Merging r167935: into the 3.2 release branch.

The ObjC++-to-C++ personality trick is only necessary on NeXT runtimes,
which is not coincidentally the only place it works, either (because
of how it tests for EH_TYPE symbols).

Modified:
    cfe/branches/release_32/   (props changed)
    cfe/branches/release_32/lib/CodeGen/CGException.cpp

Propchange: cfe/branches/release_32/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Mon Nov 26 15:20:28 2012
@@ -1,3 +1,3 @@
 /cfe/branches/type-system-rewrite:134693-134817
-/cfe/trunk:167749,167762,167780,167788,167790,167813-167814,167868,167884,167920,167925,168024,168063,168124,168297,168355,168379
+/cfe/trunk:167749,167762,167780,167788,167790,167813-167814,167868,167884,167920,167925,167935,168024,168063,168124,168297,168355,168379
 /cfe/trunk/test/SemaTemplate:126920

Modified: cfe/branches/release_32/lib/CodeGen/CGException.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/branches/release_32/lib/CodeGen/CGException.cpp?rev=168611&r1=168610&r2=168611&view=diff
==============================================================================
--- cfe/branches/release_32/lib/CodeGen/CGException.cpp (original)
+++ cfe/branches/release_32/lib/CodeGen/CGException.cpp Mon Nov 26 15:20:28 2012
@@ -307,14 +307,15 @@
 /// aggressive about only using the ObjC++ personality in a function
 /// when it really needs it.
 void CodeGenModule::SimplifyPersonality() {
-  // For now, this is really a Darwin-specific operation.
-  if (!Context.getTargetInfo().getTriple().isOSDarwin())
-    return;
-
   // If we're not in ObjC++ -fexceptions, there's nothing to do.
   if (!LangOpts.CPlusPlus || !LangOpts.ObjC1 || !LangOpts.Exceptions)
     return;
 
+  // Both the problem this endeavors to fix and the way the logic
+  // above works is specific to the NeXT runtime.
+  if (!LangOpts.ObjCRuntime.isNeXTFamily())
+    return;
+
   const EHPersonality &ObjCXX = EHPersonality::get(LangOpts);
   const EHPersonality &CXX = getCXXPersonality(LangOpts);
   if (&ObjCXX == &CXX)





More information about the llvm-branch-commits mailing list