aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@google.com>2009-10-22 20:10:20 +0000
committerJeffrey Yasskin <jyasskin@google.com>2009-10-22 20:10:20 +0000
commite0a234029b1b65f21169536f4c45e83743ed3cfa (patch)
tree47c339af1f2fbc95bfa69c64488190662f759a32 /docs
parent9d89df169027035bf692b3d397bb93cff7bdc860 (diff)
downloadexternal_llvm-e0a234029b1b65f21169536f4c45e83743ed3cfa.zip
external_llvm-e0a234029b1b65f21169536f4c45e83743ed3cfa.tar.gz
external_llvm-e0a234029b1b65f21169536f4c45e83743ed3cfa.tar.bz2
Add a ValueMap<ValueOrSubclass*, T> type. 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. It's also possible to automatically acquire a lock around ValueMap updates triggered by RAUWs and deletes, to support the ExecutionEngine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs')
-rw-r--r--docs/ProgrammersManual.html18
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/ProgrammersManual.html b/docs/ProgrammersManual.html
index 68367de..e4e3dc2 100644
--- a/docs/ProgrammersManual.html
+++ b/docs/ProgrammersManual.html
@@ -83,6 +83,7 @@ option</a></li>
<li><a href="#dss_stringmap">"llvm/ADT/StringMap.h"</a></li>
<li><a href="#dss_indexedmap">"llvm/ADT/IndexedMap.h"</a></li>
<li><a href="#dss_densemap">"llvm/ADT/DenseMap.h"</a></li>
+ <li><a href="#dss_valuemap">"llvm/ADT/ValueMap.h"</a></li>
<li><a href="#dss_map">&lt;map&gt;</a></li>
<li><a href="#dss_othermap">Other Map-Like Container Options</a></li>
</ul></li>
@@ -1492,6 +1493,23 @@ inserted into the map) that it needs internally.</p>
<!-- _______________________________________________________________________ -->
<div class="doc_subsubsection">
+ <a name="dss_valuemap">"llvm/ADT/ValueMap.h"</a>
+</div>
+
+<div class="doc_text">
+
+<p>
+ValueMap is a wrapper around a <a href="#dss_densemap">DenseMap</a> mapping
+Value*s (or subclasses) to another type. When a Value is deleted or RAUW'ed,
+ValueMap will update itself so the new version of the key is mapped to the same
+value, just as if the key were a WeakVH. You can configure exactly how this
+happens, and what else happens on these two events, by passing
+a <code>Config</code> parameter to the ValueMap template.</p>
+
+</div>
+
+<!-- _______________________________________________________________________ -->
+<div class="doc_subsubsection">
<a name="dss_map">&lt;map&gt;</a>
</div>