aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/lex/rust-token.h
diff options
context:
space:
mode:
authorOwen Avery <powerboat9.gamer@gmail.com>2023-07-10 16:06:27 -0400
committerArthur Cohen <arthur.cohen@embecosm.com>2024-01-16 18:55:59 +0100
commitdd15fff38562ab8c3160190366f1e755c033425b (patch)
treea0e1d0a8c8f483df5d1fdb88c555f18628ffa654 /gcc/rust/lex/rust-token.h
parente99e565e0aa866cdec407f851d651096fb190f7f (diff)
downloadgcc-dd15fff38562ab8c3160190366f1e755c033425b.zip
gcc-dd15fff38562ab8c3160190366f1e755c033425b.tar.gz
gcc-dd15fff38562ab8c3160190366f1e755c033425b.tar.bz2
gccrs: Continue to replace usages of Location with location_t
gcc/rust/ChangeLog: * backend/rust-compile-base.cc: Replace Location with location_t. * backend/rust-compile-base.h: Likewise. * backend/rust-compile-expr.cc: Likewise. * lex/rust-token.h: Likewise. * metadata/rust-import-archive.cc: Likewise. * metadata/rust-imports.cc: Likewise. * metadata/rust-imports.h: Likewise. * rust-backend.h: Likewise. * rust-diagnostics.cc: Likewise. * rust-diagnostics.h: Likewise. * rust-gcc.cc: Likewise. * rust-linemap.cc: Likewise. * util/rust-token-converter.cc: Likewise. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Diffstat (limited to 'gcc/rust/lex/rust-token.h')
-rw-r--r--gcc/rust/lex/rust-token.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/rust/lex/rust-token.h b/gcc/rust/lex/rust-token.h
index 1783b1e..acbbeb0 100644
--- a/gcc/rust/lex/rust-token.h
+++ b/gcc/rust/lex/rust-token.h
@@ -252,32 +252,32 @@ private:
PrimitiveCoreType type_hint;
// Token constructor from token id and location. Has a null string.
- Token (TokenId token_id, Location location)
+ Token (TokenId token_id, location_t location)
: token_id (token_id), locus (location), str (nullptr),
type_hint (CORETYPE_UNKNOWN)
{}
// Token constructor from token id, location, and a string.
- Token (TokenId token_id, Location location, std::string &&paramStr)
+ Token (TokenId token_id, location_t location, std::string &&paramStr)
: token_id (token_id), locus (location),
str (new std::string (std::move (paramStr))), type_hint (CORETYPE_UNKNOWN)
{}
// Token constructor from token id, location, and a char.
- Token (TokenId token_id, Location location, char paramChar)
+ Token (TokenId token_id, location_t location, char paramChar)
: token_id (token_id), locus (location),
str (new std::string (1, paramChar)), type_hint (CORETYPE_UNKNOWN)
{}
// Token constructor from token id, location, and a "codepoint".
- Token (TokenId token_id, Location location, Codepoint paramCodepoint)
+ Token (TokenId token_id, location_t location, Codepoint paramCodepoint)
: token_id (token_id), locus (location),
str (new std::string (paramCodepoint.as_string ())),
type_hint (CORETYPE_UNKNOWN)
{}
// Token constructor from token id, location, a string, and type hint.
- Token (TokenId token_id, Location location, std::string &&paramStr,
+ Token (TokenId token_id, location_t location, std::string &&paramStr,
PrimitiveCoreType parType)
: token_id (token_id), locus (location),
str (new std::string (std::move (paramStr))), type_hint (parType)