[llvm-commits] [llvm-gcc-4.2] r41865 - in /llvm-gcc-4.2/trunk/gcc: c-pragma.c config/darwin.h
Anton Korobeynikov
asl at math.spbu.ru
Tue Sep 11 14:21:29 PDT 2007
Author: asl
Date: Tue Sep 11 16:21:28 2007
New Revision: 41865
URL: http://llvm.org/viewvc/llvm-project?rev=41865&view=rev
Log:
Unbreak #pragma pack on non-darwin. 4.0 will follow.
Modified:
llvm-gcc-4.2/trunk/gcc/c-pragma.c
llvm-gcc-4.2/trunk/gcc/config/darwin.h
Modified: llvm-gcc-4.2/trunk/gcc/c-pragma.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/c-pragma.c?rev=41865&r1=41864&r2=41865&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/c-pragma.c (original)
+++ llvm-gcc-4.2/trunk/gcc/c-pragma.c Tue Sep 11 16:21:28 2007
@@ -53,8 +53,10 @@
static GTY(()) struct align_stack * alignment_stack;
-/* APPLE LOCAL Macintosh alignment */
-#if 0
+/* LLVM LOCAL begin */
+#ifndef TARGET_OVERRIDE_PRAGMA_PACK_HANDLER
+/* LLVM LOCAL end */
+
#ifdef HANDLE_PRAGMA_PACK
static void handle_pragma_pack (cpp_reader *);
@@ -246,8 +248,10 @@
}
}
#endif /* HANDLE_PRAGMA_PACK */
-/* APPLE LOCAL Macintosh alignment */
-#endif
+
+/* LLVM LOCAL begin */
+#endif /* TARGET_OVERRIDE_PRAGMA_PACK_HANDLER */
+/* LLVM LOCAL end */
static GTY(()) tree pending_weaks;
@@ -816,11 +820,9 @@
cpp_register_deferred_pragma (parse_in, "GCC", "pch_preprocess",
PRAGMA_GCC_PCH_PREPROCESS, false, false);
-/* APPLE LOCAL begin Macintosh alignment 2002-1-22 --ff */
- /* Remove the handling of pragma pack here because it is handled
- in config/darwin-c.c. */
-#if 0
-/* APPLE LOCAL end Macintosh alignment 2002-1-22 --ff */
+/* LLVM LOCAL begin */
+#ifndef TARGET_OVERRIDE_PRAGMA_PACK_HANDLER
+/* LLVM LOCAL end */
#ifdef HANDLE_PRAGMA_PACK
#ifdef HANDLE_PRAGMA_PACK_WITH_EXPANSION
c_register_pragma_with_expansion (0, "pack", handle_pragma_pack);
@@ -828,8 +830,9 @@
c_register_pragma (0, "pack", handle_pragma_pack);
#endif
#endif
-/* APPLE LOCAL Macintosh alignment 2002-1-22 --ff */
+/* LLVM LOCAL begin */
#endif
+/* LLVM LOCAL end */
#ifdef HANDLE_PRAGMA_WEAK
c_register_pragma (0, "weak", handle_pragma_weak);
#endif
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=41865&r1=41864&r2=41865&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Tue Sep 11 16:21:28 2007
@@ -1115,6 +1115,11 @@
#define HANDLE_PRAGMA_PACK_PUSH_POP 1
+/* LLVM LOCAL begin */
+/* Handle pragma pack separately */
+#define TARGET_OVERRIDE_PRAGMA_PACK_HANDLER 1
+/* LLVM LOCAL end */
+
#define DARWIN_REGISTER_TARGET_PRAGMAS() \
do { \
c_register_pragma (0, "mark", darwin_pragma_ignore); \
More information about the llvm-commits
mailing list