only keep track of struct definitions once
commitef311970af44c7ce2bc0c87dc303c4cbc4e358a7
authorSven Verdoolaege <skimo@kotnet.org>
Mon, 4 Apr 2016 10:04:16 +0000 (4 12:04 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Mon, 4 Apr 2016 10:29:37 +0000 (4 12:29 +0200)
tree94b57b01d0081ea63fe26396727fc670c9a9727b
parent0ef3a6de81a4b9b70a8d42830acc41c0d833d571
only keep track of struct definitions once

If the underlying type of a typedef is a struct then the definition
of the struct is included in the definition of the typedef in add_type.
Handle typedef types before struct types and mark such underlying
struct types as having been handled when handling the corresponding
typedef type so that struct type is not added to the list of types
separately.

This change should not have any effect now, but in the next commit,
both such a typedef and the corresponding struct type may get added
to the list of types that need to be considered and then pet should
only include the typedef in the list of types.

Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
scan.cc