Skip to content
Snippets Groups Projects
Commit e15c5db1 authored by Russel Arbore's avatar Russel Arbore
Browse files

Make manifest accessible from PM

parent e0634614
No related branches found
No related tags found
No related merge requests found
......@@ -677,6 +677,7 @@ dependencies = [
"anyhow",
"hercules_cg",
"hercules_ir",
"hercules_opt",
"postcard",
"serde",
]
......
......@@ -64,8 +64,11 @@ pub struct PassManager {
pub antideps: Option<Vec<Vec<(NodeID, NodeID)>>>,
pub bbs: Option<Vec<Vec<NodeID>>>,
// Current plan. Keep track of the last time the plan was updated.
// Current plan.
pub plans: Option<Vec<Plan>>,
// Store the manifest of a compiled object.
pub manifests: Option<HashMap<String, Manifest>>,
}
impl PassManager {
......@@ -85,6 +88,7 @@ impl PassManager {
antideps: None,
bbs: None,
plans: None,
manifests: None,
}
}
......@@ -565,6 +569,7 @@ impl PassManager {
.expect("PANIC: Unable to open output manifest file.");
file.write_all(&hman_contents)
.expect("PANIC: Unable to write output manifest file contents.");
self.manifests = Some(smodule.manifests);
// Codegen doesn't require clearing analysis results.
continue;
......@@ -605,4 +610,8 @@ impl PassManager {
pub fn get_module(self) -> Module {
self.module
}
pub fn get_manifests(self) -> HashMap<String, Manifest> {
self.manifests.unwrap()
}
}
......@@ -12,4 +12,5 @@ postcard = { version = "*", features = ["alloc"] }
serde = { version = "*", features = ["derive"] }
hercules_cg = { path = "../hercules_cg" }
hercules_ir = { path = "../hercules_ir" }
hercules_opt = { path = "../hercules_opt" }
anyhow = "*"
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment