Skip to content

Commit

Permalink
Remove unused method CrateContext::rotate().
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwoerister committed Nov 14, 2016
1 parent 790a2f9 commit 276f052
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions src/librustc_trans/context.rs
Expand Up @@ -701,22 +701,6 @@ impl<'b, 'tcx> CrateContext<'b, 'tcx> {
&self.local_ccxs[self.index]
}

/// Get a (possibly) different `CrateContext` from the same
/// `SharedCrateContext`.
pub fn rotate(&'b self) -> CrateContext<'b, 'tcx> {
let (_, index) =
self.local_ccxs
.iter()
.zip(0..self.local_ccxs.len())
.min_by_key(|&(local_ccx, _idx)| local_ccx.n_llvm_insns.get())
.unwrap();
CrateContext {
shared: self.shared,
index: index,
local_ccxs: &self.local_ccxs[..],
}
}

/// Either iterate over only `self`, or iterate over all `CrateContext`s in
/// the `SharedCrateContext`. The iterator produces `(ccx, is_origin)`
/// pairs, where `is_origin` is `true` if `ccx` is `self` and `false`
Expand Down

0 comments on commit 276f052

Please sign in to comment.