This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH,RFC,V5 1/6] Add new function lang_GNU_GIMPLE
gcc/ChangeLog:
* langhooks.c (lang_GNU_GIMPLE): New Function.
* langhooks.h: New Prototype.
---
gcc/ChangeLog | 5 +++++
gcc/langhooks.c | 9 +++++++++
gcc/langhooks.h | 1 +
3 files changed, 15 insertions(+)
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 89fb5bc..66daa9a 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -821,3 +821,12 @@ lang_GNU_OBJC (void)
{
return strncmp (lang_hooks.name, "GNU Objective-C", 15) == 0;
}
+
+/* Returns true if the current lang_hooks represents the GNU GIMPLE
+ frontend. */
+
+bool
+lang_GNU_GIMPLE (void)
+{
+ return strncmp (lang_hooks.name, "GNU GIMPLE", 10) == 0;
+}
diff --git a/gcc/langhooks.h b/gcc/langhooks.h
index a45579b..0ac794e 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -570,5 +570,6 @@ extern bool lang_GNU_C (void);
extern bool lang_GNU_CXX (void);
extern bool lang_GNU_Fortran (void);
extern bool lang_GNU_OBJC (void);
+extern bool lang_GNU_GIMPLE (void);
#endif /* GCC_LANG_HOOKS_H */
--
1.8.3.1