[llvm-commits] CVS: llvm/docs/ProgrammersManual.html

Misha Brukman brukman at cs.uiuc.edu
Tue Nov 1 13:13:16 PST 2005



Changes in directory llvm/docs:

ProgrammersManual.html updated: 1.87 -> 1.88
---
Log message:

* Replace ampersands in section titles with more formal ``and''
* Surround C++ template operators with <tt>
* Add <> after templated operators for consistency


---
Diffs of the changes:  (+36 -34)

 ProgrammersManual.html |   70 +++++++++++++++++++++++++------------------------
 1 files changed, 36 insertions(+), 34 deletions(-)


Index: llvm/docs/ProgrammersManual.html
diff -u llvm/docs/ProgrammersManual.html:1.87 llvm/docs/ProgrammersManual.html:1.88
--- llvm/docs/ProgrammersManual.html:1.87	Sun Oct 16 20:36:23 2005
+++ llvm/docs/ProgrammersManual.html	Tue Nov  1 15:12:49 2005
@@ -28,7 +28,7 @@
     <ul>
       <li><a href="#isa">The <tt>isa<></tt>, <tt>cast<></tt>
 and <tt>dyn_cast<></tt> templates</a> </li>
-      <li><a href="#DEBUG">The <tt>DEBUG()</tt> macro & <tt>-debug</tt>
+      <li><a href="#DEBUG">The <tt>DEBUG()</tt> macro and <tt>-debug</tt>
 option</a>
         <ul>
           <li><a href="#DEBUG_TYPE">Fine grained debug info with <tt>DEBUG_TYPE</tt>
@@ -264,7 +264,8 @@
 
 <!-- ======================================================================= -->
 <div class="doc_subsection">
-  <a name="isa">The isa<>, cast<> and dyn_cast<> templates</a>
+  <a name="isa">The <tt>isa<></tt>, <tt>cast<></tt> and
+  <tt>dyn_cast<></tt> templates</a>
 </div>
 
 <div class="doc_text">
@@ -317,44 +318,45 @@
   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
   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
-  same circumstances.  Typically, the <tt>dyn_cast<></tt> operator is used
-  in an <tt>if</tt> statement or some other flow control statement like this:
+  much like the <tt>dynamic_cast<></tt> operator in C++, and should be
+  used in the same circumstances.  Typically, the <tt>dyn_cast<></tt>
+  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<<a href="#AllocationInst">AllocationInst</a>>(Val)) {
        ...
      }
-   </pre>
+  </pre>
    
-   <p> This form of the <tt>if</tt> statement effectively combines together a
-   call to <tt>isa<></tt> and a call to <tt>cast<></tt> into one
-   statement, which is very convenient.</p>
-
-   <p>Note that the <tt>dyn_cast<></tt> operator, like C++'s
-   <tt>dynamic_cast</tt> or Java's <tt>instanceof</tt> operator, can be abused.
-   In particular you should not use big chained <tt>if/then/else</tt> blocks to
-   check for lots of different variants of classes.  If you find 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>
+  <p>This form of the <tt>if</tt> statement effectively combines together a call
+  to <tt>isa<></tt> and a call to <tt>cast<></tt> into one
+  statement, which is very convenient.</p>
+
+  <p>Note that the <tt>dyn_cast<></tt> operator, like C++'s
+  <tt>dynamic_cast<></tt> or Java's <tt>instanceof</tt> operator, can be
+  abused.  In particular, you should not use big chained <tt>if/then/else</tt>
+  blocks to check for lots of different variants of classes.  If you find
+  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>
 
-    </dd>
+  </dd>
 
-    <dt><tt>cast_or_null<></tt>: </dt>
-   
-    <dd>The <tt>cast_or_null<></tt> operator works just like the
-    <tt>cast<></tt> operator, except that it allows for a null pointer as
-    an argument (which it then propagates).  This can sometimes be useful,
-    allowing you to combine several null checks into one.</dd>
-
-    <dt><tt>dyn_cast_or_null<></tt>: </dt>
-
-    <dd>The <tt>dyn_cast_or_null<></tt> operator works just like the
-    <tt>dyn_cast<></tt> operator, except that it allows for a null pointer
-    as an argument (which it then propagates).  This can sometimes be useful,
-    allowing you to combine several null checks into one.</dd>
+  <dt><tt>cast_or_null<></tt>: </dt>
+  
+  <dd>The <tt>cast_or_null<></tt> operator works just like the
+  <tt>cast<></tt> operator, except that it allows for a null pointer as an
+  argument (which it then propagates).  This can sometimes be useful, allowing
+  you to combine several null checks into one.</dd>
+
+  <dt><tt>dyn_cast_or_null<></tt>: </dt>
+
+  <dd>The <tt>dyn_cast_or_null<></tt> operator works just like the
+  <tt>dyn_cast<></tt> operator, except that it allows for a null pointer
+  as an argument (which it then propagates).  This can sometimes be useful,
+  allowing you to combine several null checks into one.</dd>
 
-  </dl>
+</dl>
 
 <p>These five templates can be used with any classes, whether they have a
 v-table or not.  To add support for these templates, you simply need to add
@@ -366,7 +368,7 @@
 
 <!-- ======================================================================= -->
 <div class="doc_subsection">
-  <a name="DEBUG">The <tt>DEBUG()</tt> macro & <tt>-debug</tt> option</a>
+  <a name="DEBUG">The <tt>DEBUG()</tt> macro and <tt>-debug</tt> option</a>
 </div>
 
 <div class="doc_text">
@@ -2275,7 +2277,7 @@
   <a href="mailto:dhurjati at cs.uiuc.edu">Dinakar Dhurjati</a> and
   <a href="mailto:sabre at nondot.org">Chris Lattner</a><br>
   <a href="http://llvm.cs.uiuc.edu">The LLVM Compiler Infrastructure</a><br>
-  Last modified: $Date: 2005/10/17 01:36:23 $
+  Last modified: $Date: 2005/11/01 21:12:49 $
 </address>
 
 </body>






More information about the llvm-commits mailing list