* Replace ampersands in section titles with more formal ``and''

* Surround C++ template operators with <tt>
* Add <> after templated operators for consistency


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24144 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Misha Brukman
2005-11-01 21:12:49 +00:00
parent f83d406541
commit 2c122ceefe

View File

@ -28,7 +28,7 @@
<ul> <ul>
<li><a href="#isa">The <tt>isa&lt;&gt;</tt>, <tt>cast&lt;&gt;</tt> <li><a href="#isa">The <tt>isa&lt;&gt;</tt>, <tt>cast&lt;&gt;</tt>
and <tt>dyn_cast&lt;&gt;</tt> templates</a> </li> and <tt>dyn_cast&lt;&gt;</tt> templates</a> </li>
<li><a href="#DEBUG">The <tt>DEBUG()</tt> macro &amp; <tt>-debug</tt> <li><a href="#DEBUG">The <tt>DEBUG()</tt> macro and <tt>-debug</tt>
option</a> option</a>
<ul> <ul>
<li><a href="#DEBUG_TYPE">Fine grained debug info with <tt>DEBUG_TYPE</tt> <li><a href="#DEBUG_TYPE">Fine grained debug info with <tt>DEBUG_TYPE</tt>
@ -264,7 +264,8 @@ know about when writing transformations.</p>
<!-- ======================================================================= --> <!-- ======================================================================= -->
<div class="doc_subsection"> <div class="doc_subsection">
<a name="isa">The isa&lt;&gt;, cast&lt;&gt; and dyn_cast&lt;&gt; templates</a> <a name="isa">The <tt>isa&lt;&gt;</tt>, <tt>cast&lt;&gt;</tt> and
<tt>dyn_cast&lt;&gt;</tt> templates</a>
</div> </div>
<div class="doc_text"> <div class="doc_text">
@ -317,9 +318,10 @@ file (note that you very rarely have to include this file directly).</p>
checks to see if the operand is of the specified type, and if so, returns a checks to see if the operand is of the specified type, and if so, returns a
pointer to it (this operator does not work with references). If the operand is pointer to it (this operator does not work with references). If the operand is
not of the correct type, a null pointer is returned. Thus, this works very not of the correct type, a null pointer is returned. Thus, this works very
much like the <tt>dynamic_cast</tt> operator in C++, and should be used in the much like the <tt>dynamic_cast&lt;&gt;</tt> operator in C++, and should be
same circumstances. Typically, the <tt>dyn_cast&lt;&gt;</tt> operator is used used in the same circumstances. Typically, the <tt>dyn_cast&lt;&gt;</tt>
in an <tt>if</tt> statement or some other flow control statement like this: operator is used in an <tt>if</tt> statement or some other flow control
statement like this:
<pre> <pre>
if (<a href="#AllocationInst">AllocationInst</a> *AI = dyn_cast&lt;<a href="#AllocationInst">AllocationInst</a>&gt;(Val)) { if (<a href="#AllocationInst">AllocationInst</a> *AI = dyn_cast&lt;<a href="#AllocationInst">AllocationInst</a>&gt;(Val)) {
@ -327,15 +329,15 @@ file (note that you very rarely have to include this file directly).</p>
} }
</pre> </pre>
<p> This form of the <tt>if</tt> statement effectively combines together a <p>This form of the <tt>if</tt> statement effectively combines together a call
call to <tt>isa&lt;&gt;</tt> and a call to <tt>cast&lt;&gt;</tt> into one to <tt>isa&lt;&gt;</tt> and a call to <tt>cast&lt;&gt;</tt> into one
statement, which is very convenient.</p> statement, which is very convenient.</p>
<p>Note that the <tt>dyn_cast&lt;&gt;</tt> operator, like C++'s <p>Note that the <tt>dyn_cast&lt;&gt;</tt> operator, like C++'s
<tt>dynamic_cast</tt> or Java's <tt>instanceof</tt> operator, can be abused. <tt>dynamic_cast&lt;&gt;</tt> or Java's <tt>instanceof</tt> operator, can be
In particular you should not use big chained <tt>if/then/else</tt> blocks to abused. In particular, you should not use big chained <tt>if/then/else</tt>
check for lots of different variants of classes. If you find yourself blocks to check for lots of different variants of classes. If you find
wanting to do this, it is much cleaner and more efficient to use the yourself wanting to do this, it is much cleaner and more efficient to use the
<tt>InstVisitor</tt> class to dispatch over the instruction type directly.</p> <tt>InstVisitor</tt> class to dispatch over the instruction type directly.</p>
</dd> </dd>
@ -343,9 +345,9 @@ file (note that you very rarely have to include this file directly).</p>
<dt><tt>cast_or_null&lt;&gt;</tt>: </dt> <dt><tt>cast_or_null&lt;&gt;</tt>: </dt>
<dd>The <tt>cast_or_null&lt;&gt;</tt> operator works just like the <dd>The <tt>cast_or_null&lt;&gt;</tt> operator works just like the
<tt>cast&lt;&gt;</tt> operator, except that it allows for a null pointer as <tt>cast&lt;&gt;</tt> operator, except that it allows for a null pointer as an
an argument (which it then propagates). This can sometimes be useful, argument (which it then propagates). This can sometimes be useful, allowing
allowing you to combine several null checks into one.</dd> you to combine several null checks into one.</dd>
<dt><tt>dyn_cast_or_null&lt;&gt;</tt>: </dt> <dt><tt>dyn_cast_or_null&lt;&gt;</tt>: </dt>
@ -366,7 +368,7 @@ are lots of examples in the LLVM source base.</p>
<!-- ======================================================================= --> <!-- ======================================================================= -->
<div class="doc_subsection"> <div class="doc_subsection">
<a name="DEBUG">The <tt>DEBUG()</tt> macro &amp; <tt>-debug</tt> option</a> <a name="DEBUG">The <tt>DEBUG()</tt> macro and <tt>-debug</tt> option</a>
</div> </div>
<div class="doc_text"> <div class="doc_text">