[llvm-commits] [PATCH] Add a ValueMap type, whose keys act like WeakVHs

Chris Lattner clattner at apple.com
Sat Oct 17 16:05:04 PDT 2009


On Oct 17, 2009, at 12:42 AM, jyasskin at gmail.com wrote:
>
> I guess I'll have to figure out how to fix it before submitting.

I'll review it when it is fixed.

>
> Description:
> ValueMap<Value*, T> is safe to use even when keys get RAUWed and  
> deleted
> during its lifetime. By default the keys act like WeakVHs, but users  
> can
> pass a third template parameter to configure how updates work and
> whether to do anything beyond updating the map on each action.
>
> This type should make http://codereview.appspot.com/133043/diff/1/2
> quite a bit simpler, but I haven't yet updated it so I could have  
> missed
> something.

Sounds nice, what happens when X->RAUW(Y) and both X and Y are already  
in the map?

-Chris




More information about the llvm-commits mailing list