summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Fitzgerald <fitzgen@gmail.com>2017-10-02 11:54:49 -0700
committerNick Fitzgerald <fitzgen@gmail.com>2017-10-02 12:18:44 -0700
commit45db21bfed19f318290c9c32edf42ba4a0a26ada (patch)
treee970c798b8c9ab4f59c0fd135b04b92d46d5a69c
parentedee094d3c3662f8c045c19e9705d32f7b652bb1 (diff)
Make `CompInfo::inner_vars` use `VarId` instead of `ItemId`
-rw-r--r--src/ir/comp.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ir/comp.rs b/src/ir/comp.rs
index 8dd49d12..3d09363c 100644
--- a/src/ir/comp.rs
+++ b/src/ir/comp.rs
@@ -2,7 +2,7 @@
use super::analysis::HasVtable;
use super::annotations::Annotations;
-use super::context::{BindgenContext, ItemId, TypeId};
+use super::context::{BindgenContext, ItemId, TypeId, VarId};
use super::dot::DotAttributes;
use super::item::{IsOpaque, Item};
use super::layout::Layout;
@@ -853,7 +853,7 @@ pub struct CompInfo {
inner_types: Vec<TypeId>,
/// Set of static constants declared inside this class.
- inner_vars: Vec<ItemId>,
+ inner_vars: Vec<VarId>,
/// Whether this type should generate an vtable (TODO: Should be able to
/// look at the virtual methods and ditch this field).
@@ -1276,7 +1276,7 @@ impl CompInfo {
if let Ok(item) = Item::parse(cur,
Some(potential_id),
ctx) {
- ci.inner_vars.push(item);
+ ci.inner_vars.push(item.as_var_id_unchecked());
}
}
// Intentionally not handled
@@ -1334,7 +1334,7 @@ impl CompInfo {
}
/// Get the set of static variables declared within this compound type.
- pub fn inner_vars(&self) -> &[ItemId] {
+ pub fn inner_vars(&self) -> &[VarId] {
&self.inner_vars
}
@@ -1492,7 +1492,7 @@ impl Trace for CompInfo {
}
for &var in self.inner_vars() {
- tracer.visit_kind(var, EdgeKind::InnerVar);
+ tracer.visit_kind(var.into(), EdgeKind::InnerVar);
}
for method in self.methods() {