aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/util/rust-canonical-path.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/gcc/rust/util/rust-canonical-path.h b/gcc/rust/util/rust-canonical-path.h
index 8473df6..6ac8968 100644
--- a/gcc/rust/util/rust-canonical-path.h
+++ b/gcc/rust/util/rust-canonical-path.h
@@ -144,6 +144,17 @@ public:
return segs.back ().first;
}
+ const std::pair<NodeId, std::string> &get_seg_at (size_t index) const
+ {
+ rust_assert (index < size ());
+ return segs.at (index);
+ }
+
+ static bool segment_is_qualified_path (const std::string &seg)
+ {
+ return seg.find (" as ") != std::string::npos;
+ }
+
bool is_equal (const CanonicalPath &b) const
{
return get ().compare (b.get ()) == 0;