[llvm-commits] [llvm-gcc-4.2] r82639 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Stuart Hastings stuart at apple.com
Wed Sep 23 13:34:32 CDT 2009


Author: stuart
Date: Wed Sep 23 13:34:32 2009
New Revision: 82639

URL: http://llvm.org/viewvc/llvm-project?rev=82639&view=rev
Log:
<rdar://problem/7176678> When volatilizing a POINTER_TYPE, insist that
the TYPE_NAME fields match.  If they differ, encode_pointer() will
behave erratically.

Modified:
    llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=82639&r1=82638&r2=82639&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Wed Sep 23 13:34:32 2009
@@ -3507,6 +3507,15 @@
 	  && (TREE_TYPE (t) != TREE_TYPE (type)))
 	continue;
 
+      /* LLVM LOCAL begin 7176678 */
+      /* If this is a POINTER_TYPE, the name field should match too;
+	 if one is set and another is cleared, encode_type will treat
+	 them differently.  */
+      if (TREE_CODE (type) == POINTER_TYPE
+	  && TYPE_NAME (type) != TYPE_NAME (t))
+	continue;
+      /* LLVM LOCAL end 7176678 */
+
       /* APPLE LOCAL begin radar 4204796 */
       /* Only match up the types which were previously volatilized in similar fashion and not
 	 because they were declared as such. */





More information about the llvm-commits mailing list