From 0e51d48324e7146fbb47066454b1a902f8a00551 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20K=C3=A5re=20Alsaker?= Date: Sun, 1 Apr 2018 08:25:21 +0200 Subject: [PATCH] Make sure Session.plugin_llvm_passes is only used on one thread --- src/librustc/session/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/librustc/session/mod.rs b/src/librustc/session/mod.rs index 1c11c52357d1..f3375e290e88 100644 --- a/src/librustc/session/mod.rs +++ b/src/librustc/session/mod.rs @@ -90,7 +90,7 @@ pub struct Session { /// (sub)diagnostics that have been set once, but should not be set again, /// in order to avoid redundantly verbose output (Issue #24690, #44953). pub one_time_diagnostics: RefCell, String)>>, - pub plugin_llvm_passes: RefCell>, + pub plugin_llvm_passes: OneThread>>, pub plugin_attributes: RefCell>, pub crate_types: RefCell>, pub dependency_formats: RefCell, @@ -1094,7 +1094,7 @@ pub fn build_session_( lint_store: OneThread::new(RefCell::new(lint::LintStore::new())), buffered_lints: OneThread::new(RefCell::new(Some(lint::LintBuffer::new()))), one_time_diagnostics: RefCell::new(FxHashSet()), - plugin_llvm_passes: RefCell::new(Vec::new()), + plugin_llvm_passes: OneThread::new(RefCell::new(Vec::new())), plugin_attributes: RefCell::new(Vec::new()), crate_types: RefCell::new(Vec::new()), dependency_formats: RefCell::new(FxHashMap()),