aboutsummaryrefslogtreecommitdiffstats
path: root/debug/CtoDwarf.ml
diff options
context:
space:
mode:
authorBernhard Schommer <bernhardschommer@gmail.com>2015-09-11 14:42:40 +0200
committerBernhard Schommer <bernhardschommer@gmail.com>2015-09-11 14:42:40 +0200
commit2b5940c2256384f837bcdfc2ddb4783f1b377dbf (patch)
tree41cef2bc5454d95ddd3c0539cda872b9071897a9 /debug/CtoDwarf.ml
parented50169fa51b8a9cfdbf65380348f6a02909d9d7 (diff)
downloadcompcert-kvx-2b5940c2256384f837bcdfc2ddb4783f1b377dbf.tar.gz
compcert-kvx-2b5940c2256384f837bcdfc2ddb4783f1b377dbf.zip
Started implementing the typ insert methods.
In contrast to CtoDwarf this time we use the name to identify everything. To make this work we print the full identifier with stamp to avoid the problems with anonymous structs and unions.
Diffstat (limited to 'debug/CtoDwarf.ml')
-rw-r--r--debug/CtoDwarf.ml45
1 files changed, 0 insertions, 45 deletions
diff --git a/debug/CtoDwarf.ml b/debug/CtoDwarf.ml
index f1e2aea6..dce8d81e 100644
--- a/debug/CtoDwarf.ml
+++ b/debug/CtoDwarf.ml
@@ -65,51 +65,6 @@ let rec mmap f env = function
(hd' :: tl', env2)
-(* Helper functions for the attributes *)
-
-let strip_attributes typ =
- let strip = List.filter (fun a -> a = AConst || a = AVolatile) in
- match typ with
- | TVoid at -> TVoid (strip at)
- | TInt (k,at) -> TInt (k,strip at)
- | TFloat (k,at) -> TFloat(k,strip at)
- | TPtr (t,at) -> TPtr(t,strip at)
- | TArray (t,s,at) -> TArray(t,s,strip at)
- | TFun (t,arg,v,at) -> TFun(t,arg,v,strip at)
- | TNamed (n,at) -> TNamed(n,strip at)
- | TStruct (n,at) -> TStruct(n,strip at)
- | TUnion (n,at) -> TUnion(n,strip at)
- | TEnum (n,at) -> TEnum(n,strip at)
-
-
-let strip_last_attribute typ =
- let rec hd_opt l = match l with
- [] -> None,[]
- | AConst::rest -> Some AConst,rest
- | AVolatile::rest -> Some AVolatile,rest
- | _::rest -> hd_opt rest in
- match typ with
- | TVoid at -> let l,r = hd_opt at in
- l,TVoid r
- | TInt (k,at) -> let l,r = hd_opt at in
- l,TInt (k,r)
- | TFloat (k,at) -> let l,r = hd_opt at in
- l,TFloat (k,r)
- | TPtr (t,at) -> let l,r = hd_opt at in
- l,TPtr(t,r)
- | TArray (t,s,at) -> let l,r = hd_opt at in
- l,TArray(t,s,r)
- | TFun (t,arg,v,at) -> let l,r = hd_opt at in
- l,TFun(t,arg,v,r)
- | TNamed (n,at) -> let l,r = hd_opt at in
- l,TNamed(n,r)
- | TStruct (n,at) -> let l,r = hd_opt at in
- l,TStruct(n,r)
- | TUnion (n,at) -> let l,r = hd_opt at in
- l,TUnion(n,r)
- | TEnum (n,at) -> let l,r = hd_opt at in
- l,TEnum(n,r)
-
(* Dwarf tag for the void type*)
let rec void_dwarf_tag =
let void = {