diff options
| author | CohenArthur <arthur.cohen@epita.fr> | 2020-08-22 15:18:10 +0200 |
|---|---|---|
| committer | CohenArthur <arthur.cohen@epita.fr> | 2020-08-22 15:18:10 +0200 |
| commit | 5a59c24eeee2097ff64b0578704a5eb7a4dd07f8 (patch) | |
| tree | 8cf2bf2400b917715c001d2ca15c64717ed9aaf9 | |
| parent | e64f523b2750ef8275ad9d1625afab6d9707898a (diff) | |
| download | rust-5a59c24eeee2097ff64b0578704a5eb7a4dd07f8.tar.gz rust-5a59c24eeee2097ff64b0578704a5eb7a4dd07f8.zip | |
FunctionCx: Store reference to CodegenCx instead
| -rw-r--r-- | src/common.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/common.rs b/src/common.rs index 42131581088..a575f03e350 100644 --- a/src/common.rs +++ b/src/common.rs @@ -265,9 +265,7 @@ pub(crate) fn type_sign(ty: Ty<'_>) -> bool { } pub(crate) struct FunctionCx<'clif, 'tcx, B: Backend + 'static> { - // FIXME use a reference to `CodegenCx` instead of `tcx`, `module` and `constants` and `caches` - pub(crate) tcx: TyCtxt<'tcx>, - pub(crate) module: &'clif mut Module<B>, + pub(crate) codegen_cx: &'clif CodegenCx<'tcx, B>, pub(crate) global_asm: &'clif mut String, pub(crate) pointer_type: Type, // Cached from module @@ -285,7 +283,6 @@ pub(crate) struct FunctionCx<'clif, 'tcx, B: Backend + 'static> { pub(crate) cold_blocks: EntitySet<Block>, pub(crate) clif_comments: crate::pretty_clif::CommentWriter, - pub(crate) constants_cx: &'clif mut crate::constant::ConstantCx, pub(crate) vtables: &'clif mut FxHashMap<(Ty<'tcx>, Option<ty::PolyExistentialTraitRef<'tcx>>), DataId>, pub(crate) source_info_set: indexmap::IndexSet<SourceInfo>, |
