diff options
| author | Victor Ding <victording@google.com> | 2020-01-29 00:16:14 +1100 |
|---|---|---|
| committer | Victor Ding <victording@google.com> | 2020-02-04 11:09:50 +1100 |
| commit | ae51d2ba32a3dfa3811ee19164ef789eb734a38b (patch) | |
| tree | 19e6830d0c94ba9cb86abb4edf871bb145098db4 /src/librustc_codegen_utils/codegen_backend.rs | |
| parent | b181835a6bacfa449f55d46764a10e25d1c471dc (diff) | |
| download | rust-ae51d2ba32a3dfa3811ee19164ef789eb734a38b.tar.gz rust-ae51d2ba32a3dfa3811ee19164ef789eb734a38b.zip | |
Split `join_codegen_and_link()` into two steps
`join_codegen_and_link()` is split to `join_codegen()` and `link()`.
Diffstat (limited to 'src/librustc_codegen_utils/codegen_backend.rs')
| -rw-r--r-- | src/librustc_codegen_utils/codegen_backend.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/librustc_codegen_utils/codegen_backend.rs b/src/librustc_codegen_utils/codegen_backend.rs index fecb3986e7e..96166e04c2e 100644 --- a/src/librustc_codegen_utils/codegen_backend.rs +++ b/src/librustc_codegen_utils/codegen_backend.rs @@ -43,11 +43,22 @@ pub trait CodegenBackend { /// # Panics /// /// Panics when the passed `Box<dyn Any>` was not returned by `codegen_backend`. - fn join_codegen_and_link( + fn join_codegen( &self, ongoing_codegen: Box<dyn Any>, sess: &Session, dep_graph: &DepGraph, + ) -> Result<Box<dyn Any>, ErrorReported>; + + /// This is called on the returned `Box<dyn Any>` from `join_codegen` + /// + /// # Panics + /// + /// Panics when the passed `Box<dyn Any>` was not returned by `join_codegen`. + fn link( + &self, + sess: &Session, + codegen_results: Box<dyn Any>, outputs: &OutputFilenames, ) -> Result<(), ErrorReported>; } |
