aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorBasile Starynkevitch <basile@starynkevitch.net>2013-09-20 15:50:56 +0000
committerBasile Starynkevitch <bstarynk@gcc.gnu.org>2013-09-20 15:50:56 +0000
commit0078f46235ecf1097513fa0faad3e841a30ae1c7 (patch)
tree33819c84a094993ab7211363b0d1e1037aad42df /gcc
parentd15ac9d9a3d9cdbc655115803d6fb5ad38e9adc8 (diff)
downloadgcc-0078f46235ecf1097513fa0faad3e841a30ae1c7.zip
gcc-0078f46235ecf1097513fa0faad3e841a30ae1c7.tar.gz
gcc-0078f46235ecf1097513fa0faad3e841a30ae1c7.tar.bz2
gengtype.c (file_rules): Added rule for *.cc files.
2013-09-20 Basile Starynkevitch <basile@starynkevitch.net> * gengtype.c (file_rules): Added rule for *.cc files. (get_output_file_with_visibility): Give fatal message when no rules found. From-SVN: r202782
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog6
-rw-r--r--gcc/gengtype.c17
2 files changed, 18 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 68a0f2e..70ae7f2 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2013-09-20 Basile Starynkevitch <basile@starynkevitch.net>
+
+ * gengtype.c (file_rules): Added rule for *.cc files.
+ (get_output_file_with_visibility): Give fatal message when no
+ rules found.
+
2013-09-20 Renlin Li <renlin.li@arm.com>
* config/aarch64/aarch64.c (aarch64_expand_prologue): Use plus_constant.
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index c3dffe8..ce60c78 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -2004,14 +2004,21 @@ struct file_rule_st files_rules[] = {
REG_EXTENDED, NULL_REGEX,
"gt-objc-objc-map.h", "objc/objc-map.c", NULL_FRULACT },
- /* General cases. For header *.h and source *.c files, we need
- * special actions to handle the language. */
+ /* General cases. For header *.h and source *.c or *.cc files, we
+ * need special actions to handle the language. */
/* Source *.c files are using get_file_gtfilename to compute their
output_name and get_file_basename to compute their for_name
through the source_dot_c_frul action. */
{ DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.c$",
REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.c", source_dot_c_frul},
+
+ /* Source *.cc files are using get_file_gtfilename to compute their
+ output_name and get_file_basename to compute their for_name
+ through the source_dot_c_frul action. */
+ { DIR_PREFIX_REGEX "([[:alnum:]_-]*)\\.cc$",
+ REG_EXTENDED, NULL_REGEX, "gt-$3.h", "$3.cc", source_dot_c_frul},
+
/* Common header files get "gtype-desc.c" as their output_name,
* while language specific header files are handled specially. So
* we need the header_dot_h_frul action. */
@@ -2269,9 +2276,9 @@ get_output_file_with_visibility (input_file *inpf)
}
if (!output_name || !for_name)
{
- /* This is impossible, and could only happen if the files_rules is
- incomplete or buggy. */
- gcc_unreachable ();
+ /* This should not be possible, and could only happen if the
+ files_rules is incomplete or buggy. */
+ fatal ("failed to compute output name for %s", inpfname);
}
/* Look through to see if we've ever seen this output filename