summaryrefslogtreecommitdiff
path: root/gcc/input.h
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/input.h')
-rw-r--r--gcc/input.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/gcc/input.h b/gcc/input.h
index d811255c9f4..689e25be3f3 100644
--- a/gcc/input.h
+++ b/gcc/input.h
@@ -51,6 +51,14 @@ extern location_t input_location;
#define LOCATION_FILE(LOC) ((expand_location (LOC)).file)
#define LOCATION_LINE(LOC) ((expand_location (LOC)).line)
#define LOCATION_COLUMN(LOC)((expand_location (LOC)).column)
+#define LOCATION_LOCUS(LOC) \
+ ((IS_ADHOC_LOC(LOC)) ? get_location_from_adhoc_loc (line_table, LOC) : (LOC))
+#define LOCATION_BLOCK(LOC) \
+ ((tree) ((IS_ADHOC_LOC (LOC)) ? get_data_from_adhoc_loc (line_table, (LOC)) \
+ : NULL))
+#define IS_UNKNOWN_LOCATION(LOC) \
+ ((IS_ADHOC_LOC (LOC)) ? get_location_from_adhoc_loc (line_table, LOC) == 0 \
+ : (LOC) == 0)
#define input_line LOCATION_LINE (input_location)
#define input_filename LOCATION_FILE (input_location)