aboutsummaryrefslogtreecommitdiffstats
path: root/cparser/Cutil.mli
diff options
context:
space:
mode:
authorXavier Leroy <xavierleroy@users.noreply.github.com>2017-02-01 12:59:55 +0100
committerGitHub <noreply@github.com>2017-02-01 12:59:55 +0100
commit31f86965bf172fb32f9cca99a292ebdf6cea57b9 (patch)
treeef78d97a02e2dad0e39ccd345288adf3545bb05e /cparser/Cutil.mli
parent71fa5147139f85cb0d14ded74b04b39dd52f776b (diff)
parented55884ea9749f93ffd67f0734da0907fe338102 (diff)
downloadcompcert-31f86965bf172fb32f9cca99a292ebdf6cea57b9.tar.gz
compcert-31f86965bf172fb32f9cca99a292ebdf6cea57b9.zip
Merge pull request #159 from AbsInt/builtin_offsetof
Implement offsetof via builtin
Diffstat (limited to 'cparser/Cutil.mli')
-rw-r--r--cparser/Cutil.mli6
1 files changed, 6 insertions, 0 deletions
diff --git a/cparser/Cutil.mli b/cparser/Cutil.mli
index edff9ee1..ee3c7625 100644
--- a/cparser/Cutil.mli
+++ b/cparser/Cutil.mli
@@ -111,6 +111,12 @@ val composite_info_def:
Env.t -> struct_or_union -> attributes -> field list -> Env.composite_info
val struct_layout:
Env.t -> field list -> (string * int) list
+val offsetof:
+ Env.t -> typ -> field -> int
+(* Compute the offset of a struct member *)
+val cautious_mul: int64 -> int -> int option
+(* Overflow-avoiding multiplication of an int64 and an int, with
+ result in type int. *)
(* Type classification functions *)