On Mon, Mar 1, 2021 at 12:17 PM Jose E. Marchesi via Gcc-patches <gcc-patches@gcc.gnu.org> wrote:
I think I've already said this at some point but you shouldn't need this. There's no "GIMPLE language", the user wrote C or C++ or Fortran or ... > 2021-02-18 Indu Bhagat <indu.bha...@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 >