GCC Middle and Back End API Reference
langhooks.h File Reference

Go to the source code of this file.

Data Structures

struct  lang_hooks_for_tree_inlining
 
struct  lang_hooks_for_tree_dump
 
struct  lang_hooks_for_types
 
struct  lang_hooks_for_decls
 
struct  lang_hooks_for_lto
 
struct  lang_hooks
 

Typedefs

typedef void(* lang_print_tree_hook) (FILE *, tree, int indent)
 

Enumerations

enum  classify_record { RECORD_IS_STRUCT , RECORD_IS_CLASS , RECORD_IS_INTERFACE }
 

Functions

tree add_builtin_function (const char *name, tree type, int function_code, enum built_in_class cl, const char *library_name, tree attrs)
 
tree add_builtin_function_ext_scope (const char *name, tree type, int function_code, enum built_in_class cl, const char *library_name, tree attrs)
 
tree simulate_builtin_function_decl (location_t, const char *, tree, int, const char *, tree)
 
tree add_builtin_type (const char *name, tree type)
 
bool lang_GNU_C (void)
 
bool lang_GNU_CXX (void)
 
bool lang_GNU_Fortran (void)
 
bool lang_GNU_OBJC (void)
 

Variables

struct lang_hooks lang_hooks
 

Typedef Documentation

◆ lang_print_tree_hook

typedef void(* lang_print_tree_hook) (FILE *, tree, int indent)
A print hook for print_tree ().   

Enumeration Type Documentation

◆ classify_record

Enumerator
RECORD_IS_STRUCT 
RECORD_IS_CLASS 
RECORD_IS_INTERFACE 

Function Documentation

◆ add_builtin_function()

tree add_builtin_function ( const char * name,
tree type,
int function_code,
enum built_in_class cl,
const char * library_name,
tree attrs )
extern

◆ add_builtin_function_ext_scope()

tree add_builtin_function_ext_scope ( const char * name,
tree type,
int function_code,
enum built_in_class cl,
const char * library_name,
tree attrs )
extern
Like add_builtin_function, but make sure the scope is the external scope.
This is used to delay putting in back end builtin functions until the ISA
that defines the builtin is declared via function specific target options,
which can save memory for machines like the x86_64 that have multiple ISAs.
If this points to the same function as builtin_function, the backend must
add all of the builtins at program initialization time.   

References build_builtin_function(), lang_hooks::builtin_function_ext_scope, and BUILTINS_LOCATION.

Referenced by rt_bb_visited::rt_bb_visited().

◆ add_builtin_type()

tree add_builtin_type ( const char * name,
tree type )
extern

◆ lang_GNU_C()

bool lang_GNU_C ( void )
extern
Language helper functions.   
Returns true if the current lang_hooks represents the GNU C frontend.   

References lang_hooks::name, and startswith().

Referenced by default_floatn_builtin_p(), maybe_warn_implicit_fallthrough(), and process_options().

◆ lang_GNU_CXX()

bool lang_GNU_CXX ( void )
extern
Returns true if the current lang_hooks represents the GNU C++ frontend.   

References lang_hooks::name, and startswith().

Referenced by fold_cond_expr_with_comparison(), and maybe_warn_implicit_fallthrough().

◆ lang_GNU_Fortran()

◆ lang_GNU_OBJC()

bool lang_GNU_OBJC ( void )
extern
Returns true if the current lang_hooks represents the GNU Objective-C
frontend.   

References lang_hooks::name, and startswith().

Referenced by default_floatn_builtin_p(), and maybe_warn_implicit_fallthrough().

◆ simulate_builtin_function_decl()

tree simulate_builtin_function_decl ( location_t location,
const char * name,
tree type,
int function_code,
const char * library_name,
tree attrs )
extern
Simulate a declaration of a target-specific built-in function at
location LOCATION, as though it had been declared directly in the
source language.  NAME is the name of the function, TYPE is its function
type, FUNCTION_CODE is the target-specific function code, LIBRARY_NAME
is the name of the underlying library function (NULL if none) and
ATTRS is a list of function attributes.

Return the decl of the declared function.   

References build_builtin_function(), BUILT_IN_MD, fndecl_built_in_p(), lang_hooks::simulate_builtin_function_decl, and TREE_CODE.

Variable Documentation

◆ lang_hooks

struct lang_hooks lang_hooks
extern
Each front end provides its own.