osprey/driver/lang_defs.c File Reference

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "lib_phase_dir.h"
#include "lang_defs.h"
#include "file_utils.h"
#include "string_utils.h"
#include "errors.h"

Include dependency graph for lang_defs.c:

Go to the source code of this file.

Data Types

type  lang_struct
type  phase_struct
type  source_struct

Defines

#define MAX_LANG_NAMES   5
#define MAX_SUFFIXES   8

Typedefs

typedef struct lang_struct lang_info_t
typedef struct phase_struct phase_info_t
typedef struct source_struct source_info_t

Functions/Subroutines

phases_t earliest_phase (phases_t a, phases_t b)
languages_t get_language (char key)
mask_t get_language_mask (languages_t i)
phases_t get_phase (char key)
mask_t get_phase_mask (phases_t i)
boolean is_matching_language (mask_t lang_mask, languages_t l)
boolean is_matching_phase (mask_t phase_mask, phases_t p)
void set_phase_dir (mask_t mask, char *path)
void substitute_phase_dirs (char *orig_dir, char *new_dir, char *leaf)
void prefix_all_phase_dirs (mask_t mask, char *path)
void append_all_phase_dirs (mask_t mask, char *path)
void append_phase_dir (phases_t index, char *path)
char * get_phase_dir (phases_t index)
void get_phases_real_path (void)
char * get_phase_ld_library_path (phases_t index)
char * get_phase_name (phases_t index)
void set_phase_name (phases_t index, char *s)
char * get_full_phase_name (phases_t index)
char * get_lang_name (languages_t index)
languages_t get_named_language (char *name)
source_kind_t get_source_kind_from_suffix (char *suf)
source_kind_t get_source_kind (char *src)
char * get_suffix_string (source_kind_t sk)
boolean is_object_source_kind (char *src)
languages_t get_source_lang (source_kind_t sk)

Variables

char * ldpath_for_pixie = NULL
static lang_info_t language_info []
static phase_info_t phase_info []
mask_t OPEN64_PHASE_MASK
mask_t PHASE_MASK
mask_t LIB_MASK
static source_info_t source_info []
languages_t invoked_lang
languages_t source_lang
phases_t first_phase = P_any_cpp
phases_t last_phase = P_cord
phases_t remember_last_phase = P_NONE
phases_t current_phase = P_NONE
source_kind_t source_kind = S_NONE
source_kind_t default_source_kind = S_NONE
boolean ignore_suffix = FALSE


Define Documentation

#define MAX_LANG_NAMES   5

Definition at line 64 of file lang_defs.c.

Referenced by get_named_language().

#define MAX_SUFFIXES   8

Definition at line 228 of file lang_defs.c.

Referenced by get_source_kind_from_suffix(), and is_object_source_kind().


Typedef Documentation


Function Documentation

void append_all_phase_dirs ( mask_t  mask,
char *  path 
)

Definition at line 404 of file lang_defs.c.

References concat_strings(), dir, phase_struct::dir, i, P_LAST, P_NONE, strcmp(), and strlen().

void append_phase_dir ( phases_t  index,
char *  path 
)

Definition at line 422 of file lang_defs.c.

References concat_strings(), dir, and phase_struct::dir.

Referenced by add_library_options().

phases_t earliest_phase ( phases_t  a,
phases_t  b 
)

Definition at line 284 of file lang_defs.c.

Referenced by change_last_phase(), dash_F_option(), and if().

char* get_full_phase_name ( phases_t  index  ) 

char* get_lang_name ( languages_t  index  ) 

Definition at line 531 of file lang_defs.c.

References concat_strings(), and lang_struct::name.

Referenced by for().

languages_t get_language ( char  key  ) 

Definition at line 293 of file lang_defs.c.

References i, internal_error(), L_LAST, and L_NONE.

Referenced by create_lang_field().

mask_t get_language_mask ( languages_t  i  ) 

languages_t get_named_language ( char *  name  ) 

phases_t get_phase ( char  key  ) 

char* get_phase_dir ( phases_t  index  ) 

char* get_phase_ld_library_path ( phases_t  index  ) 

Definition at line 493 of file lang_defs.c.

References phase_struct::dir.

Referenced by run_phase().

