aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshat Agarwal <humancalico@disroot.org>2021-02-17 15:04:44 +0530
committerPhilip Herron <herron.philip@googlemail.com>2021-02-19 10:31:39 +0000
commit8a580f915218bbda017c50582fe47af877d90777 (patch)
treecb633e40d13c2c1afc53d136280234333693425a
parentdf5ef68888c43ebf19126bdad44c6966c73b70cc (diff)
downloadgcc-8a580f915218bbda017c50582fe47af877d90777.zip
gcc-8a580f915218bbda017c50582fe47af877d90777.tar.gz
gcc-8a580f915218bbda017c50582fe47af877d90777.tar.bz2
Format all files in gcc/rust/ using clang-format
Signed-off-by: Akshat Agarwal <humancalico@disroot.org> This commit formats all files in gcc/rust using clang-format.
-rw-r--r--gcc/rust/ast/rust-ast.h13
-rw-r--r--gcc/rust/ast/rust-path.h28
-rw-r--r--gcc/rust/lang-specs.h7
-rw-r--r--gcc/rust/lex/rust-codepoint.h12
-rw-r--r--gcc/rust/lex/rust-token.h5
-rw-r--r--gcc/rust/operator.h24
-rw-r--r--gcc/rust/rust-backend.c28
-rw-r--r--gcc/rust/rust-buffered-queue.h8
-rw-r--r--gcc/rust/rust-diagnostics.cc21
-rw-r--r--gcc/rust/rust-gcc-diagnostics.cc30
-rw-r--r--gcc/rust/rust-lang.cc9
-rw-r--r--gcc/rust/rust-linemap.cc4
-rw-r--r--gcc/rust/rust-object-export.c31
-rw-r--r--gcc/rust/rust-object-export.h5
-rw-r--r--gcc/rust/rust-target.h16
15 files changed, 122 insertions, 119 deletions
diff --git a/gcc/rust/ast/rust-ast.h b/gcc/rust/ast/rust-ast.h
index b34525e..7316865 100644
--- a/gcc/rust/ast/rust-ast.h
+++ b/gcc/rust/ast/rust-ast.h
@@ -144,7 +144,7 @@ class Token : public TokenTree, public MacroMatch
const_TokenPtr tok_ref;
/* new idea: wrapper around const_TokenPtr used for heterogeneuous storage in
- * token trees. rather than convert back and forth when parsing macros, just
+ * token trees. rather than convert back and forth when parsing macros, just
* wrap it. */
public:
@@ -1218,7 +1218,7 @@ protected:
class LifetimeParam : public GenericParam
{
Lifetime lifetime;
- std::vector<Lifetime> lifetime_bounds;
+ std::vector<Lifetime> lifetime_bounds;
Attribute outer_attr;
Location locus;
@@ -1232,15 +1232,15 @@ public:
// Creates an error state lifetime param.
static LifetimeParam create_error ()
{
- return LifetimeParam (Lifetime::error (), {}, Attribute::create_empty (), Location ());
+ return LifetimeParam (Lifetime::error (), {}, Attribute::create_empty (),
+ Location ());
}
// Returns whether the lifetime param is in an error state.
bool is_error () const { return lifetime.is_error (); }
// Constructor
- LifetimeParam (Lifetime lifetime,
- std::vector<Lifetime> lifetime_bounds,
+ LifetimeParam (Lifetime lifetime, std::vector<Lifetime> lifetime_bounds,
Attribute outer_attr, Location locus)
: lifetime (std::move (lifetime)),
lifetime_bounds (std::move (lifetime_bounds)),
@@ -1262,7 +1262,8 @@ protected:
// A macro item AST node - abstract base class
class MacroItem : public Item
-{};
+{
+};
// Item used in trait declarations - abstract base class
class TraitItem
diff --git a/gcc/rust/ast/rust-path.h b/gcc/rust/ast/rust-path.h
index b30dffc..d6f3c42 100644
--- a/gcc/rust/ast/rust-path.h
+++ b/gcc/rust/ast/rust-path.h
@@ -359,14 +359,20 @@ public:
void mark_for_strip () override { remove_all_segments (); }
bool is_marked_for_strip () const override { return is_error (); }
- bool opening_scope_resolution () const { return has_opening_scope_resolution; }
+ bool opening_scope_resolution () const
+ {
+ return has_opening_scope_resolution;
+ }
NodeId get_node_id () const override { return _node_id; }
const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
- void set_outer_attrs (std::vector<Attribute> new_attrs) override { outer_attrs = std::move (new_attrs); }
+ void set_outer_attrs (std::vector<Attribute> new_attrs) override
+ {
+ outer_attrs = std::move (new_attrs);
+ }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -848,8 +854,7 @@ public:
QualifiedPathInExpression (QualifiedPathType qual_path_type,
std::vector<PathExprSegment> path_segments,
- std::vector<Attribute> outer_attrs,
- Location locus)
+ std::vector<Attribute> outer_attrs, Location locus)
: PathPattern (std::move (path_segments)),
outer_attrs (std::move (outer_attrs)),
path_type (std::move (qual_path_type)), locus (locus)
@@ -864,8 +869,8 @@ public:
// Creates an error qualified path in expression.
static QualifiedPathInExpression create_error ()
{
- return QualifiedPathInExpression (QualifiedPathType::create_error (),
- {}, {}, Location ());
+ return QualifiedPathInExpression (QualifiedPathType::create_error (), {},
+ {}, Location ());
}
Location get_locus () const { return locus; }
@@ -890,7 +895,10 @@ public:
const std::vector<Attribute> &get_outer_attrs () const { return outer_attrs; }
std::vector<Attribute> &get_outer_attrs () { return outer_attrs; }
- void set_outer_attrs (std::vector<Attribute> new_attrs) override { outer_attrs = std::move (new_attrs); }
+ void set_outer_attrs (std::vector<Attribute> new_attrs) override
+ {
+ outer_attrs = std::move (new_attrs);
+ }
protected:
/* Use covariance to implement clone function as returning this object rather
@@ -902,12 +910,14 @@ protected:
/* Use covariance to implement clone function as returning this object rather
* than base */
- QualifiedPathInExpression *clone_expr_without_block_impl () const final override
+ QualifiedPathInExpression *
+ clone_expr_without_block_impl () const final override
{
return clone_qual_path_in_expression_impl ();
}
- /*virtual*/ QualifiedPathInExpression *clone_qual_path_in_expression_impl () const
+ /*virtual*/ QualifiedPathInExpression *
+ clone_qual_path_in_expression_impl () const
{
return new QualifiedPathInExpression (*this);
}
diff --git a/gcc/rust/lang-specs.h b/gcc/rust/lang-specs.h
index bfd4dda..cb9a197 100644
--- a/gcc/rust/lang-specs.h
+++ b/gcc/rust/lang-specs.h
@@ -20,6 +20,7 @@
/* This is the contribution to the `default_compilers' array in gcc.c
for the Rust language. */
-{".rs", "@rs", 0, 1, 0},
-{"@rs", "rust1 %i %(cc1_options) %{I*} %{L*} %D %{!fsyntax-only:%(invoke_as)}",
- 0, 1, 0},
+{".rs", "@rs", 0, 1, 0},
+ {"@rs",
+ "rust1 %i %(cc1_options) %{I*} %{L*} %D %{!fsyntax-only:%(invoke_as)}", 0, 1,
+ 0},
diff --git a/gcc/rust/lex/rust-codepoint.h b/gcc/rust/lex/rust-codepoint.h
index 836f819..980f97b 100644
--- a/gcc/rust/lex/rust-codepoint.h
+++ b/gcc/rust/lex/rust-codepoint.h
@@ -35,15 +35,9 @@ struct Codepoint
// Returns a C++ string containing string value of codepoint.
std::string as_string ();
- bool operator== (Codepoint other) const
- {
- return value == other.value;
- }
-
- bool operator!= (Codepoint other) const
- {
- return !operator== (other);
- }
+ bool operator== (Codepoint other) const { return value == other.value; }
+
+ bool operator!= (Codepoint other) const { return !operator== (other); }
};
} // namespace Rust
diff --git a/gcc/rust/lex/rust-token.h b/gcc/rust/lex/rust-token.h
index 6070244..f8680cd 100644
--- a/gcc/rust/lex/rust-token.h
+++ b/gcc/rust/lex/rust-token.h
@@ -336,7 +336,8 @@ public:
// Makes and returns a new TokenPtr of type STRING_LITERAL.
static TokenPtr make_string (Location locus, const std::string &str)
{
- // return std::make_shared<Token> (STRING_LITERAL, locus, str, CORETYPE_STR);
+ // return std::make_shared<Token> (STRING_LITERAL, locus, str,
+ // CORETYPE_STR);
return TokenPtr (new Token (STRING_LITERAL, locus, str, CORETYPE_STR));
}
@@ -357,7 +358,7 @@ public:
// Makes and returns a new TokenPtr of type BYTE_STRING_LITERAL (fix).
static TokenPtr make_byte_string (Location locus, const std::string &str)
{
- // return std::make_shared<Token> (BYTE_STRING_LITERAL, locus, str);
+ // return std::make_shared<Token> (BYTE_STRING_LITERAL, locus, str);
return TokenPtr (new Token (BYTE_STRING_LITERAL, locus, str));
}
diff --git a/gcc/rust/operator.h b/gcc/rust/operator.h
index 49add60..e2bcf3b 100644
--- a/gcc/rust/operator.h
+++ b/gcc/rust/operator.h
@@ -19,25 +19,25 @@ enum Operator
OPERATOR_ANDAND, // &&
OPERATOR_EQEQ, // ==
OPERATOR_NOTEQ, // !=
- OPERATOR_LT, // <
- OPERATOR_LE, // <=
- OPERATOR_GT, // >
- OPERATOR_GE, // >=
+ OPERATOR_LT, // <
+ OPERATOR_LE, // <=
+ OPERATOR_GT, // >
+ OPERATOR_GE, // >=
OPERATOR_PLUS, // +
OPERATOR_MINUS, // -
- OPERATOR_OR, // |
- OPERATOR_XOR, // ^
+ OPERATOR_OR, // |
+ OPERATOR_XOR, // ^
OPERATOR_MULT, // *
- OPERATOR_DIV, // /
- OPERATOR_MOD, // %
+ OPERATOR_DIV, // /
+ OPERATOR_MOD, // %
OPERATOR_LSHIFT, // <<
OPERATOR_RSHIFT, // >>
- OPERATOR_AND, // &
- OPERATOR_NOT, // !
+ OPERATOR_AND, // &
+ OPERATOR_NOT, // !
OPERATOR_BITCLEAR, // &^
OPERATOR_CHANOP, // <-
- OPERATOR_EQ, // =
+ OPERATOR_EQ, // =
OPERATOR_PLUSEQ, // +=
OPERATOR_MINUSEQ, // -=
OPERATOR_OREQ, // |=
@@ -55,7 +55,7 @@ enum Operator
OPERATOR_COLON, // :
OPERATOR_COLONEQ, // :=
OPERATOR_SEMICOLON, // ;
- OPERATOR_DOT, // .
+ OPERATOR_DOT, // .
OPERATOR_ELLIPSIS, // ...
OPERATOR_COMMA, // ,
OPERATOR_LPAREN, // (
diff --git a/gcc/rust/rust-backend.c b/gcc/rust/rust-backend.c
index 49c7ebd..427fbe0 100644
--- a/gcc/rust/rust-backend.c
+++ b/gcc/rust/rust-backend.c
@@ -28,7 +28,7 @@
#include "simple-object.h"
#include "stor-layout.h"
#include "intl.h"
-#include "output.h" /* for assemble_string */
+#include "output.h" /* for assemble_string */
#include "common/common-target.h"
//#include "rust-c.h" // import no longer exists, so hopefully not broken
@@ -104,14 +104,13 @@ rust_imported_unsafe (void)
void
rust_write_export_data (const char *bytes, unsigned int size)
{
- static section* sec;
+ static section *sec;
if (sec == NULL)
{
gcc_assert (targetm_common.have_named_sections);
sec = get_section (RUST_EXPORT_SECTION_NAME,
- TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
- NULL);
+ TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
}
switch_to_section (sec);
@@ -145,20 +144,19 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
*plen = 0;
sobj = simple_object_start_read (fd, offset, RUST_EXPORT_SEGMENT_NAME,
- &errmsg, perr);
+ &errmsg, perr);
if (sobj == NULL)
{
/* If we get an error here, just pretend that we didn't find any
- export data. This is the right thing to do if the error is
- that the file was not recognized as an object file. This
- will ignore file I/O errors, but it's not too big a deal
- because we will wind up giving some other error later. */
+ export data. This is the right thing to do if the error is
+ that the file was not recognized as an object file. This
+ will ignore file I/O errors, but it's not too big a deal
+ because we will wind up giving some other error later. */
return NULL;
}
found = simple_object_find_section (sobj, RUST_EXPORT_SECTION_NAME,
- &sec_offset, &sec_length,
- &errmsg, perr);
+ &sec_offset, &sec_length, &errmsg, perr);
simple_object_release_read (sobj);
if (!found)
return errmsg;
@@ -166,14 +164,14 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
if (lseek (fd, offset + sec_offset, SEEK_SET) < 0)
{
*perr = errno;
- return _("lseek failed while reading export data");
+ return _ ("lseek failed while reading export data");
}
buf = XNEWVEC (char, sec_length);
if (buf == NULL)
{
*perr = errno;
- return _("memory allocation failed while reading export data");
+ return _ ("memory allocation failed while reading export data");
}
c = read (fd, buf, sec_length);
@@ -181,13 +179,13 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
{
*perr = errno;
free (buf);
- return _("read failed while reading export data");
+ return _ ("read failed while reading export data");
}
if (c < sec_length)
{
free (buf);
- return _("short read while reading export data");
+ return _ ("short read while reading export data");
}
*pbuf = buf;
diff --git a/gcc/rust/rust-buffered-queue.h b/gcc/rust/rust-buffered-queue.h
index 7cca024..ebea02f 100644
--- a/gcc/rust/rust-buffered-queue.h
+++ b/gcc/rust/rust-buffered-queue.h
@@ -82,7 +82,8 @@ public:
std::swap (buffer, new_queue);
*/
- // TODO: determine overhead of this approach vs copy. Should be lower.
+ // TODO: determine overhead of this approach vs copy. Should be
+ // lower.
std::vector<T> new_queue;
new_queue.reserve (new_size);
new_queue.insert (new_queue.begin (),
@@ -90,8 +91,9 @@ public:
std::make_move_iterator (buffer.begin () + end));
start = 0;
end = num_queued_items;
- // fill up rest of vector with junk so that indexing can work
- new_queue.insert (new_queue.begin () + end, new_size - new_queue.size(), T ());
+ // fill up rest of vector with junk so that indexing can work
+ new_queue.insert (new_queue.begin () + end,
+ new_size - new_queue.size (), T ());
buffer = std::move (new_queue);
/* this should be best method - std::move(range) would have
diff --git a/gcc/rust/rust-diagnostics.cc b/gcc/rust/rust-diagnostics.cc
index 8e32f78ae..0f82091 100644
--- a/gcc/rust/rust-diagnostics.cc
+++ b/gcc/rust/rust-diagnostics.cc
@@ -45,33 +45,27 @@ expand_format (const char *fmt)
c++;
switch (*c)
{
- case '\0':
- {
+ case '\0': {
// malformed format string
rust_unreachable ();
}
- case '%':
- {
+ case '%': {
ss << "%";
break;
}
- case 'm':
- {
+ case 'm': {
ss << mformat_value ();
break;
}
- case '<':
- {
+ case '<': {
ss << rust_open_quote ();
break;
}
- case '>':
- {
+ case '>': {
ss << rust_close_quote ();
break;
}
- case 'q':
- {
+ case 'q': {
ss << rust_open_quote ();
c++;
if (*c == 'm')
@@ -85,8 +79,7 @@ expand_format (const char *fmt)
ss << rust_close_quote ();
break;
}
- default:
- {
+ default: {
ss << "%" << *c;
}
}
diff --git a/gcc/rust/rust-gcc-diagnostics.cc b/gcc/rust/rust-gcc-diagnostics.cc
index 7553d74..37e5066 100644
--- a/gcc/rust/rust-gcc-diagnostics.cc
+++ b/gcc/rust/rust-gcc-diagnostics.cc
@@ -22,38 +22,36 @@
#include "rust-diagnostics.h"
void
-rust_be_error_at(const Location location, const std::string& errmsg)
+rust_be_error_at (const Location location, const std::string &errmsg)
{
- location_t gcc_loc = location.gcc_location();
- error_at(gcc_loc, "%s", errmsg.c_str());
+ location_t gcc_loc = location.gcc_location ();
+ error_at (gcc_loc, "%s", errmsg.c_str ());
}
void
-rust_be_warning_at(const Location location,
- int opt, const std::string& warningmsg)
+rust_be_warning_at (const Location location, int opt,
+ const std::string &warningmsg)
{
- location_t gcc_loc = location.gcc_location();
- warning_at(gcc_loc, opt, "%s", warningmsg.c_str());
+ location_t gcc_loc = location.gcc_location ();
+ warning_at (gcc_loc, opt, "%s", warningmsg.c_str ());
}
void
-rust_be_fatal_error(const Location location,
- const std::string& fatalmsg)
+rust_be_fatal_error (const Location location, const std::string &fatalmsg)
{
- location_t gcc_loc = location.gcc_location();
- fatal_error(gcc_loc, "%s", fatalmsg.c_str());
+ location_t gcc_loc = location.gcc_location ();
+ fatal_error (gcc_loc, "%s", fatalmsg.c_str ());
}
void
-rust_be_inform(const Location location,
- const std::string& infomsg)
+rust_be_inform (const Location location, const std::string &infomsg)
{
- location_t gcc_loc = location.gcc_location();
- inform(gcc_loc, "%s", infomsg.c_str());
+ location_t gcc_loc = location.gcc_location ();
+ inform (gcc_loc, "%s", infomsg.c_str ());
}
void
-rust_be_get_quotechars(const char** open_qu, const char** close_qu)
+rust_be_get_quotechars (const char **open_qu, const char **close_qu)
{
*open_qu = open_quote;
*close_qu = close_quote;
diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc
index c4ccbab..e95b5de 100644
--- a/gcc/rust/rust-lang.cc
+++ b/gcc/rust/rust-lang.cc
@@ -53,7 +53,8 @@
/* General TODOs:
* - convert all copies of expensive-to-copy (deep copy) AST objects into
- * moves, if possible. Don't remove clone functionality - it may be required for e.g. HIR conversion.
+ * moves, if possible. Don't remove clone functionality - it may be required for
+ * e.g. HIR conversion.
*/
#include "rust-system.h"
@@ -102,8 +103,10 @@ struct GTY (()) language_function
static Rust::Session session;
// has to be in same compilation unit as session, so here for now
-void rust_add_target_info(const char* key, const char* value) {
- session.options.target_data.insert_key_value_pair(key, value);
+void
+rust_add_target_info (const char *key, const char *value)
+{
+ session.options.target_data.insert_key_value_pair (key, value);
}
/* Language hooks. */
diff --git a/gcc/rust/rust-linemap.cc b/gcc/rust/rust-linemap.cc
index caa8383..606e806 100644
--- a/gcc/rust/rust-linemap.cc
+++ b/gcc/rust/rust-linemap.cc
@@ -90,8 +90,8 @@ Gcc_linemap::to_string (Location location)
// Strip the source file down to the base file, to reduce clutter.
std::stringstream ss;
- ss << lbasename (path) << ":" << SOURCE_LINE (lmo, location.gcc_location ())
- << ":" << SOURCE_COLUMN (lmo, location.gcc_location ());
+ ss << lbasename (path) << ":" << SOURCE_LINE (lmo, location.gcc_location ())
+ << ":" << SOURCE_COLUMN (lmo, location.gcc_location ());
return ss.str ();
}
diff --git a/gcc/rust/rust-object-export.c b/gcc/rust/rust-object-export.c
index e59d3fb..fb87d33 100644
--- a/gcc/rust/rust-object-export.c
+++ b/gcc/rust/rust-object-export.c
@@ -17,7 +17,8 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-// FIXME: doesn't this duplicate lots of code from rust-backend.c? Is one meant to be a replacement?
+// FIXME: doesn't this duplicate lots of code from rust-backend.c? Is one meant
+// to be a replacement?
#include "config.h"
#include "system.h"
@@ -30,7 +31,7 @@
#include "simple-object.h"
#include "stor-layout.h"
#include "intl.h"
-#include "output.h" /* for assemble_string */
+#include "output.h" /* for assemble_string */
#include "common/common-target.h"
// satisfy intellisense
@@ -105,14 +106,13 @@ rust_imported_unsafe (void)
void
rust_write_export_data (const char *bytes, unsigned int size)
{
- static section* sec;
+ static section *sec;
if (sec == NULL)
{
gcc_assert (targetm_common.have_named_sections);
sec = get_section (RUST_EXPORT_SECTION_NAME,
- TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG,
- NULL);
+ TARGET_AIX ? SECTION_EXCLUDE : SECTION_DEBUG, NULL);
}
switch_to_section (sec);
@@ -146,20 +146,19 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
*plen = 0;
sobj = simple_object_start_read (fd, offset, RUST_EXPORT_SEGMENT_NAME,
- &errmsg, perr);
+ &errmsg, perr);
if (sobj == NULL)
{
/* If we get an error here, just pretend that we didn't find any
- export data. This is the right thing to do if the error is
- that the file was not recognized as an object file. This
- will ignore file I/O errors, but it's not too big a deal
- because we will wind up giving some other error later. */
+ export data. This is the right thing to do if the error is
+ that the file was not recognized as an object file. This
+ will ignore file I/O errors, but it's not too big a deal
+ because we will wind up giving some other error later. */
return NULL;
}
found = simple_object_find_section (sobj, RUST_EXPORT_SECTION_NAME,
- &sec_offset, &sec_length,
- &errmsg, perr);
+ &sec_offset, &sec_length, &errmsg, perr);
simple_object_release_read (sobj);
if (!found)
return errmsg;
@@ -167,14 +166,14 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
if (lseek (fd, offset + sec_offset, SEEK_SET) < 0)
{
*perr = errno;
- return _("lseek failed while reading export data");
+ return _ ("lseek failed while reading export data");
}
buf = XNEWVEC (char, sec_length);
if (buf == NULL)
{
*perr = errno;
- return _("memory allocation failed while reading export data");
+ return _ ("memory allocation failed while reading export data");
}
c = read (fd, buf, sec_length);
@@ -182,13 +181,13 @@ rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
{
*perr = errno;
free (buf);
- return _("read failed while reading export data");
+ return _ ("read failed while reading export data");
}
if (c < sec_length)
{
free (buf);
- return _("short read while reading export data");
+ return _ ("short read while reading export data");
}
*pbuf = buf;
diff --git a/gcc/rust/rust-object-export.h b/gcc/rust/rust-object-export.h
index 345217f..d4f0f55 100644
--- a/gcc/rust/rust-object-export.h
+++ b/gcc/rust/rust-object-export.h
@@ -19,11 +19,12 @@
#ifndef RUST_OBJECT_EXPORT_H
#define RUST_OBJECT_EXPORT_H
-extern unsigned int rust_field_alignment (tree t);
+extern unsigned int
+rust_field_alignment (tree t);
extern const char *
rust_read_export_data (int fd, off_t offset, char **pbuf, size_t *plen,
- int *perr);
+ int *perr);
extern void
rust_write_export_data (const char *bytes, unsigned int size);
diff --git a/gcc/rust/rust-target.h b/gcc/rust/rust-target.h
index b6edbd3..c5114bc 100644
--- a/gcc/rust/rust-target.h
+++ b/gcc/rust/rust-target.h
@@ -1,5 +1,5 @@
-/* rust-target.h -- Data structure definitions for target-specific Rust behavior.
- Copyright (C) 2020 Free Software Foundation, Inc.
+/* rust-target.h -- Data structure definitions for target-specific Rust
+ behavior. Copyright (C) 2020 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify it
under the terms of the GNU General Public License as published by the
@@ -20,7 +20,7 @@
// TODO: find out what this stuff actually does
#define DEFHOOKPOD(NAME, DOC, TYPE, INIT) TYPE NAME;
-#define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (* NAME) PARAMS;
+#define DEFHOOK(NAME, DOC, TYPE, PARAMS, INIT) TYPE (*NAME) PARAMS;
#define DEFHOOK_UNDOC DEFHOOK
#define HOOKSTRUCT(FRAGMENT) FRAGMENT
@@ -28,13 +28,15 @@
/* Each target can provide their own. */
extern struct gcc_targetrustm targetrustm;
-/* Some kind of structure to store all rust hook macros (like the TARGET_RUST_CPU_INFO).
- * This is required to store the function pointers for the target hooks so that the frontend can call them
+/* Some kind of structure to store all rust hook macros (like the
+ * TARGET_RUST_CPU_INFO). This is required to store the function pointers for
+ * the target hooks so that the frontend can call them
* and it calls the correct target-specific function. */
/* Used by target to add predefined version idenditiers. */
-//extern void d_add_builtin_version (const char *);
+// extern void d_add_builtin_version (const char *);
/* Used by target to add target-related info. */
-extern void rust_add_target_info(const char* key, const char* value);
+extern void
+rust_add_target_info (const char *key, const char *value);
#endif \ No newline at end of file