aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-linemap.cc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/rust/rust-linemap.cc')
-rw-r--r--gcc/rust/rust-linemap.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/rust/rust-linemap.cc b/gcc/rust/rust-linemap.cc
index 637d749..b32a965a 100644
--- a/gcc/rust/rust-linemap.cc
+++ b/gcc/rust/rust-linemap.cc
@@ -42,6 +42,8 @@ public:
int location_line (Location);
+ int location_column (Location);
+
protected:
Location get_predeclared_location ();
@@ -111,6 +113,13 @@ Gcc_linemap::location_line (Location loc)
return LOCATION_LINE (loc.gcc_location ());
}
+// Return the column number for a given location.
+int
+Gcc_linemap::location_column (Location loc)
+{
+ return LOCATION_COLUMN (loc.gcc_location ());
+}
+
// Stop getting locations.
void