1
Fork 0

Add a way to decouple the implementation and the declaration of a TyCtxt method.

This commit is contained in:
Oli Scherer 2023-09-22 09:14:39 +00:00
parent 8759de0a49
commit 2157f31731
13 changed files with 96 additions and 28 deletions

View file

@ -39,6 +39,7 @@ use rustc_errors::{DiagnosticMessage, ErrorGuaranteed, FatalError, Handler, Subd
use rustc_fluent_macro::fluent_messages;
use rustc_metadata::EncodedMetadata;
use rustc_middle::dep_graph::{WorkProduct, WorkProductId};
use rustc_middle::hooks;
use rustc_middle::query::Providers;
use rustc_middle::ty::TyCtxt;
use rustc_session::config::{OptLevel, OutputFilenames, PrintKind, PrintRequest};
@ -268,7 +269,7 @@ impl CodegenBackend for LlvmCodegenBackend {
llvm_util::init(sess); // Make sure llvm is inited
}
fn provide(&self, providers: &mut Providers) {
fn provide(&self, providers: &mut Providers, _hooks: &mut hooks::Providers) {
providers.global_backend_features =
|tcx, ()| llvm_util::global_llvm_features(tcx.sess, true)
}