aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/rust-session-manager.h
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2021-02-05 11:43:44 +0000
committerPhilip Herron <herron.philip@googlemail.com>2021-02-06 15:29:01 +0000
commit75b6fc46bd64599e565582b46bf6f2197b2bc53f (patch)
tree1eecacbddf9c31f91c000cb76939c483234974e6 /gcc/rust/rust-session-manager.h
parent599b04aa7d928a305029d8e8cf5d6f5c5a683da8 (diff)
downloadgcc-75b6fc46bd64599e565582b46bf6f2197b2bc53f.zip
gcc-75b6fc46bd64599e565582b46bf6f2197b2bc53f.tar.gz
gcc-75b6fc46bd64599e565582b46bf6f2197b2bc53f.tar.bz2
Move scan for unused names to be after type resolution
Methods are resolved as part of type resolution so scanning ribs early on will results in false warnings about unused methods.
Diffstat (limited to 'gcc/rust/rust-session-manager.h')
-rw-r--r--gcc/rust/rust-session-manager.h17
1 files changed, 4 insertions, 13 deletions
diff --git a/gcc/rust/rust-session-manager.h b/gcc/rust/rust-session-manager.h
index 4836cc8..07d5461 100644
--- a/gcc/rust/rust-session-manager.h
+++ b/gcc/rust/rust-session-manager.h
@@ -177,7 +177,8 @@ struct CompileOptions
RESOLUTION_DUMP,
TARGET_OPTION_DUMP,
HIR_DUMP,
- // TODO: add more?
+ TYPE_RESOLUTION_DUMP,
+
} dump_option;
/* configuration options - actually useful for conditional compilation and
@@ -204,8 +205,6 @@ struct Session
// backend linemap
Linemap *linemap;
- // TODO: replace raw pointers with smart pointers?
-
public:
/* Initialise compiler session. Corresponds to langhook grs_langhook_init().
* Note that this is called after option handling. */
@@ -217,7 +216,6 @@ public:
void init_options ();
private:
- // TODO: should this be private or public?
void parse_file (const char *filename);
bool enable_dump (std::string arg);
@@ -232,23 +230,16 @@ private:
* (top-level inner attribute creation from command line arguments), setting
* options maybe, registering lints maybe, loading plugins maybe. */
void register_plugins (AST::Crate &crate);
+
/* Injection pipeline stage. TODO maybe move to another object? Maybe have
* some lint checks (in future, obviously), register builtin macros, crate
* injection. */
void injection (AST::Crate &crate);
+
/* Expansion pipeline stage. TODO maybe move to another object? Expands all
* macros, maybe build test harness in future, AST validation, maybe create
* macro crate (if not rustdoc).*/
void expansion (AST::Crate &crate);
- /* Resolution pipeline stage. TODO maybe move to another object.
- * Performs name resolution and type resolution, maybe complete gated
- * feature checking, maybe create buffered lints in future. */
- void resolution (AST::Crate &crate);
- /* This lowers the AST down to HIR and assigns all mappings from AST
- * NodeIds back to HirIds */
- HIR::Crate lower_ast (AST::Crate &crate);
- /* This adds the type resolution process */
- void type_resolution (HIR::Crate &crate);
};
} // namespace Rust