about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorNiko Matsakis <niko@alum.mit.edu>2015-11-17 17:32:12 -0500
committerNiko Matsakis <niko@alum.mit.edu>2015-11-18 19:22:18 -0500
commit767ee79c4c38e7909c7fefef1b33be4612112336 (patch)
tree9932fa75f5cd2e12ba06c157f7677b634a092fbd /src/rustllvm/RustWrapper.cpp
parent66326bc66572ca753bbb1d81a67d43488f6695f3 (diff)
downloadrust-767ee79c4c38e7909c7fefef1b33be4612112336.tar.gz
rust-767ee79c4c38e7909c7fefef1b33be4612112336.zip
Refactor the HIR so that items are stored in a map in the `Crate`,
rather being stored inline. Refactor (and rename) the visitor so that
(by default) it only visits the interior content of an item not nested
items.

This is a [breaking-change] for anyone who uses the HIR visitor. Besides
changing `visit::` to `intravisit::`, you need to refactor your visitor
in one of two ways, depending on what it requires:

1. If you just want to visit all items (most common), you should call
   `krate.visit_all_items(&mut visitor)`.

2. If you need to visit nested items in the middle of the parent items,
   you should override `visit_nested_item` with something like:
   `self.visit_item(self.tcx.map.expect_item(item.id))`, presuming you
   have access to a tcx (or at least a HIR map).
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions