[llvm-commits] [llvm-gcc-4.2] r67339 - in /llvm-gcc-4.2/trunk: gcc/ gcc/config/ gcc/config/arm/ gcc/config/i386/ gcc/cp/ gcc/testsuite/ gcc/testsuite/g++.apple/ gcc/testsuite/obj-c++.dg/ gcc/testsuite/objc.dg/ libcpp/
Bill Wendling
isanbard at gmail.com
Thu Mar 19 15:06:49 PDT 2009
Author: void
Date: Thu Mar 19 17:06:48 2009
New Revision: 67339
URL: http://llvm.org/viewvc/llvm-project?rev=67339&view=rev
Log:
Merge LLVM-GCC with Apple GCC 5642.1.
Added:
llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/debug.C
llvm-gcc-4.2/trunk/gcc/testsuite/obj-c++.dg/block-seq.mm
llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/block-seq.m
llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/import.m
llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/property-weak.m
Modified:
llvm-gcc-4.2/trunk/gcc/ChangeLog.apple
llvm-gcc-4.2/trunk/gcc/c-common.c
llvm-gcc-4.2/trunk/gcc/c-decl.c
llvm-gcc-4.2/trunk/gcc/c-parser.c
llvm-gcc-4.2/trunk/gcc/c-typeck.c
llvm-gcc-4.2/trunk/gcc/cgraphunit.c
llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
llvm-gcc-4.2/trunk/gcc/config/arm/lib1funcs.asm
llvm-gcc-4.2/trunk/gcc/config/arm/t-darwin
llvm-gcc-4.2/trunk/gcc/config/darwin.c
llvm-gcc-4.2/trunk/gcc/config/darwin.h
llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h
llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
llvm-gcc-4.2/trunk/gcc/config/i386/i386.h
llvm-gcc-4.2/trunk/gcc/convert.c
llvm-gcc-4.2/trunk/gcc/cp/decl.c
llvm-gcc-4.2/trunk/gcc/cp/name-lookup.c
llvm-gcc-4.2/trunk/gcc/cp/typeck.c
llvm-gcc-4.2/trunk/gcc/libgcov.c
llvm-gcc-4.2/trunk/gcc/testsuite/ChangeLog.apple
llvm-gcc-4.2/trunk/gcc/tree.h
llvm-gcc-4.2/trunk/gcc/version.c
llvm-gcc-4.2/trunk/libcpp/directives.c
Modified: llvm-gcc-4.2/trunk/gcc/ChangeLog.apple
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/ChangeLog.apple?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/ChangeLog.apple (original)
+++ llvm-gcc-4.2/trunk/gcc/ChangeLog.apple Thu Mar 19 17:06:48 2009
@@ -1,3 +1,22 @@
+2009-03-12 Caroline Tice <ctice at apple.com>
+
+ Radar 6144634
+ * c-parser.c (c_parser_statement_after_labels): When
+ re-setting the expression location at the end, use the input
+ location for Block pointer assignments.
+
+2009-02-25 Jim Grosbach <grosbach at apple.com>
+
+ Radar 6465387
+ * gcc/config/arm/t-darwin (LIB1ASMFUNCS): Add _save_vfp_d8_d15_regs,
+ _restore_vfp_d8_d15_regs.
+ * gcc/config/arm/arm.c (handle_thumb_unexpanded_prologue,
+ handle_thumb_unexpanded_epilogue): Add call to
+ ___{save,restore}_vfp_d8_d15_regs when compiling a function
+ w/ a non-local label in Thumb1 mode for a v6 or later processor.
+ * gcc/config/arm/lib1funcs.asm (save_vfp_d8_d15_regs,
+ restore_vfp_d8_d15_regs): New functions, built only for v6 ARM.
+
2009-02-11 Fariborz Jahanian <fjahanian at apple.com>
Radar 6573923
Modified: llvm-gcc-4.2/trunk/gcc/c-common.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-common.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-common.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-common.c Thu Mar 19 17:06:48 2009
@@ -6150,7 +6150,7 @@
*no_add_attrs = true;
if (!(*node) || TREE_CODE (*node) != VAR_DECL)
{
- warning (OPT_Wattributes, "__block attribute can be specified on variables only - ignored");
+ error ("__block attribute can be specified on variables only");
return NULL_TREE;
}
arg_ident = TREE_VALUE (args);
@@ -7319,6 +7319,9 @@
#define ri8 r8 "i"
#define ri16 r16 "i"
#define ri32 r32 "i"
+#define rmi8 ri8 m8
+#define rmi16 ri16 m16
+#define rmi32 ri32 m32
#define rel8 "s" S("1")
#define m32fp "m" S("3")
#define m64fp "m" S("6")
@@ -7328,6 +7331,7 @@
#define M64 X(m64)
#define RM64 R64 M64
#define RI64 X(R64 "i")
+#define RMI64 RI64 M64
#define r32R64 r32 R64
#define r16r32R64 r16 r32 R64
#define rm32RM64 rm32 RM64
@@ -7435,6 +7439,9 @@
#undef ri8
#undef ri16
#undef ri32
+#undef rmi8
+#undef rmi16
+#undef rmi32
#undef rel8
#undef m32fp
#undef m64fp
@@ -7443,6 +7450,8 @@
#undef m32fpm64fpm80fp
#undef M64
#undef RM64
+#undef RI64
+#undef RMI64
#undef r32R64
#undef r16r32R64
#undef rm32RM64
Modified: llvm-gcc-4.2/trunk/gcc/c-decl.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-decl.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-decl.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-decl.c Thu Mar 19 17:06:48 2009
@@ -3938,8 +3938,7 @@
{
if (DECL_EXTERNAL (decl) || TREE_STATIC (decl))
{
- warning (0,
- "__block attribute is only allowed on local variables - ignored");
+ error ("__block attribute on %q+D not allowed, only allowed on local variables", decl);
COPYABLE_BYREF_LOCAL_VAR (decl) = 0;
COPYABLE_BYREF_LOCAL_NONPOD (decl) = 0;
}
Modified: llvm-gcc-4.2/trunk/gcc/c-parser.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-parser.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-parser.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-parser.c Thu Mar 19 17:06:48 2009
@@ -4143,8 +4143,20 @@
(recursively) all of the component statements should already have
line numbers assigned. ??? Can we discard no-op statements
earlier? */
+ /* APPLE LOCAL begin Radar 6144634 */
+ /* Normal expr stmts, including modify exprs, get the location where
+ the statement began, i.e. 'loc'. Assignments of Blocks to Block
+ pointer variables get the location of the end of the Block definition,
+ i.e. 'input_location', which should already be set by this point. */
if (stmt && EXPR_P (stmt))
- SET_EXPR_LOCATION (stmt, loc);
+ {
+ if (TREE_CODE (stmt) == MODIFY_EXPR
+ && TREE_CODE (TREE_TYPE (TREE_OPERAND (stmt, 0))) == BLOCK_POINTER_TYPE)
+ SET_EXPR_LOCATION (stmt, input_location);
+ else
+ SET_EXPR_LOCATION (stmt, loc);
+ }
+ /* APPLE LOCAL end Radar 6144634 */
}
/* Parse a parenthesized condition from an if, do or while statement.
@@ -6514,7 +6526,11 @@
objc_set_property_attr (0, NULL_TREE);
c_parser_objc_property_attr_decl (parser);
objc_property_attr_context = 0;
+ /* APPLE LOCAL weak_import on property 6676828 */
+ note_objc_property_decl_context ();
prop = c_parser_component_decl (parser);
+ /* APPLE LOCAL weak_import on property 6676828 */
+ note_end_objc_property_decl_context ();
/* Comma-separated properties are chained together in
reverse order; add them one by one. */
prop = nreverse (prop);
Modified: llvm-gcc-4.2/trunk/gcc/c-typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-typeck.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-typeck.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-typeck.c Thu Mar 19 17:06:48 2009
@@ -4152,6 +4152,8 @@
tree newrhs;
tree lhstype = TREE_TYPE (lhs);
tree olhstype = lhstype;
+ /* APPLE LOCAL __block assign sequence point 6639533 */
+ bool insert_sequence_point = false;
/* APPLE LOCAL begin radar 4426814 */
if (c_dialect_objc () && flag_objc_gc)
@@ -4179,6 +4181,38 @@
newrhs = rhs;
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ /* For byref = x;, we have to transform this into {( typeof(x) x' =
+ x; byref = x`; )} to ensure there is a sequence point before the
+ evaluation of the byref, inorder to ensure that the access
+ expression for byref doesn't start running before x is evaluated,
+ as it will access the __forwarding pointer and that must be done
+ after x is evaluated. */
+ /* First we check to see if lhs is a byref... byrefs look like:
+ __Block_byref_X.__forwarding->x */
+ if (TREE_CODE (lhs) == COMPONENT_REF)
+ {
+ tree inner = TREE_OPERAND (lhs, 0);
+ /* now check for -> */
+ if (TREE_CODE (inner) == INDIRECT_REF)
+ {
+ inner = TREE_OPERAND (inner, 0);
+ if (TREE_CODE (inner) == COMPONENT_REF)
+ {
+ inner = TREE_OPERAND (inner, 0);
+ if (TREE_CODE (inner) == VAR_DECL
+ && COPYABLE_BYREF_LOCAL_VAR (inner))
+ {
+ /* then we save the rhs. */
+ rhs = save_expr (rhs);
+ /* And arrage for the sequence point to be inserted. */
+ insert_sequence_point = true;
+ }
+ }
+ }
+ }
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
+
/* If a binary op has been requested, combine the old LHS value with the RHS
producing the value we should actually store into the LHS. */
@@ -4193,7 +4227,13 @@
{
result = objc_build_setter_call (lhs, newrhs);
if (result)
- return result;
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ {
+ if (insert_sequence_point)
+ result = build2 (COMPOUND_EXPR, TREE_TYPE (result), rhs, result);
+ return result;
+ }
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
}
/* APPLE LOCAL end C* property (Radar 4436866) */
@@ -4241,7 +4281,13 @@
{
result = objc_generate_write_barrier (lhs, modifycode, newrhs);
if (result)
- return result;
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ {
+ if (insert_sequence_point)
+ result = build2 (COMPOUND_EXPR, TREE_TYPE (result), rhs, result);
+ return result;
+ }
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
}
/* Scan operands. */
@@ -4249,6 +4295,11 @@
result = build2 (MODIFY_EXPR, lhstype, lhs, newrhs);
TREE_SIDE_EFFECTS (result) = 1;
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ if (insert_sequence_point)
+ result = build2 (COMPOUND_EXPR, TREE_TYPE (result), rhs, result);
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
+
/* If we got the LHS in a different type for storing in,
convert the result back to the nominal type of LHS
so that the value we return always has the same type
Modified: llvm-gcc-4.2/trunk/gcc/cgraphunit.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cgraphunit.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cgraphunit.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cgraphunit.c Thu Mar 19 17:06:48 2009
@@ -1313,6 +1313,7 @@
gcc_assert (node->global.inlined_to || !DECL_SAVED_TREE (decl)
|| IS_EXTERN_INLINE (decl));
}
+
}
}
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/arm.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/arm.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/arm.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/arm.c Thu Mar 19 17:06:48 2009
@@ -11928,6 +11928,12 @@
saved = bit_count (thumb_compute_save_reg_mask ()) * 4;
if (TARGET_BACKTRACE)
saved += 16;
+ /* APPLE LOCAL begin 6465387 exception handling interworking VFP save */
+ /* Saved VFP registers in thumb mode aren't accounted for by
+ thumb1_compute_save_reg_mask() */
+ if (current_function_has_nonlocal_label && arm_arch6)
+ saved += 64;
+ /* APPLE LOCAL end 6465387 exception handling interworking VFP save */
}
/* Saved registers include the stack frame. */
@@ -14953,6 +14959,15 @@
if (IS_NAKED (arm_current_func_type ()))
return bytes;
+ /* APPLE LOCAL begin 6465387 exception handling interworking VFP save */
+ if (current_function_has_nonlocal_label && arm_arch6)
+ {
+ bytes += 4;
+ if (emit)
+ asm_fprintf (asm_out_file, "\tblx ___restore_vfp_d8_d15_regs\n");
+ }
+ /* APPLE LOCAL end 6465387 exception handling interworking VFP save */
+
live_regs_mask = thumb_compute_save_reg_mask ();
high_regs_pushed = bit_count (live_regs_mask & 0x0f00);
@@ -15726,6 +15741,14 @@
bytes += handle_thumb_pushpop (f, pushable_regs, 1, &cfa_offset, real_regs_mask, emit);
}
}
+ /* APPLE LOCAL begin 6465387 exception handling interworking VFP save */
+ if (current_function_has_nonlocal_label && arm_arch6)
+ {
+ bytes += 4;
+ if (emit)
+ asm_fprintf (f, "\tblx ___save_vfp_d8_d15_regs\n");
+ }
+ /* APPLE LOCAL end 6465387 exception handling interworking VFP save */
return bytes;
}
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/lib1funcs.asm
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/lib1funcs.asm?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/lib1funcs.asm (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/lib1funcs.asm Thu Mar 19 17:06:48 2009
@@ -1356,6 +1356,24 @@
#endif
/* APPLE LOCAL end ARM 4790140 compact switch tables */
+/* APPLE LOCAL begin 6465387 exception handling interworking VFP save */
+#if (__ARM_ARCH__ == 6)
+#ifdef L_save_vfp_d8_d15_regs
+ ARM_FUNC_START save_vfp_d8_d15_regs
+ vpush {d8-d15}
+ RET
+ FUNC_END save_vfp_d8_d15_regs
+#endif
+
+#ifdef L_restore_vfp_d8_d15__regs
+ ARM_FUNC_START restore_vfp_d8_d15_regs
+ vpop {d8-d15}
+ RET
+ FUNC_END restore_vfp_d8_d15_regs
+#endif
+#endif
+/* APPLE LOCAL end 6465387 exception handling interworking VFP save */
+
#endif /* __symbian__ */
/* ------------------------------------------------------------------------ */
Modified: llvm-gcc-4.2/trunk/gcc/config/arm/t-darwin
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/arm/t-darwin?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/arm/t-darwin (original)
+++ llvm-gcc-4.2/trunk/gcc/config/arm/t-darwin Thu Mar 19 17:06:48 2009
@@ -13,6 +13,8 @@
_eqsf2vfp _nesf2vfp _ltsf2vfp _gtsf2vfp _lesf2vfp _gesf2vfp _unordsf2vfp \
_fixsfsivfp _fixunssfsivfp _floatsisfvfp _floatunssisfvfp \
_switchu8 _switch8 _switch16 _switch32
+# APPLE LOCAL 6465387 exception handling interworking VFP save
+LIB1ASMFUNCS += _save_vfp_d8_d15_regs _restore_vfp_d8_d15__regs
# APPLE LOCAL begin 5316398 improved float/double -> int64 functions
LIB2FUNCS_EXCLUDE = _fixdfdi _fixunsdfdi _fixsfdi _fixunssfdi
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.c Thu Mar 19 17:06:48 2009
@@ -2074,6 +2074,13 @@
if (objc_method_decl (TREE_CODE (*node)))
return NULL_TREE;
/* APPLE LOCAL end radar 4733555 */
+ /* APPLE LOCAL begin weak_import on property 6676828 */
+ if (in_objc_property_decl_context ())
+ {
+ *no_add_attrs = true;
+ return NULL_TREE;
+ }
+ /* APPLE LOCAL end weak_import on property 6676828 */
/* LLVM LOCAL 6652529 begin */
if ((TREE_CODE (*node) != FUNCTION_DECL && TREE_CODE (*node) != VAR_DECL)
|| !DECL_EXTERNAL (*node))
Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.h?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Thu Mar 19 17:06:48 2009
@@ -352,7 +352,8 @@
%(link_libgcc) %o %{fprofile-arcs|fprofile-generate|fcreate-profile|coverage:-lgcov} \
"/* APPLE LOCAL nested functions 4357979 */"\
%{fnested-functions: -allow_stack_execute} \
- %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %G %L}} \
+"/* APPLE LOCAL prefer -lSystem 6645902 */"\
+ %{!nostdlib:%{!nodefaultlibs:%(link_ssp) %(link_gcc_c_sequence)}} \
"/* APPLE LOCAL begin mainline 4.3 2006-10-31 4370146 */"\
%{!A:%{!nostdlib:%{!nostartfiles:%E}}} %{T*} %{F*} }}}}}}}}\n\
%{!fdump=*:%{!fsyntax-only:%{!c:%{!M:%{!MM:%{!E:%{!S:\
@@ -568,6 +569,10 @@
%:version-compare(>= 10.5 mmacosx-version-min= -lcrt1.10.5.o)}"
/* APPLE LOCAL end ARM 5683689 */
+/* APPLE LOCAL begin prefer -lSystem 6645902 */
+#define LINK_GCC_C_SEQUENCE_SPEC "%G %L"
+/* APPLE LOCAL end prefer -lSystem 6645902 */
+
/* Default Darwin ASM_SPEC, very simple. */
/* APPLE LOCAL begin kext weak_import 5935650 */
/* APPLE LOCAL begin radar 4161346 */
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/darwin.h Thu Mar 19 17:06:48 2009
@@ -166,6 +166,14 @@
{ "darwin_subarch", DARWIN_SUBARCH_SPEC },
/* APPLE LOCAL end mainline */
+/* APPLE LOCAL begin prefer -lSystem 6645902 */
+#undef LINK_GCC_C_SEQUENCE_SPEC
+#define LINK_GCC_C_SEQUENCE_SPEC \
+ "%{miphoneos-version-min=*: %G %L} \
+ %{!miphoneos-version-min=*: \
+ %{!static:%:version-compare(>= 10.6 mmacosx-version-min= -lSystem)} %G %L}"
+/* APPLE LOCAL end prefer -lSystem 6645902 */
+
/* Use the following macro for any Darwin/x86-specific command-line option
translation. */
#define SUBTARGET_OPTION_TRANSLATE_TABLE \
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/i386.c (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.c Thu Mar 19 17:06:48 2009
@@ -16515,7 +16515,7 @@
tree float128_type;
tree ftype;
- /* APPLE LOCAL begin LLVM */
+ /* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
/* LLVM doesn't initialize the RTL backend, so build_vector_type will assign
all of these types BLKmode. This interferes with i386.c-specific
@@ -16533,7 +16533,7 @@
TYPE_MODE (V8HI_type_node) = V8HImode;
TYPE_MODE (V1DI_type_node) = V1DImode;
#endif
- /* APPLE LOCAL end LLVM */
+ /* LLVM LOCAL end */
/* The __float80 type. */
if (TYPE_MODE (long_double_type_node) == XFmode)
@@ -22152,13 +22152,13 @@
v = TREE_OPERAND (v, 0);
if (TREE_CODE (v) == VAR_DECL
&& TREE_STATIC (v)
-/* APPLE LOCAL begin LLVM */
+/* LLVM LOCAL begin */
/* DECL_RTL is not set for LLVM */
#ifndef ENABLE_LLVM
&& MEM_P (DECL_RTL (v))
#endif
)
-/* APPLE LOCAL end LLVM */
+/* LLVM LOCAL end */
{
note_alternative_entry_points ();
return true;
@@ -22169,13 +22169,13 @@
}
if (TREE_CODE (v) == VAR_DECL
&& TREE_STATIC (v)
-/* APPLE LOCAL begin LLVM */
+/* LLVM LOCAL begin */
/* DECL_RTL is not set for LLVM */
#ifndef ENABLE_LLVM
&& MEM_P (DECL_RTL (v))
#endif
)
-/* APPLE LOCAL end LLVM */
+/* LLVM LOCAL end */
{
note_alternative_entry_points ();
return true;
@@ -22832,19 +22832,7 @@
&& (e->mod[0] == e->mod[1]
|| e->mod[1] == 0)))
{
- if (e->mod[0] == 'q'
- && !(strcasecmp (opcode, "inc") == 0
- || strcasecmp (opcode, "or") == 0
- || strcasecmp (opcode, "idiv") == 0
- || strcasecmp (opcode, "movs") == 0
- || strcasecmp (opcode, "scas") == 0
- || strcasecmp (opcode, "dec") == 0
- || strcasecmp (opcode, "push") == 0
- || strcasecmp (opcode, "pop") == 0
- || strcasecmp (opcode, "mov") == 0))
- sprintf (buf, "%s%s", opcode, "ll");
- else
- sprintf (buf, "%s%c", opcode, e->mod[0]);
+ sprintf (buf, "%s%c", opcode, e->mod[0]);
*opcode_p = buf;
}
else if (argnum == 2 && e->mod[0] && e->mod[1])
Modified: llvm-gcc-4.2/trunk/gcc/config/i386/i386.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/i386/i386.h?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/i386/i386.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/i386/i386.h Thu Mar 19 17:06:48 2009
@@ -2515,10 +2515,10 @@
/* Table of instructions that need extra constraints. Keep this table sorted. */
#undef TARGET_IASM_OP_CONSTRAINT
#define TARGET_IASM_OP_CONSTRAINT \
- { "adc", 1, "+rm,r" }, \
- { "adc", 2, "ir,m" }, \
- { "add", 1, "+rm,r" }, \
- { "add", 2, "ir,m" }, \
+ { "adc", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64 },\
+ { "adc", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64 },\
+ { "add", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64 },\
+ { "add", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "addpd", 1, "+x"}, \
{ "addpd", 2, "xm"}, \
{ "addps", 1, "+x"}, \
@@ -2531,8 +2531,8 @@
{ "addsubpd", 2, "xm"}, \
{ "addsubps", 1, "+x"}, \
{ "addsubps", 2, "xm"}, \
- { "and", 1, "+rm,r"}, \
- { "and", 2, "ir,m"}, \
+ { "and", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "and", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "andnpd", 1, "+x"}, \
{ "andnpd", 2, "xm"}, \
{ "andnps", 1, "+x"}, \
@@ -2590,8 +2590,8 @@
{ "cmovpo", 2, "rm"}, \
{ "cmovs", 2, "rm"}, \
{ "cmovz", 2, "rm"}, \
- { "cmp", 1, "rm,r"}, \
- { "cmp", 2, "ir,m"}, \
+ { "cmp", 1, rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "cmp", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "cmpeqpd", 1, "=x"}, \
{ "cmpeqpd", 2, "xm"}, \
{ "cmpeqps", 1, "=x"}, \
@@ -2718,7 +2718,7 @@
{ "cvttsd2si", 2, "xm"}, \
{ "cvttss2si", 1, "=r"}, \
{ "cvttss2si", 2, "xm"}, \
- { "dec", 1, "+" rm8rm16rm32}, \
+ { "dec", 1, "+" rm8rm16rm32RM64},\
{ "div", 1, rm8rm16rm32}, \
{ "divpd", 1, "+x"}, \
{ "divpd", 2, "xm"}, \
@@ -2912,8 +2912,8 @@
{ "minsd", 2, "xm"}, \
{ "minss", 1, "+x"}, \
{ "minss", 2, "xm"}, \
- { "mov", 1, "=rm" S("4") ",r"},\
- { "mov", 2, "ri,rmi"}, \
+ { "mov", 1, "=" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64}, \
+ { "mov", 2, ri8 "," ri16 "," ri32 C RI64 "," rmi8 "," rmi16 "," rmi32 C RMI64}, \
{ "movapd", 1, "=x,xm"}, \
{ "movapd", 2, "xm,x"}, \
{ "movaps", 1, "=x,xm"}, \
@@ -2987,8 +2987,8 @@
{ "mulss", 2, "xm"}, \
{ "neg", 1, "+" rm8rm16rm32}, \
{ "not", 1, "+" rm8rm16rm32}, \
- { "or", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32},\
- { "or", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32},\
+ { "or", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "or", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "orpd", 1, "+x"}, \
{ "orpd", 2, "xm"}, \
{ "orps", 1, "+x"}, \
@@ -3226,8 +3226,8 @@
{ "stmxcsr", 1, "m"}, \
{ "stos", 1, "=m"}, \
{ "str", 1, "=q" S("2") "m"},\
- { "sub", 1, "=rm,r"}, \
- { "sub", 2, "ir,m"}, \
+ { "sub", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "sub", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "subpd", 1, "+x"}, \
{ "subpd", 2, "xm"}, \
{ "subps", 1, "+x"}, \
@@ -3254,11 +3254,11 @@
{ "verw", 1, rm16}, \
{ "xadd", 1, "+" rm8 "," rm16 "," rm32},\
{ "xadd", 2, r8 "," r16 "," r32},\
- { "xchg", 1, "+rm,r"}, \
- { "xchg", 2, "+r,m"}, \
+ { "xchg", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "xchg", 2, "+" r8 "," r16 "," r32 C R64 "," m8 "," m16 "," m32 C M64},\
{ "xlat", 1, "m"}, \
- { "xor", 1, "+rm,r"}, \
- { "xor", 2, "ri,m"}, \
+ { "xor", 1, "+" rm8 "," rm16 "," rm32 C RM64 "," r8 "," r16 "," r32 C R64},\
+ { "xor", 2, ri8 "," ri16 "," ri32 C RI64 "," m8 "," m16 "," m32 C M64},\
{ "xorpd", 1, "+x"}, \
{ "xorpd", 2, "xm"}, \
{ "xorps", 1, "+x"}, \
Modified: llvm-gcc-4.2/trunk/gcc/convert.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/convert.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/convert.c (original)
+++ llvm-gcc-4.2/trunk/gcc/convert.c Thu Mar 19 17:06:48 2009
@@ -38,11 +38,11 @@
#include "langhooks.h"
#include "real.h"
-/* APPLE LOCAL LLVM - begin */
+/* LLVM LOCAL - begin */
#ifdef ENABLE_LLVM
#include "llvm.h"
#endif
-/* APPLE LOCAL LLVM - end */
+/* LLVM LOCAL - end */
/* Convert EXPR to some pointer or reference type TYPE.
EXPR must be pointer, reference, integer, enumeral, or literal zero;
Modified: llvm-gcc-4.2/trunk/gcc/cp/decl.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/decl.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/decl.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/decl.c Thu Mar 19 17:06:48 2009
@@ -5799,9 +5799,8 @@
/* APPLE LOCAL begin blocks 6040305 (cq) */
if (COPYABLE_BYREF_LOCAL_VAR (decl)) {
if (DECL_EXTERNAL (decl) || TREE_STATIC (decl))
- {
- warning (0,
- "__block attribute is only allowed on local variables - ignored");
+ {
+ error ("__block attribute on %q+D not allowed, only allowed on local variables", decl);
COPYABLE_BYREF_LOCAL_VAR (decl) = 0;
COPYABLE_BYREF_LOCAL_NONPOD (decl) = 0;
}
Modified: llvm-gcc-4.2/trunk/gcc/cp/name-lookup.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/name-lookup.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/name-lookup.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/name-lookup.c Thu Mar 19 17:06:48 2009
@@ -3415,7 +3415,10 @@
error ("strong using only meaningful at namespace scope");
else if (namespace != error_mark_node)
{
- if (!is_ancestor (current_namespace, namespace))
+ /* APPLE LOCAL begin 10.5 debug mode 6621704 */
+ if (! in_system_header
+ && !is_ancestor (current_namespace, namespace))
+ /* APPLE LOCAL end 10.5 debug mode 6621704 */
error ("current namespace %qD does not enclose strongly used namespace %qD",
current_namespace, namespace);
DECL_NAMESPACE_ASSOCIATIONS (namespace)
Modified: llvm-gcc-4.2/trunk/gcc/cp/typeck.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cp/typeck.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cp/typeck.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cp/typeck.c Thu Mar 19 17:06:48 2009
@@ -6230,10 +6230,45 @@
tree
build_x_modify_expr (tree lhs, enum tree_code modifycode, tree rhs)
{
+ /* APPLE LOCAL __block assign sequence point 6639533 */
+ bool insert_sequence_point = false;
+
if (processing_template_decl)
return build_min_nt (MODOP_EXPR, lhs,
build_min_nt (modifycode, NULL_TREE, NULL_TREE), rhs);
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ /* For byref = x;, we have to transform this into ({ typeof(x) x' =
+ x; byref = x`; )} to ensure there is a sequence point before the
+ evaluation of the byref, inorder to ensure that the access
+ expression for byref doesn't start running before x is evaluated,
+ as it will access the __forwarding pointer and that must be done
+ after x is evaluated. */
+ /* First we check to see if lhs is a byref... byrefs look like:
+ __Block_byref_X.__forwarding->x */
+ if (TREE_CODE (lhs) == COMPONENT_REF)
+ {
+ tree inner = TREE_OPERAND (lhs, 0);
+ /* now check for -> */
+ if (TREE_CODE (inner) == INDIRECT_REF)
+ {
+ inner = TREE_OPERAND (inner, 0);
+ if (TREE_CODE (inner) == COMPONENT_REF)
+ {
+ inner = TREE_OPERAND (inner, 0);
+ if (TREE_CODE (inner) == VAR_DECL
+ && COPYABLE_BYREF_LOCAL_VAR (inner))
+ {
+ /* then we save the rhs. */
+ rhs = save_expr (rhs);
+ /* And arrage for the sequence point to be inserted. */
+ insert_sequence_point = true;
+ }
+ }
+ }
+ }
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
+
if (modifycode != NOP_EXPR)
{
tree rval = build_new_op (MODIFY_EXPR, LOOKUP_NORMAL, lhs, rhs,
@@ -6241,11 +6276,20 @@
/*overloaded_p=*/NULL);
if (rval)
{
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ if (insert_sequence_point)
+ rval = build2 (COMPOUND_EXPR, TREE_TYPE (rval), rhs, rval);
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
TREE_NO_WARNING (rval) = 1;
return rval;
}
}
- return build_modify_expr (lhs, modifycode, rhs);
+ lhs = build_modify_expr (lhs, modifycode, rhs);
+ /* APPLE LOCAL begin __block assign sequence point 6639533 */
+ if (insert_sequence_point)
+ lhs = build2 (COMPOUND_EXPR, TREE_TYPE (lhs), rhs, lhs);
+ /* APPLE LOCAL end __block assign sequence point 6639533 */
+ return lhs;
}
Modified: llvm-gcc-4.2/trunk/gcc/libgcov.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/libgcov.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/libgcov.c (original)
+++ llvm-gcc-4.2/trunk/gcc/libgcov.c Thu Mar 19 17:06:48 2009
@@ -35,7 +35,7 @@
#include "tm.h"
/* APPLE LOCAL begin instant off 6414141 */
-#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__arm__)
+#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__)
#include <vproc.h>
#if defined(VPROC_HAS_TRANSACTIONS)
vproc_transaction_t vproc_transaction_begin(vproc_t virtual_proc) __attribute__((weak));
@@ -160,7 +160,7 @@
}
/* APPLE LOCAL begin instant off 6414141 */
-#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__) && !defined(__arm__)
+#if defined(__APPLE__) && !defined(__STATIC__) && !defined(__ppc__) && !defined(__ppc64__)
#if defined(VPROC_HAS_TRANSACTIONS)
static vproc_transaction_t gcov_trans;
#endif
Modified: llvm-gcc-4.2/trunk/gcc/testsuite/ChangeLog.apple
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/ChangeLog.apple?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/ChangeLog.apple (original)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/ChangeLog.apple Thu Mar 19 17:06:48 2009
@@ -1,3 +1,8 @@
+2009-02-11 Fariborz Jahanian <fjahanian at apple.com>
+
+ Radar 6545782
+ g++.apple/block-no-trampoline-1.C: Add
+
2009-01-22 Stuart Hastings <stuart at apple.com>
Radar 6515001
Added: llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/debug.C
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/g%2B%2B.apple/debug.C?rev=67339&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/debug.C (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/g++.apple/debug.C Thu Mar 19 17:06:48 2009
@@ -0,0 +1,25 @@
+/* APPLE LOCAL file 10.5 debug mode 6621704 */
+/* { dg-do run { target *-*-darwin* } } */
+/* { dg-options "-isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5" } */
+
+#define _GLIBCXX_DEBUG 1
+
+#include <string>
+#include <map>
+#include <iostream>
+
+std::string a;
+std::map<int, int> m;
+
+using namespace std;
+
+string a1;
+map<int, int> m1;
+
+main() {
+ m[1]=2;
+ a += "World\n";
+ m1[1]=2;
+ a1 += "hi";
+ cout << "Hello " << a;
+}
Added: llvm-gcc-4.2/trunk/gcc/testsuite/obj-c++.dg/block-seq.mm
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/obj-c%2B%2B.dg/block-seq.mm?rev=67339&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/obj-c++.dg/block-seq.mm (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/obj-c++.dg/block-seq.mm Thu Mar 19 17:06:48 2009
@@ -0,0 +1,35 @@
+/* APPLE LOCAL file __block assign sequence point 6639533 */
+/* { dg-options "-framework Foundation -lobjc" } */
+/* { dg-do run { target i?86*-*-darwin* } } */
+
+#import <Foundation/Foundation.h>
+
+ at interface MyClass : NSObject {
+}
+
++ (int)doSomethingWithBlock:(void (^)(void))block;
+
+ at end
+
+ at implementation MyClass
+
++ (int)doSomethingWithBlock:(void (^)(void))block {
+ Block_copy(block);
+ return 2;
+}
+
+ at end
+
+
+int main(void) {
+ [[NSAutoreleasePool alloc] init];
+ __block int foo = 0;
+ void (^block)(void) = ^{
+ foo = 1;
+ };
+ foo = [MyClass doSomethingWithBlock:block];
+ if (foo == 2)
+ return 0;
+ printf("foo: %d\n", foo);
+ return 1;
+}
Added: llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/block-seq.m
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/block-seq.m?rev=67339&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/block-seq.m (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/block-seq.m Thu Mar 19 17:06:48 2009
@@ -0,0 +1,35 @@
+/* APPLE LOCAL file __block assign sequence point 6639533 */
+/* { dg-options "-framework Foundation -lobjc" } */
+/* { dg-do run { target i?86*-*-darwin* } } */
+
+#import <Foundation/Foundation.h>
+
+ at interface MyClass : NSObject {
+}
+
++ (int)doSomethingWithBlock:(void (^)(void))block;
+
+ at end
+
+ at implementation MyClass
+
++ (int)doSomethingWithBlock:(void (^)(void))block {
+ Block_copy(block);
+ return 2;
+}
+
+ at end
+
+
+int main(void) {
+ [[NSAutoreleasePool alloc] init];
+ __block int foo = 0;
+ void (^block)(void) = ^{
+ foo = 1;
+ };
+ foo = [MyClass doSomethingWithBlock:block];
+ if (foo == 2)
+ return 0;
+ printf("foo: %d\n", foo);
+ return 1;
+}
Added: llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/import.m
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/import.m?rev=67339&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/import.m (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/import.m Thu Mar 19 17:06:48 2009
@@ -0,0 +1,5 @@
+/* APPLE LOCAL file import valid for objc 4588440 */
+/* { dg-options "-pedantic" } */
+
+#import <stdio.h>
+#assert Foo(1) /* { dg-warning "#assert is a GCC extension" } */
Added: llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/property-weak.m
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/property-weak.m?rev=67339&view=auto
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/property-weak.m (added)
+++ llvm-gcc-4.2/trunk/gcc/testsuite/objc.dg/property-weak.m Thu Mar 19 17:06:48 2009
@@ -0,0 +1,8 @@
+/* APPLE LOCAL file weak_import on property 6676828 */
+/* Ignore weak_import on properties. */
+/* Radar 6676828 */
+/* { dg-do compile { target *-*-darwin* } } */
+
+ at interface foo
+ at property(nonatomic) int foo __attribute__((weak_import));
+ at end
Modified: llvm-gcc-4.2/trunk/gcc/tree.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree.h?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree.h (original)
+++ llvm-gcc-4.2/trunk/gcc/tree.h Thu Mar 19 17:06:48 2009
@@ -4604,6 +4604,12 @@
extern bool fields_compatible_p (tree, tree);
extern tree find_compatible_field (tree, tree);
+/* APPLE LOCAL begin weak_import on property 6676828 */
+extern void note_objc_property_decl_context (void);
+extern void note_end_objc_property_decl_context (void);
+extern bool in_objc_property_decl_context (void);
+/* APPLE LOCAL end weak_import on property 6676828 */
+
/* In function.c */
extern void expand_main_function (void);
extern void init_dummy_function_start (void);
Modified: llvm-gcc-4.2/trunk/gcc/version.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/version.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/version.c (original)
+++ llvm-gcc-4.2/trunk/gcc/version.c Thu Mar 19 17:06:48 2009
@@ -11,12 +11,12 @@
/* APPLE LOCAL begin Apple version */
#ifdef ENABLE_LLVM
#ifdef LLVM_VERSION_INFO
-#define VERSUFFIX " (Based on Apple Inc. build 5641) (LLVM build " LLVM_VERSION_INFO ")"
+#define VERSUFFIX " (Based on Apple Inc. build 5641 (dot 1)) (LLVM build " LLVM_VERSION_INFO ")"
#else
-#define VERSUFFIX " (Based on Apple Inc. build 5641) (LLVM build)"
+#define VERSUFFIX " (Based on Apple Inc. build 5641 (dot 1)) (LLVM build)"
#endif
#else
-#define VERSUFFIX " (Based on Apple Inc. build 5641)"
+#define VERSUFFIX " (Based on Apple Inc. build 5641 (dot 1))"
#endif
/* APPLE LOCAL end Apple version */
Modified: llvm-gcc-4.2/trunk/libcpp/directives.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/libcpp/directives.c?rev=67339&r1=67338&r2=67339&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/libcpp/directives.c (original)
+++ llvm-gcc-4.2/trunk/libcpp/directives.c Thu Mar 19 17:06:48 2009
@@ -352,7 +352,11 @@
/* Issue -pedantic warnings for extensions. */
if (CPP_PEDANTIC (pfile)
&& ! pfile->state.skipping
- && dir->origin == EXTENSION)
+ /* APPLE LOCAL begin import valid for objc 4588440 */
+ && dir->origin == EXTENSION
+ && (!CPP_OPTION (pfile, objc)
+ || dir != &dtable[T_IMPORT]))
+ /* APPLE LOCAL end import valid for objc 4588440 */
cpp_error (pfile, CPP_DL_PEDWARN, "#%s is a GCC extension", dir->name);
/* Traditionally, a directive is ignored unless its # is in
More information about the llvm-commits
mailing list