Skip to content

Commit cd7218a

Browse files
committed
Update Cranelift to 0.102
1 parent 97ca520 commit cd7218a

File tree

3 files changed

+46
-42
lines changed

3 files changed

+46
-42
lines changed

Cargo.lock

+30-30
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ crate-type = ["dylib"]
88

99
[dependencies]
1010
# These have to be in sync with each other
11-
cranelift-codegen = { version = "0.101.2", default-features = false, features = ["std", "unwind", "all-arch"] }
12-
cranelift-frontend = { version = "0.101.2" }
13-
cranelift-module = { version = "0.101.2" }
14-
cranelift-native = { version = "0.101.2" }
15-
cranelift-jit = { version = "0.101.2", optional = true }
16-
cranelift-object = { version = "0.101.2" }
11+
cranelift-codegen = { version = "0.102", default-features = false, features = ["std", "unwind", "all-arch"] }
12+
cranelift-frontend = { version = "0.102" }
13+
cranelift-module = { version = "0.102" }
14+
cranelift-native = { version = "0.102" }
15+
cranelift-jit = { version = "0.102", optional = true }
16+
cranelift-object = { version = "0.102" }
1717
target-lexicon = "0.12.0"
1818
gimli = { version = "0.28", default-features = false, features = ["write"]}
1919
object = { version = "0.32", default-features = false, features = ["std", "read_core", "write", "archive", "coff", "elf", "macho", "pe"] }

src/pretty_clif.rs

+10-6
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,10 @@
5858
use std::fmt;
5959
use std::io::Write;
6060

61-
use cranelift_codegen::{
62-
entity::SecondaryMap,
63-
ir::entities::AnyEntity,
64-
write::{FuncWriter, PlainWriter},
65-
};
61+
use cranelift_codegen::entity::SecondaryMap;
62+
use cranelift_codegen::ir::entities::AnyEntity;
63+
use cranelift_codegen::ir::Fact;
64+
use cranelift_codegen::write::{FuncWriter, PlainWriter};
6665
use rustc_middle::ty::layout::FnAbiOf;
6766
use rustc_middle::ty::print::with_no_trimmed_paths;
6867
use rustc_session::config::{OutputFilenames, OutputType};
@@ -155,8 +154,13 @@ impl FuncWriter for &'_ CommentWriter {
155154
_func: &Function,
156155
entity: AnyEntity,
157156
value: &dyn fmt::Display,
157+
maybe_fact: Option<&Fact>,
158158
) -> fmt::Result {
159-
write!(w, " {} = {}", entity, value)?;
159+
if let Some(fact) = maybe_fact {
160+
write!(w, " {} ! {} = {}", entity, fact, value)?;
161+
} else {
162+
write!(w, " {} = {}", entity, value)?;
163+
}
160164

161165
if let Some(comment) = self.entity_comments.get(&entity) {
162166
writeln!(w, " ; {}", comment.replace('\n', "\n; "))

0 commit comments

Comments
 (0)