diff mbox series

[RFC,V3,1/5] Add new function lang_GNU_GIMPLE

Message ID 1561617445-9328-2-git-send-email-indu.bhagat@oracle.com
State New
Headers show
Series Support for CTF in GCC | expand

Commit Message

Indu Bhagat June 27, 2019, 6:37 a.m. UTC
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 mbox series

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 */