Skip to content

Some more default implementations for the compiler driver callbacks. #27046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/librustc_driver/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,9 @@ pub trait CompilerCalls<'a> {
fn early_callback(&mut self,
&getopts::Matches,
&diagnostics::registry::Registry)
-> Compilation;
-> Compilation {
Compilation::Continue
}

// Hook for a callback late in the process of handling arguments. This will
// be called just before actual compilation starts (and before build_controller
Expand All @@ -215,7 +217,9 @@ pub trait CompilerCalls<'a> {
&Input,
&Option<PathBuf>,
&Option<PathBuf>)
-> Compilation;
-> Compilation {
Compilation::Continue
}

// Called after we extract the input from the arguments. Gives the implementer
// an opportunity to change the inputs or to add some custom input handling.
Expand All @@ -236,7 +240,9 @@ pub trait CompilerCalls<'a> {
&Option<PathBuf>,
&Option<PathBuf>,
&diagnostics::registry::Registry)
-> Option<(Input, Option<PathBuf>)>;
-> Option<(Input, Option<PathBuf>)> {
None
}

// Parse pretty printing information from the arguments. The implementer can
// choose to ignore this (the default will return None) which will skip pretty
Expand Down