Reviewed By: jvillard Differential Revision: D3584798 fbshipit-source-id: cd24e77master
parent
9f7cb87bb0
commit
e95ebca786
@ -0,0 +1,20 @@
|
||||
(*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
let make_base base_str =
|
||||
Var.of_pvar (Pvar.mk (Mangled.from_string base_str) Procname.empty_block), Typ.Tvoid
|
||||
|
||||
let make_field_access access_str =
|
||||
AccessPath.FieldAccess (Ident.create_fieldname (Mangled.from_string access_str) 0, Typ.Tvoid)
|
||||
|
||||
let make_array_access () =
|
||||
AccessPath.ArrayAccess Typ.Tvoid
|
||||
|
||||
let make_access_path base_str access_strs =
|
||||
make_base base_str, IList.map make_field_access access_strs
|
@ -0,0 +1,16 @@
|
||||
(*
|
||||
* Copyright (c) 2016 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*)
|
||||
|
||||
val make_base : string -> AccessPath.base
|
||||
|
||||
val make_field_access : string -> AccessPath.access
|
||||
|
||||
val make_array_access : unit -> AccessPath.access
|
||||
|
||||
val make_access_path : string -> string list -> AccessPath.raw
|
Loading…
Reference in new issue