cafe_dem.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 1993 by Sun Microsystems, Inc.
* All Rights Reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*****************************************************************
Copyright 1993 Sun Microsystems
All Rights Reserved.
%W% %G% %U%
Revisions
06/10/93 - Raymond Lai Created
******************************************************************/
#ifndef _CAFE_DEM_H
#define _CAFE_DEM_H
#include "dem.h"
#ifdef __cplusplus
extern "C" {
#endif
/* Note: NDEM_type starts with 1000 so that dbx can tell a NDEM_name
structure from a DEM (cfront) one.
*/
enum NDEM_type {
};
typedef struct NDEM_modifier {
char is_signed : 1;
char is_volatile : 1;
char is_unsigned : 1;
char is_const : 1;
char is_static : 1;
struct NDEM_class;
struct NDEM_arg;
/* A cafe name. This can be either a (static) data member, a function member,
or a global function.
*/
typedef struct NDEM_name {
struct NDEM_class *qual_class;
char *raw_name;
} NDEM_name;
/* A class. */
typedef struct NDEM_class {
struct NDEM_class *qual_class;
char *raw_class_name;
} NDEM_class;
/* A function pointer (as an argument). */
typedef struct NDEM_fptr {
struct NDEM_class *qual_class;
} NDEM_fptr;
/* A member data pointer (as an argument). */
typedef struct NDEM_mdptr {
struct NDEM_class *qual_class;
struct NDEM_arg *mem_data_t;
} NDEM_mdptr;
/* An abbreviation record (for arguments like "NDC", "TB"). */
typedef struct NDEM_abbrev_rec {
int repetition_number;
int param_number;
/* A pointer, reference, or array introduces a type of its own... */
enum NDEM_decl_type {
};
typedef struct NDEM_declarator {
enum NDEM_decl_type decl_type;
char *array_size; /* if an array */
enum NDEM_arg_type {
NDEM_i_const, /* template integral constant argument */
NDEM_p_const /* template pointer constant argument */
};
/* A type. */
typedef struct NDEM_arg {
enum NDEM_arg_type arg_type;
union {
char basic_t;
struct NDEM_class *user_defined_t;
struct NDEM_fptr *function_ptr;
struct NDEM_mdptr *mem_data_ptr;
struct NDEM_abbrev_rec abbrev_rec;
struct NDEM_declarator decl;
char *pt_constant;
struct NDEM_name *temp_p_arg;
} arg_data;
struct NDEM_modifier modifier;
} NDEM_arg;
#ifdef DBX_SUPPORT
extern char *cafe_getclass (NDEM_name *, char *);
extern char *cafe_getname (NDEM_name *, char *);
extern char **cafe_getparentclass (NDEM_name *, char **);
extern char *cafe_gettemplatename (NDEM_name *);
#endif
#ifdef __cplusplus
}
#endif
#endif