[llvm-commits] [llvm-gcc-4.2] r50285 - in /llvm-gcc-4.2/branches/Apple/Tak/gcc: llvm-types.cpp llvm.h objc/objc-act.c
Bill Wendling
isanbard at gmail.com
Fri Apr 25 11:57:36 PDT 2008
Author: void
Date: Fri Apr 25 13:57:36 2008
New Revision: 50285
URL: http://llvm.org/viewvc/llvm-project?rev=50285&view=rev
Log:
Porting r50276 to Tak.
Modified:
llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm-types.cpp
llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm.h
llvm-gcc-4.2/branches/Apple/Tak/gcc/objc/objc-act.c
Modified: llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm-types.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm-types.cpp?rev=50285&r1=50284&r2=50285&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm-types.cpp (original)
+++ llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm-types.cpp Fri Apr 25 13:57:36 2008
@@ -46,6 +46,9 @@
}
#include "llvm-abi.h"
+void llvm_compute_type(tree X) {
+ ConvertType(X);
+}
//===----------------------------------------------------------------------===//
// Matching LLVM types with GCC trees
Modified: llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm.h?rev=50285&r1=50284&r2=50285&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm.h (original)
+++ llvm-gcc-4.2/branches/Apple/Tak/gcc/llvm.h Fri Apr 25 13:57:36 2008
@@ -49,6 +49,12 @@
*/
void reset_type_and_initializer_llvm(union tree_node*);
+/* llvm_compute_type - Compute the LLVM type for the specified tree type eagerly
+ * instead of letting it happen lazily.
+ */
+void llvm_compute_type(union tree_node*);
+
+
/* reset_initializer_llvm - Change the initializer for a global variable. */
void reset_initializer_llvm(union tree_node*);
Modified: llvm-gcc-4.2/branches/Apple/Tak/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Tak/gcc/objc/objc-act.c?rev=50285&r1=50284&r2=50285&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Tak/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/branches/Apple/Tak/gcc/objc/objc-act.c Fri Apr 25 13:57:36 2008
@@ -8620,6 +8620,20 @@
/* APPLE LOCAL begin ObjC new abi */
if (flag_objc_abi == 2)
CLASS_TYPE (class) = record;
+
+ /* APPLE LOCAL llvm begin */
+#ifdef ENABLE_LLVM
+ /* Synthesized properties will later be added to this RECORD_DECL as they
+ * are found in @implementations. We don't want the LLVM tree->llvm
+ * converter to see these newly added properties, so we emulate the RTL
+ * backend and analyze the type eagerly in this case. It would be better
+ * for the ObjC front-end to not add these properties to the RECORD_DECL
+ * but that would be a large/invasive change. rdar://5812818
+ */
+ if (flag_objc_abi == 2)
+ llvm_compute_type(record);
+#endif
+ /* APPLE LOCAL llvm end */
}
}
/* APPLE LOCAL end ObjC new abi */
More information about the llvm-commits
mailing list