diff options
| author | Yuki Okushi <huyuumi.dev@gmail.com> | 2019-11-13 22:09:28 +0900 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-11-13 22:09:28 +0900 |
| commit | f735cd2f897c5497c5d538c927ea892f74c02c62 (patch) | |
| tree | e44e15e05a80319997a1deadd93679c1dbe61189 /src/librustc_codegen_ssa | |
| parent | 5683fe5a48cb741a318a88990dd47744194a596f (diff) | |
| parent | 2c6d6094840cd88422f50b2c7972199a00578319 (diff) | |
| download | rust-f735cd2f897c5497c5d538c927ea892f74c02c62.tar.gz rust-f735cd2f897c5497c5d538c927ea892f74c02c62.zip | |
Rollup merge of #66334 - Mark-Simulacrum:sess-cstore, r=petrochenkov
Move Session fields to CrateStore `allocator_kind` and `injected_panic_runtime` are both query-like, this moves them out of Session and into CrateStore, avoiding the `Once` they previously had by clearing separating initialization and de-initialization.
Diffstat (limited to 'src/librustc_codegen_ssa')
| -rw-r--r-- | src/librustc_codegen_ssa/back/symbol_export.rs | 2 | ||||
| -rw-r--r-- | src/librustc_codegen_ssa/base.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_ssa/back/symbol_export.rs b/src/librustc_codegen_ssa/back/symbol_export.rs index 35b62603b07..f8b3e0ffe5c 100644 --- a/src/librustc_codegen_ssa/back/symbol_export.rs +++ b/src/librustc_codegen_ssa/back/symbol_export.rs @@ -194,7 +194,7 @@ fn exported_symbols_provider_local( symbols.push((exported_symbol, SymbolExportLevel::C)); } - if tcx.sess.allocator_kind.get().is_some() { + if tcx.allocator_kind().is_some() { for method in ALLOCATOR_METHODS { let symbol_name = format!("__rust_{}", method.name); let exported_symbol = ExportedSymbol::NoDefId(SymbolName::new(&symbol_name)); diff --git a/src/librustc_codegen_ssa/base.rs b/src/librustc_codegen_ssa/base.rs index c3f2a5161ae..faa7b588e56 100644 --- a/src/librustc_codegen_ssa/base.rs +++ b/src/librustc_codegen_ssa/base.rs @@ -549,7 +549,7 @@ pub fn codegen_crate<B: ExtraBackendMethods>( }); let allocator_module = if any_dynamic_crate { None - } else if let Some(kind) = *tcx.sess.allocator_kind.get() { + } else if let Some(kind) = tcx.allocator_kind() { let llmod_id = cgu_name_builder.build_cgu_name(LOCAL_CRATE, &["crate"], Some("allocator")).to_string(); |
