+2004-08-18 Ziemowit Laski <zlaski@apple.com>
+
+ * gcc.c (default_compilers): Add info about ".mm", ".M" and ".mii"
+ Objective-C++ extensions.
+ * gengtype.c (get_file_basename): Match entire subdirectory name
+ ('cp', 'objc', 'objcp') rather than just its suffix.
+ (get_base_file_bitmap): Allow for files to belong to more than one
+ language.
+ (get_output_file_with_visibility): Treat objc/objc-act.h as a header
+ used by more than one front-end.
+
2004-08-18 Richard Earnshaw <rearnsha@arm.com>
* arm.md (addsi3, subsi3, andsi3, iorsi3, movsi, movhi): Rework to
2004-08-16 Adam Nemet <anemet@lnxw.com>
* Makefile.in (LIBS): Move $(LIBIBERTY) after $(BANSHEELIB).
-
+
2004-08-16 Andrew Pinski <apinski@apple.com>
* target-def.h (TARGET_EH_RETURN_FILTER_MODE): Remove
and be given a more meaningful error than "file not used since
linking is not done". */
{".m", "#Objective-C", 0, 0, 0}, {".mi", "#Objective-C", 0, 0, 0},
+ {".mm", "#Objective-C++", 0, 0, 0}, {".M", "#Objective-C++", 0, 0, 0},
+ {".mii", "#Objective-C++", 0, 0, 0},
{".cc", "#C++", 0, 0, 0}, {".cxx", "#C++", 0, 0, 0},
{".cpp", "#C++", 0, 0, 0}, {".cp", "#C++", 0, 0, 0},
{".c++", "#C++", 0, 0, 0}, {".C", "#C++", 0, 0, 0},
s2 = lang_dir_names [i];
l1 = strlen (s1);
l2 = strlen (s2);
- if (l1 >= l2 && !memcmp (s1, s2, l2))
+ if (l1 >= l2 && IS_DIR_SEPARATOR (s1[-1]) && !memcmp (s1, s2, l2))
{
basename -= l2 + 1;
if ((basename - f - 1) != srcdir_len)
unsigned k;
unsigned bitmap;
+ /* If the file resides in a language subdirectory (e.g., 'cp'), assume that
+ it belongs to the corresponding language. The file may belong to other
+ languages as well (which is checked for below). */
+
if (slashpos)
{
size_t i;
{
/* It's in a language directory, set that language. */
bitmap = 1 << i;
- return bitmap;
}
-
- abort (); /* Should have found the language. */
}
/* If it's in any config-lang.in, then set for the languages
memcpy (s, ".h", sizeof (".h"));
for_name = basename;
}
+ /* Some headers get used by more than one front-end; hence, it
+ would be inappropriate to spew them out to a single gtype-<lang>.h
+ (and gengtype doesn't know how to direct spewage into multiple
+ gtype-<lang>.h headers at this time). Instead, we pair up these
+ headers with source files (and their special purpose gt-*.h headers). */
else if (strcmp (basename, "c-common.h") == 0)
output_name = "gt-c-common.h", for_name = "c-common.c";
else if (strcmp (basename, "c-tree.h") == 0)
output_name = "gt-c-decl.h", for_name = "c-decl.c";
- else
+ else if (strncmp (basename, "objc", 4) == 0 && IS_DIR_SEPARATOR (basename[4])
+ && strcmp (basename + 5, "objc-act.h") == 0)
+ output_name = "gt-objc-objc-act.h", for_name = "objc/objc-act.c";
+ else
{
size_t i;