diff options
| author | Camille GILLOT <gillot.camille@gmail.com> | 2020-03-14 12:41:32 +0100 |
|---|---|---|
| committer | Camille GILLOT <gillot.camille@gmail.com> | 2020-04-05 15:21:08 +0200 |
| commit | 5e1ad0d1e448a4ead87c52dd622e12a35c66a7f2 (patch) | |
| tree | 61c95e612da97fd6296d26de5475e779faa00770 /src/librustc_codegen_llvm | |
| parent | 3c0edc895ff4d3d82e93c9dc61bb4a8a24da5fad (diff) | |
| download | rust-5e1ad0d1e448a4ead87c52dd622e12a35c66a7f2.tar.gz rust-5e1ad0d1e448a4ead87c52dd622e12a35c66a7f2.zip | |
Remove Arcs in queries.
Diffstat (limited to 'src/librustc_codegen_llvm')
| -rw-r--r-- | src/librustc_codegen_llvm/context.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/librustc_codegen_llvm/context.rs b/src/librustc_codegen_llvm/context.rs index 99a825823c3..daa723495f6 100644 --- a/src/librustc_codegen_llvm/context.rs +++ b/src/librustc_codegen_llvm/context.rs @@ -26,7 +26,6 @@ use rustc_target::spec::{HasTargetSpec, Target}; use std::cell::{Cell, RefCell}; use std::ffi::CStr; use std::str; -use std::sync::Arc; /// There is one `CodegenCx` per compilation unit. Each one has its own LLVM /// `llvm::Context` so that several compilation units may be optimized in parallel. @@ -39,7 +38,7 @@ pub struct CodegenCx<'ll, 'tcx> { pub llmod: &'ll llvm::Module, pub llcx: &'ll llvm::Context, - pub codegen_unit: Arc<CodegenUnit<'tcx>>, + pub codegen_unit: &'tcx CodegenUnit<'tcx>, /// Cache instances of monomorphic and polymorphic items pub instances: RefCell<FxHashMap<Instance<'tcx>, &'ll Value>>, @@ -232,7 +231,7 @@ pub unsafe fn create_module( impl<'ll, 'tcx> CodegenCx<'ll, 'tcx> { crate fn new( tcx: TyCtxt<'tcx>, - codegen_unit: Arc<CodegenUnit<'tcx>>, + codegen_unit: &'tcx CodegenUnit<'tcx>, llvm_module: &'ll crate::ModuleLlvm, ) -> Self { // An interesting part of Windows which MSVC forces our hand on (and @@ -402,8 +401,8 @@ impl MiscMethods<'tcx> for CodegenCx<'ll, 'tcx> { self.check_overflow } - fn codegen_unit(&self) -> &Arc<CodegenUnit<'tcx>> { - &self.codegen_unit + fn codegen_unit(&self) -> &'tcx CodegenUnit<'tcx> { + self.codegen_unit } fn used_statics(&self) -> &RefCell<Vec<&'ll Value>> { |
