aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-lang.cc
diff options
context:
space:
mode:
authorArthur Cohen <arthur.cohen@embecosm.com>2022-07-28 16:53:50 +0200
committerArthur Cohen <arthur.cohen@embecosm.com>2022-07-28 17:29:28 +0200
commit0ec8f938272b6dce9e133f98a199fd5123aa553f (patch)
tree3fe6f1997b4975e3e374298b070ac47ea7481c6c /gcc/rust/rust-lang.cc
parent237be3f618dfae396944c601c295eb182d32e54e (diff)
downloadgcc-0ec8f938272b6dce9e133f98a199fd5123aa553f.zip
gcc-0ec8f938272b6dce9e133f98a199fd5123aa553f.tar.gz
gcc-0ec8f938272b6dce9e133f98a199fd5123aa553f.tar.bz2
session-manager: Produce a fatal error if multiple files are specified
Diffstat (limited to 'gcc/rust/rust-lang.cc')
-rw-r--r--gcc/rust/rust-lang.cc36
1 files changed, 2 insertions, 34 deletions
diff --git a/gcc/rust/rust-lang.cc b/gcc/rust/rust-lang.cc
index dd8c608..95c92f8 100644
--- a/gcc/rust/rust-lang.cc
+++ b/gcc/rust/rust-lang.cc
@@ -69,13 +69,11 @@
// Language-dependent contents of a type. GTY() mark used for garbage collector.
struct GTY (()) lang_type
{
- char dummy;
};
// Language-dependent contents of a decl.
struct GTY (()) lang_decl
{
- char dummy;
};
// Language-dependent contents of an identifier. This must include a
@@ -100,7 +98,6 @@ union GTY ((
// We don't use language_function.
struct GTY (()) language_function
{
- int dummy;
};
// has to be in same compilation unit as session, so here for now
@@ -172,7 +169,7 @@ grs_langhook_parse_file (void)
{
rust_debug ("Preparing to parse files. ");
- Rust::Session::get_instance ().parse_files (num_in_fnames, in_fnames);
+ Rust::Session::get_instance ().handle_input_files (num_in_fnames, in_fnames);
}
/* Seems to get the exact type for a specific type - e.g. for scalar float with
@@ -280,32 +277,10 @@ grs_langhook_handle_option (
{
// Convert integer code to lang.opt enum codes with names.
enum opt_code code = (enum opt_code) scode;
- // used to store whether results of various stuff are successful
- // bool ret = true;
- // delegate to session manager
+ // Delegate to session manager
return Rust::Session::get_instance ().handle_option (code, arg, value, kind,
loc, handlers);
-
- // Handles options as listed in lang.opt.
- /*switch (code) {
- case OPT_I:
- // TODO: add search path
- break;
- case OPT_L:
- // TODO: add library link path or something
- break;
- case OPT_frust_dump:
- // enable dump and return whether this was successful
- ret = rust_enable_dump(arg) ? true : false;
- break;
- // no option handling for -o
- default:
- // return 1 to indicate option is valid
- break;
- }
-
- return ret;*/
}
/* Run after parsing options. */
@@ -447,17 +422,10 @@ rust_localize_identifier (const char *ident)
namespace selftest {
-static void
-simple_assert ()
-{
- ASSERT_TRUE (true);
-}
-
void
run_rust_tests ()
{
// Call tests for the rust frontend here
- simple_assert ();
rust_cfg_parser_test ();
rust_privacy_ctx_test ();
rust_crate_name_validation_test ();