mask_t get_phase_mask ( phases_t  i  ) 

char* get_phase_name ( phases_t  index  ) 

Definition at line 503 of file lang_defs.c.

References concat_strings(), and phase_struct::name.

Referenced by get_full_phase_name(), and if().

void get_phases_real_path ( void   ) 

Definition at line 475 of file lang_defs.c.

References dir, phase_struct::dir, i, p, P_LAST, P_NONE, PATH_MAX, realpath(), strcmp(), and string_copy().

Referenced by init_phase_info().

source_kind_t get_source_kind ( char *  src  ) 

source_kind_t get_source_kind_from_suffix ( char *  suf  ) 

Definition at line 601 of file lang_defs.c.

References i, MAX_SUFFIXES, NULL, S_LAST, S_NONE, S_o, strcmp(), and source_struct::suffix.

Referenced by for(), and get_source_kind().

languages_t get_source_lang ( source_kind_t  sk  ) 

Definition at line 663 of file lang_defs.c.

References invoked_lang, L_as, L_cc, L_CC, L_f77, L_f90, L_NONE, S_B, S_C, S_c, S_F, S_f, S_F90, S_f90, S_I, S_i, S_ii, S_N, S_O, S_o, S_r, S_S, and S_s.

Referenced by for(), if(), and run_compiler().

char* get_suffix_string ( source_kind_t  sk  ) 

Definition at line 638 of file lang_defs.c.

References source_struct::suffix.

Referenced by add_file_args(), and main().

boolean is_matching_language ( mask_t  lang_mask,
languages_t  l 
)

Definition at line 335 of file lang_defs.c.

Referenced by is_internal_option(), and option_matches_language().

boolean is_matching_phase ( mask_t  phase_mask,
phases_t  p 
)

boolean is_object_source_kind ( char *  src  ) 

Definition at line 646 of file lang_defs.c.

References FALSE, get_suffix(), MAX_SUFFIXES, NULL, S_o, strcmp(), source_struct::suffix, and TRUE.

void prefix_all_phase_dirs ( mask_t  mask,
char *  path 
)

Definition at line 392 of file lang_defs.c.

References concat_strings(), dir, phase_struct::dir, i, P_LAST, and P_NONE.

Referenced by init_phase_info().

void set_phase_dir ( mask_t  mask,
char *  path 
)

void set_phase_name ( phases_t  index,
char *  s 
)

Definition at line 514 of file lang_defs.c.

References phase_struct::name.

Referenced by if(), and init_frontend_phase_names().

void substitute_phase_dirs ( char *  orig_dir,
char *  new_dir,
char *  leaf 
)


Variable Documentation

Definition at line 276 of file lang_defs.c.

Referenced by add_file_args(), construct_given_name(), and construct_name().

Definition at line 278 of file lang_defs.c.

Referenced by get_source_kind(), and set_explicit_lang().

phases_t first_phase = P_any_cpp

Definition at line 273 of file lang_defs.c.

Referenced by determine_phase_order(), and tekhex_object_p().

Definition at line 279 of file lang_defs.c.

Referenced by check_for_driver_controls(), get_source_kind(), and set_explicit_lang().

Initial value:

 {
  {'N', 0x00000000, {""}},    
  {'A', 0x0fffffff, {""}},    
  {'p', 0x00000001, {"cpp"}},   













  {'I', 0x80000000, {"int"}},   
}

Definition at line 71 of file lang_defs.c.

phases_t last_phase = P_cord

char* ldpath_for_pixie = NULL

Definition at line 57 of file lang_defs.c.

Referenced by add_file_args(), set_phase_dir(), and substitute_phase_dirs().

Initial value:

          0xfff0000000000000LL

Definition at line 225 of file lang_defs.c.

Referenced by init_phase_info().

Initial value:

          0x0000f19fffffff90LL

Definition at line 221 of file lang_defs.c.

Referenced by init_phase_info().

Definition at line 101 of file lang_defs.c.

Initial value:

          0x000fffffffffffffLL

Definition at line 223 of file lang_defs.c.

Referenced by init_phase_info().

Definition at line 233 of file lang_defs.c.


Generated on Wed Apr 8 15:07:17 2009 for Open64 by  doxygen 1.5.6