Skip to content

Commit

Permalink
Merge #49
Browse files Browse the repository at this point in the history
49: Improve textual notation of Call targets. r=ptersilie a=vext01

The textual notation for a Call target is kind of weird.

If there's a known symbol, it looks like this:
```
call operand=sym_name=_ZN50_$LT$T$u20$as$u20$core..convert..Into$LT$U$GT$$GT$4into17hcac79ab93d213ca6E, ret_bb=bb23
```

I think `operand=sym_name=` looks weird.

This change kills `sym_name=` and in case of an unknown target uses `<unknown>` (instead of `unknown`).



Co-authored-by: Edd Barrett <[email protected]>
  • Loading branch information
bors[bot] and vext01 authored Mar 13, 2020
2 parents 141aa78 + 23232b5 commit 6e57191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ykpack/src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ pub enum CallOperand {
impl Display for CallOperand {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
CallOperand::Fn(sym_name) => write!(f, "sym_name={}", sym_name),
CallOperand::Unknown => write!(f, "unknown"),
CallOperand::Fn(sym_name) => write!(f, "{}", sym_name),
CallOperand::Unknown => write!(f, "<unknown>"),
}
}
}
Expand Down

0 comments on commit 6e57191

Please sign in to comment.