Skip to content

Commit f452197

Browse files
authored
MachineInfo in JSON (#80)
Added [MachineInfo](https://github.com/rust-lang/rust/blob/a2545fd6fc66b4323f555223a860c451885d1d2b/compiler/stable_mir/src/target.rs#L7-L12) to the JSON. This should give us the ability to use `usize` properly
1 parent c9b3d33 commit f452197

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/printer.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,6 +1076,7 @@ pub struct SmirJson<'t> {
10761076
pub types: Vec<(stable_mir::ty::Ty, TypeMetadata)>,
10771077
pub spans: Vec<(usize, SourceData)>,
10781078
pub debug: Option<SmirJsonDebugInfo<'t>>,
1079+
pub machine: stable_mir::target::MachineInfo,
10791080
}
10801081

10811082
#[derive(Serialize)]
@@ -1160,6 +1161,7 @@ pub fn collect_smir(tcx: TyCtxt<'_>) -> SmirJson {
11601161
types,
11611162
spans,
11621163
debug,
1164+
machine: stable_mir::target::MachineInfo::target(),
11631165
}
11641166
}
11651167

0 commit comments

Comments
 (0)