aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/ast/rust-ast-builder.h
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2024-12-26 22:09:46 +0000
committerCohenArthur <arthur.cohen@embecosm.com>2025-01-20 12:09:26 +0000
commit4b3588023ed829338da66d69f86df361dbf93066 (patch)
tree9740ae82fce9a8e6c875e0592355a785d2f28f3a /gcc/rust/ast/rust-ast-builder.h
parent1a0ec0ec4c8045772603f667abd306266f824ea2 (diff)
downloadgcc-4b3588023ed829338da66d69f86df361dbf93066.zip
gcc-4b3588023ed829338da66d69f86df361dbf93066.tar.gz
gcc-4b3588023ed829338da66d69f86df361dbf93066.tar.bz2
ast-builder: Add new methods around type paths.
gcc/rust/ChangeLog: * ast/rust-ast-builder.cc: New functions. * ast/rust-ast-builder.h: Declare them.
Diffstat (limited to 'gcc/rust/ast/rust-ast-builder.h')
-rw-r--r--gcc/rust/ast/rust-ast-builder.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/gcc/rust/ast/rust-ast-builder.h b/gcc/rust/ast/rust-ast-builder.h
index bb00377..86279b0 100644
--- a/gcc/rust/ast/rust-ast-builder.h
+++ b/gcc/rust/ast/rust-ast-builder.h
@@ -114,16 +114,27 @@ public:
/* And similarly for type path segments */
std::unique_ptr<TypePathSegment> type_path_segment (std::string seg) const;
+ std::unique_ptr<TypePathSegment>
+ type_path_segment (LangItem::Kind lang_item) const;
std::unique_ptr<TypePathSegment>
- generic_type_path_segment (std::string seg, GenericArgs args) const;
+ type_path_segment_generic (std::string seg, GenericArgs args) const;
+ std::unique_ptr<TypePathSegment>
+ type_path_segment_generic (LangItem::Kind lang_item, GenericArgs args) const;
/* Create a Type from a single string - the most basic kind of type in our AST
*/
std::unique_ptr<Type> single_type_path (std::string type) const;
+ std::unique_ptr<Type> single_type_path (LangItem::Kind lang_item) const;
std::unique_ptr<Type> single_generic_type_path (std::string type,
GenericArgs args) const;
+ std::unique_ptr<Type> single_generic_type_path (LangItem::Kind lang_item,
+ GenericArgs args) const;
+
+ TypePath type_path (std::unique_ptr<TypePathSegment> &&segment) const;
+ TypePath type_path (std::string type) const;
+ TypePath type_path (LangItem::Kind lang_item) const;
/**
* Create a path in expression from multiple segments (`Clone::clone`). You