summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CodeGenModule.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-03-31 22:11:05 +0000
committerChris Lattner <sabre@nondot.org>2009-03-31 22:11:05 +0000
commit90234f34c6f773bb8f94de7099b34d9805042898 (patch)
treebe0d0ec62684aef6ef5d864b6f38a8e08a194038 /clang/lib/CodeGen/CodeGenModule.cpp
parent7c92528530616b7aed3f4888b25f097f14ea52d9 (diff)
downloadbcm5719-llvm-90234f34c6f773bb8f94de7099b34d9805042898.tar.gz
bcm5719-llvm-90234f34c6f773bb8f94de7099b34d9805042898.zip
Add two new classes: WeakVH and AssertingVH. These are both "ValueHandles",
which are effectively smart pointers to Value*'s. They are both very light weight and simple, and react to values being destroyed or being RAUW'd. WeakVN does a best effort to follow a value around, including through RAUW operations and will get nulled out of the value is destroyed. This is useful for the eventual "metadata that references a value" work, because it is a reference to a value that does not show up on its use_* list. AssertingVH is a pointer that compiles down to a dumb raw pointer when assertions are disabled. When enabled, it emits an assertion if the pointed-to value is destroyed while it is still being referenced. This is very useful for Maps and other things, and should have caught the recent bugs in CallGraph and Reassociate, for example. llvm-svn: 68149
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud