[RFC,V2,1/3] Add new function lang_GNU_GIMPLE

Message ID 1560362410-27014-2-git-send-email-indu.bhagat@oracle.com
State Superseded
Headers show
Series
  • Support for CTF in GCC
Related show

Commit Message

Indu Bhagat June 12, 2019, 6 p.m.
[Changes from V1]
  None

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(+)

-- 
1.8.3.1

Patch

diff --git a/gcc/langhooks.c b/gcc/langhooks.c
index 2df97f2..f3a64c1 100644
--- a/gcc/langhooks.c
+++ b/gcc/langhooks.c
@@ -825,3 +825,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 */