11debfc3dSmrg /* Language-specific hook definitions for C front end. 2*8feb0f0bSmrg Copyright (C) 1991-2020 Free Software Foundation, Inc. 31debfc3dSmrg 41debfc3dSmrg This file is part of GCC. 51debfc3dSmrg 61debfc3dSmrg GCC is free software; you can redistribute it and/or modify it under 71debfc3dSmrg the terms of the GNU General Public License as published by the Free 81debfc3dSmrg Software Foundation; either version 3, or (at your option) any later 91debfc3dSmrg version. 101debfc3dSmrg 111debfc3dSmrg GCC is distributed in the hope that it will be useful, but WITHOUT ANY 121debfc3dSmrg WARRANTY; without even the implied warranty of MERCHANTABILITY or 131debfc3dSmrg FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 141debfc3dSmrg for more details. 151debfc3dSmrg 161debfc3dSmrg You should have received a copy of the GNU General Public License 171debfc3dSmrg along with GCC; see the file COPYING3. If not see 181debfc3dSmrg <http://www.gnu.org/licenses/>. */ 191debfc3dSmrg 201debfc3dSmrg 211debfc3dSmrg #include "config.h" 221debfc3dSmrg #include "system.h" 231debfc3dSmrg #include "coretypes.h" 241debfc3dSmrg #include "c-tree.h" 251debfc3dSmrg #include "langhooks.h" 261debfc3dSmrg #include "langhooks-def.h" 271debfc3dSmrg #include "c-objc-common.h" 281debfc3dSmrg 291debfc3dSmrg enum c_language_kind c_language = clk_c; 301debfc3dSmrg 311debfc3dSmrg /* Lang hooks common to C and ObjC are declared in c-objc-common.h; 321debfc3dSmrg consequently, there should be very few hooks below. */ 331debfc3dSmrg 341debfc3dSmrg #undef LANG_HOOKS_NAME 351debfc3dSmrg #define LANG_HOOKS_NAME "GNU C" 361debfc3dSmrg #undef LANG_HOOKS_INIT 371debfc3dSmrg #define LANG_HOOKS_INIT c_objc_common_init 381debfc3dSmrg #undef LANG_HOOKS_INIT_TS 391debfc3dSmrg #define LANG_HOOKS_INIT_TS c_common_init_ts 401debfc3dSmrg 411debfc3dSmrg #if CHECKING_P 421debfc3dSmrg #undef LANG_HOOKS_RUN_LANG_SELFTESTS 431debfc3dSmrg #define LANG_HOOKS_RUN_LANG_SELFTESTS selftest::run_c_tests 441debfc3dSmrg #endif /* #if CHECKING_P */ 451debfc3dSmrg 461debfc3dSmrg #undef LANG_HOOKS_GET_SUBSTRING_LOCATION 471debfc3dSmrg #define LANG_HOOKS_GET_SUBSTRING_LOCATION c_get_substring_location 481debfc3dSmrg 491debfc3dSmrg /* Each front end provides its own lang hook initializer. */ 501debfc3dSmrg struct lang_hooks lang_hooks = LANG_HOOKS_INITIALIZER; 511debfc3dSmrg 521debfc3dSmrg #if CHECKING_P 531debfc3dSmrg 541debfc3dSmrg namespace selftest { 551debfc3dSmrg 561debfc3dSmrg /* Implementation of LANG_HOOKS_RUN_LANG_SELFTESTS for the C frontend. */ 571debfc3dSmrg 581debfc3dSmrg void run_c_tests(void)591debfc3dSmrgrun_c_tests (void) 601debfc3dSmrg { 61a2dc1f3fSmrg /* Run selftests shared within the C family. */ 62a2dc1f3fSmrg c_family_tests (); 63a2dc1f3fSmrg 64a2dc1f3fSmrg /* Additional C-specific tests. */ 651debfc3dSmrg } 661debfc3dSmrg 671debfc3dSmrg } // namespace selftest 681debfc3dSmrg 691debfc3dSmrg #endif /* #if CHECKING_P */ 701debfc3dSmrg 711debfc3dSmrg 721debfc3dSmrg #include "gtype-c.h" 73