diff options
author | Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com> | 2023-06-28 15:12:11 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@embecosm.com> | 2023-07-07 13:46:54 +0000 |
commit | 257d6ce56f82f6216c5312a9cd82ae1323d49e34 (patch) | |
tree | 5a5699a670a2916b3f3f06849b3de77b4002ac8a | |
parent | ac9003b440d1b677b2002c4d24cf5ce1eb3ec095 (diff) | |
download | gcc-257d6ce56f82f6216c5312a9cd82ae1323d49e34.zip gcc-257d6ce56f82f6216c5312a9cd82ae1323d49e34.tar.gz gcc-257d6ce56f82f6216c5312a9cd82ae1323d49e34.tar.bz2 |
collector: Add variadics to collector output
Variadics were missing from collector output for external functions.
gcc/rust/ChangeLog:
* ast/rust-ast-collector.cc (TokenCollector::visit): Add
variadics in collector output.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
-rw-r--r-- | gcc/rust/ast/rust-ast-collector.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/rust/ast/rust-ast-collector.cc b/gcc/rust/ast/rust-ast-collector.cc index fedff55..c06605a 100644 --- a/gcc/rust/ast/rust-ast-collector.cc +++ b/gcc/rust/ast/rust-ast-collector.cc @@ -2197,6 +2197,13 @@ TokenCollector::visit (ExternalFunctionItem &function) push (Rust::Token::make (LEFT_PAREN, Location ())); visit_items_joined_by_separator (function.get_function_params ()); + if (function.is_variadic ()) + { + push (Rust::Token::make (COMMA, Location ())); + // TODO: Add variadic outer attributes? + // TODO: Add variadic name once implemented. + push (Rust::Token::make (ELLIPSIS, Location ())); + } push (Rust::Token::make (RIGHT_PAREN, Location ())); if (function.has_return_type ()) |