Skip to content

Commit

Permalink
Consider is_modular for Addr.of_mval, of_var.
Browse files Browse the repository at this point in the history
Pass this flag an the variable to varinfo_or_canonical that may choose to select a canoncial representation for the variable.
  • Loading branch information
jerhard committed Nov 28, 2023
1 parent a6eab9c commit c40ec43
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cdomains/addressDomain.ml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ module AddressPrintable (Mval: Mval.Printable) =
struct
include AddressBase (Mval)

let of_var ~is_modular x = Addr (x, `NoOffset)
let of_mval ~is_modular (x, o) = Addr (x, o)
let of_mval ~is_modular (x, o) =
let x = ModularUtil0.varinfo_or_canonical ~is_modular x in
Addr (x, o)

let of_var ~is_modular x =
of_mval ~is_modular (x, `NoOffset)

let to_var = function
| Addr (x,_) -> Some x
Expand Down

0 comments on commit c40ec43

Please sign in to comment.