mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-25 20:59:51 +00:00
Attempt HTML 4.01 Strict compliance.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17399 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
fe8f4fff15
commit
c7d1d8256e
@ -875,7 +875,8 @@ can use it like this:</p>
|
||||
else
|
||||
break; // we're done with the list
|
||||
}
|
||||
}</tt></pre></p>
|
||||
}
|
||||
</tt></pre></p>
|
||||
<p>Note that, for compatibility reasons, the <tt>cl::opt</tt> also supports an
|
||||
<tt>unsigned getPosition()</tt> option that will provide the absolute position
|
||||
of that option. You can apply the same approach as above with a
|
||||
|
@ -1771,19 +1771,23 @@ types.</p>
|
||||
<li><tt>isLosslesslyConvertableTo (const Type *Ty) const</tt>: Return true if
|
||||
this type can be converted to 'Ty' without any reinterpretation of bits. For
|
||||
example, uint to int or one pointer type to another.</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
<p>Derived Types</p>
|
||||
|
||||
<!-- _______________________________________________________________________ -->
|
||||
<div class="doc_subsubsection">
|
||||
<a name="m_Value">Important Derived Types</a>
|
||||
</div>
|
||||
<div class="doc_text">
|
||||
<ul>
|
||||
<li>SequentialType : This is subclassed by ArrayType and PointerType
|
||||
<ul>
|
||||
<li><tt>const Type * getElementType() const</tt>: Returns the type of
|
||||
each of the elements in the sequential type. </li>
|
||||
<li><tt>const Type * getElementType() const</tt>: Returns the type of each
|
||||
of the elements in the sequential type. </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>ArrayType : This is a subclass of SequentialType and defines
|
||||
interface for array types.
|
||||
<li>ArrayType : This is a subclass of SequentialType and defines interface for
|
||||
array types.
|
||||
<ul>
|
||||
<li><tt>unsigned getNumElements() const</tt>: Returns the number of
|
||||
elements in the array. </li>
|
||||
@ -1804,9 +1808,6 @@ elements in the array. </li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- ======================================================================= -->
|
||||
@ -1946,32 +1947,33 @@ three idioms worth pointing out:</p>
|
||||
<tr><th>Units</th><th>Iterator</th><th>Idiom</th></tr>
|
||||
<tr>
|
||||
<td align="left">Planes Of name/Value maps</td><td>PI</td>
|
||||
<td align="left"><tt><pre>
|
||||
<td align="left"><pre><tt>
|
||||
for (SymbolTable::plane_const_iterator PI = ST.plane_begin(),
|
||||
PE = ST.plane_end(); PI != PE; ++PI ) {
|
||||
PI->first // This is the Type* of the plane
|
||||
PI->second // This is the SymbolTable::ValueMap of name/Value pairs
|
||||
</pre></tt></td>
|
||||
</tt></pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">All name/Type Pairs</td><td>TI</td>
|
||||
<td align="left"><tt><pre>
|
||||
<td align="left"><pre><tt>
|
||||
for (SymbolTable::type_const_iterator TI = ST.type_begin(),
|
||||
TE = ST.type_end(); TI != TE; ++TI )
|
||||
TI->first // This is the name of the type
|
||||
TI->second // This is the Type* value associated with the name
|
||||
</pre></tt></td>
|
||||
</tt></pre></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left">name/Value pairs in a plane</td><td>VI</td>
|
||||
<td align="left"><tt><pre>
|
||||
<td align="left"><pre><tt>
|
||||
for (SymbolTable::value_const_iterator VI = ST.value_begin(SomeType),
|
||||
VE = ST.value_end(SomeType); VI != VE; ++VI )
|
||||
VI->first // This is the name of the Value
|
||||
VI->second // This is the Value* value associated with the name
|
||||
</pre></tt></td>
|
||||
</tt></pre></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p>Using the recommended iterator names and idioms will help you avoid
|
||||
making mistakes. Of particular note, make sure that whenever you use
|
||||
value_begin(SomeType) that you always compare the resulting iterator
|
||||
|
Loading…
Reference in New Issue
Block a user