[PATCH V4 1/5] Add new function lang_GNU_GIMPLE
Jose E. Marchesi
jose.marchesi@oracle.com
Tue Mar 9 10:03:58 GMT 2021
2021-02-18 Indu Bhagat <indu.bhagat@oracle.com>
* langhooks.c (lang_GNU_GIMPLE): New Function.
* langhooks.h: New Prototype.
---
gcc/langhooks.c | 9 +++++++++
gcc/langhooks.h | 1 +
2 files changed, 10 insertions(+)
diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 2354386f7b4..0082ee9f350 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -929,3 +929,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 842e605c439..f9c82eff0cb 100644
--- a/gcc/langhooks.h
+++ b/gcc/langhooks.h
@@ -638,5 +638,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 */
--
2.25.0.2.g232378479e
More information about the Gcc-patches
mailing list