summaryrefslogtreecommitdiff
path: root/libbindgen
diff options
context:
space:
mode:
authorEmilio Cobos Álvarez <emilio@crisal.io>2017-01-07 01:13:25 +0100
committerEmilio Cobos Álvarez <emilio@crisal.io>2017-01-11 12:56:55 +0100
commitb2987eef09e10a8f941ae41906096be62f0107be (patch)
tree55ce7b4050ac9ad6de1bb650fa65d9cd5b41e3d4 /libbindgen
parent73187fa616dd2a8a42fb1c683ebe82df1a4289c3 (diff)
ir: Trace through some types while collecting automatically.
This makes sense because there's no special meaning for some of them to be opaque.
Diffstat (limited to 'libbindgen')
-rw-r--r--libbindgen/src/ir/item.rs11
1 files changed, 7 insertions, 4 deletions
diff --git a/libbindgen/src/ir/item.rs b/libbindgen/src/ir/item.rs
index f4598654..e9960166 100644
--- a/libbindgen/src/ir/item.rs
+++ b/libbindgen/src/ir/item.rs
@@ -190,14 +190,17 @@ impl TypeCollector for Item {
match *self.kind() {
ItemKind::Type(ref ty) => {
- if !self.is_opaque(ctx) {
+ // There are some types, like resolved type references, where we
+ // don't want to stop collecting types even though they may be
+ // opaque.
+ if ty.should_be_traced_unconditionally() || !self.is_opaque(ctx) {
ty.collect_types(ctx, types, self);
}
}
ItemKind::Function(ref fun) => {
- if !self.is_opaque(ctx) {
- types.insert(fun.signature());
- }
+ // Just the same way, it has not real meaning for a function to
+ // be opaque, so we trace across it.
+ types.insert(fun.signature());
}
_ => {} // FIXME.
}