public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r14-8018] gccrs: Minor typo fix
@ 2024-01-16 18:13 Arthur Cohen
0 siblings, 0 replies; only message in thread
From: Arthur Cohen @ 2024-01-16 18:13 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:0a99bfe15af01e15c07bb5003b54d351f64a5cde
commit r14-8018-g0a99bfe15af01e15c07bb5003b54d351f64a5cde
Author: Marc Poulhiès <dkm@kataplop.net>
Date: Sat Sep 16 23:31:34 2023 +0200
gccrs: Minor typo fix
Fix varadic -> variadic
gcc/rust/ChangeLog:
* backend/rust-compile-expr.cc (CompileExpr::visit): Fix typo in varIadic.
* backend/rust-compile-type.cc (TyTyResolveCompile::visit): Likewise.
* rust-backend.h (function_type_varadic): Rename into ...
(function_type_variadic): ... this.
* rust-gcc.cc (function_type_varadic): Rename into ...
(function_type_variadic): ... this.
* typecheck/rust-tyty-call.cc (TypeCheckCallExpr::visit): Likewise.
* typecheck/rust-tyty.h (is_varadic): Renamed into ...
(is_variadic): ... this.
Signed-off-by: Marc Poulhiès <dkm@kataplop.net>
Diff:
---
gcc/rust/backend/rust-compile-expr.cc | 6 +++---
gcc/rust/backend/rust-compile-type.cc | 7 ++++---
gcc/rust/rust-backend.h | 8 ++++----
gcc/rust/rust-gcc.cc | 8 ++++----
gcc/rust/typecheck/rust-tyty-call.cc | 2 +-
gcc/rust/typecheck/rust-tyty.h | 2 +-
6 files changed, 17 insertions(+), 16 deletions(-)
diff --git a/gcc/rust/backend/rust-compile-expr.cc b/gcc/rust/backend/rust-compile-expr.cc
index 2c8ed0282a8..b827f4cf82e 100644
--- a/gcc/rust/backend/rust-compile-expr.cc
+++ b/gcc/rust/backend/rust-compile-expr.cc
@@ -1634,11 +1634,11 @@ CompileExpr::visit (HIR::CallExpr &expr)
if (possible_trait_call)
return;
- bool is_varadic = false;
+ bool is_variadic = false;
if (tyty->get_kind () == TyTy::TypeKind::FNDEF)
{
const TyTy::FnType *fn = static_cast<const TyTy::FnType *> (tyty);
- is_varadic = fn->is_varadic ();
+ is_variadic = fn->is_variadic ();
}
size_t required_num_args = expr.get_arguments ().size ();
@@ -1659,7 +1659,7 @@ CompileExpr::visit (HIR::CallExpr &expr)
auto &argument = expr.get_arguments ().at (i);
auto rvalue = CompileExpr::Compile (argument.get (), ctx);
- if (is_varadic && i >= required_num_args)
+ if (is_variadic && i >= required_num_args)
{
args.push_back (rvalue);
continue;
diff --git a/gcc/rust/backend/rust-compile-type.cc b/gcc/rust/backend/rust-compile-type.cc
index 0c4710228d4..8368fce69bc 100644
--- a/gcc/rust/backend/rust-compile-type.cc
+++ b/gcc/rust/backend/rust-compile-type.cc
@@ -218,12 +218,13 @@ TyTyResolveCompile::visit (const TyTy::FnType &type)
parameters.push_back (compiled_param);
}
- if (!type.is_varadic ())
+ if (!type.is_variadic ())
translated = Backend::function_type (receiver, parameters, results, NULL,
type.get_ident ().locus);
else
- translated = Backend::function_type_varadic (receiver, parameters, results,
- NULL, type.get_ident ().locus);
+ translated
+ = Backend::function_type_variadic (receiver, parameters, results, NULL,
+ type.get_ident ().locus);
}
void
diff --git a/gcc/rust/rust-backend.h b/gcc/rust/rust-backend.h
index 5a1bbd874e9..7bdf67b46ef 100644
--- a/gcc/rust/rust-backend.h
+++ b/gcc/rust/rust-backend.h
@@ -122,10 +122,10 @@ function_type (const typed_identifier &receiver,
location_t location);
tree
-function_type_varadic (const typed_identifier &receiver,
- const std::vector<typed_identifier> ¶meters,
- const std::vector<typed_identifier> &results,
- tree result_struct, location_t location);
+function_type_variadic (const typed_identifier &receiver,
+ const std::vector<typed_identifier> ¶meters,
+ const std::vector<typed_identifier> &results,
+ tree result_struct, location_t location);
tree
function_ptr_type (tree result, const std::vector<tree> &praameters,
diff --git a/gcc/rust/rust-gcc.cc b/gcc/rust/rust-gcc.cc
index 73c966a3320..580bda7f00a 100644
--- a/gcc/rust/rust-gcc.cc
+++ b/gcc/rust/rust-gcc.cc
@@ -513,10 +513,10 @@ function_type (const typed_identifier &receiver,
}
tree
-function_type_varadic (const typed_identifier &receiver,
- const std::vector<typed_identifier> ¶meters,
- const std::vector<typed_identifier> &results,
- tree result_struct, location_t)
+function_type_variadic (const typed_identifier &receiver,
+ const std::vector<typed_identifier> ¶meters,
+ const std::vector<typed_identifier> &results,
+ tree result_struct, location_t)
{
size_t n = parameters.size () + (receiver.type != NULL_TREE ? 1 : 0);
tree *args = XALLOCAVEC (tree, n);
diff --git a/gcc/rust/typecheck/rust-tyty-call.cc b/gcc/rust/typecheck/rust-tyty-call.cc
index 9ba3fd83f0e..667d54c6d9e 100644
--- a/gcc/rust/typecheck/rust-tyty-call.cc
+++ b/gcc/rust/typecheck/rust-tyty-call.cc
@@ -116,7 +116,7 @@ TypeCheckCallExpr::visit (FnType &type)
{
if (call.num_params () != type.num_params ())
{
- if (type.is_varadic ())
+ if (type.is_variadic ())
{
if (call.num_params () < type.num_params ())
{
diff --git a/gcc/rust/typecheck/rust-tyty.h b/gcc/rust/typecheck/rust-tyty.h
index 16a80976e4f..3ba24de10d9 100644
--- a/gcc/rust/typecheck/rust-tyty.h
+++ b/gcc/rust/typecheck/rust-tyty.h
@@ -723,7 +723,7 @@ public:
bool is_extern () const { return (flags & FNTYPE_IS_EXTERN_FLAG) != 0; }
- bool is_varadic () const { return (flags & FNTYPE_IS_VARADIC_FLAG) != 0; }
+ bool is_variadic () const { return (flags & FNTYPE_IS_VARADIC_FLAG) != 0; }
DefId get_id () const { return id; }
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-01-16 18:13 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-16 18:13 [gcc r14-8018] gccrs: Minor typo fix Arthur Cohen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).