]> git.ipfire.org Git - thirdparty/gcc.git/blame - gcc/input.c
Support -fdebug-cpp option
[thirdparty/gcc.git] / gcc / input.c
CommitLineData
447924ef 1/* Data and functions related to line maps and input files.
92582b75 2 Copyright (C) 2004, 2007, 2008, 2009, 2010, 2011
447924ef
JM
3 Free Software Foundation, Inc.
4
5This file is part of GCC.
6
7GCC is free software; you can redistribute it and/or modify it under
8the terms of the GNU General Public License as published by the Free
9Software Foundation; either version 3, or (at your option) any later
10version.
11
12GCC is distributed in the hope that it will be useful, but WITHOUT ANY
13WARRANTY; without even the implied warranty of MERCHANTABILITY or
14FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15for more details.
16
17You should have received a copy of the GNU General Public License
18along with GCC; see the file COPYING3. If not see
19<http://www.gnu.org/licenses/>. */
20
21#include "config.h"
22#include "system.h"
23#include "coretypes.h"
24#include "intl.h"
25#include "input.h"
26
27/* Current position in real source file. */
28
29location_t input_location;
30
31struct line_maps *line_table;
32
33expanded_location
34expand_location (source_location loc)
35{
36 expanded_location xloc;
37 if (loc <= BUILTINS_LOCATION)
38 {
39 xloc.file = loc == UNKNOWN_LOCATION ? NULL : _("<built-in>");
40 xloc.line = 0;
41 xloc.column = 0;
42 xloc.sysp = 0;
43 }
44 else
46427374
TT
45 xloc = linemap_expand_location_full (line_table, loc,
46 LRK_SPELLING_LOCATION);
447924ef
JM
47 return xloc;
48}