OSDN Git Service

Merge in xfails from PR14107.
[pf3gnuchains/gcc-fork.git] / gcc / input.h
1 /* Declarations for variables relating to reading the source file.
2    Used by parsers, lexical analyzers, and error message routines.
3    Copyright (C) 1993, 1997, 1998, 2000, 2003, 2004 Free Software Foundation, Inc.
4
5 This file is part of GCC.
6
7 GCC is free software; you can redistribute it and/or modify it under
8 the terms of the GNU General Public License as published by the Free
9 Software Foundation; either version 2, or (at your option) any later
10 version.
11
12 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13 WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
15 for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GCC; see the file COPYING.  If not, write to the Free
19 Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.  */
21
22 #ifndef GCC_INPUT_H
23 #define GCC_INPUT_H
24
25 extern struct line_maps line_table;
26
27 /* The data structure used to record a location in a translation unit.  */
28 /* Long-term, we want to get rid of this and typedef fileline location_t.  */
29 struct location_s GTY (())
30 {
31   /* The name of the source file involved.  */
32   const char *file;
33
34   /* The line-location in the source file.  */
35   int line;
36 };
37 typedef struct location_s location_t;
38
39 struct file_stack
40 {
41   struct file_stack *next;
42   location_t location;
43 };
44
45 /* Top-level source file.  */
46 extern const char *main_input_filename;
47
48 extern location_t input_location;
49 #define input_line (input_location.line)
50 #define input_filename (input_location.file)
51
52 /* Stack of currently pending input files.
53    The line member is not accurate for the innermost file on the stack.  */
54 extern struct file_stack *input_file_stack;
55
56 /* Incremented on each change to input_file_stack.  */
57 extern int input_file_stack_tick;
58
59 extern void push_srcloc (const char *name, int line);
60 extern void pop_srcloc (void);
61
62 #endif