Fix srcdir <> objdir builds with ocaml 2.10. Downrev versions don't care whether
[oota-llvm.git] / docs / CodingStandards.html
index 97e21fa65cc7e6d9382169a6c866a3b91d6c35cd..6cfe5428356e59d6f2950e8dcaad4aac8f29b363 100644 (file)
@@ -122,9 +122,9 @@ documentation is very useful:</p>
 
 <b>File Headers</b>
 
-<p>Every source file should have a header on it that
-describes the basic purpose of the file.  If a file does not have a header, it
-should not be checked into CVS.  Most source trees will probably have a standard
+<p>Every source file should have a header on it that describes the basic 
+purpose of the file.  If a file does not have a header, it should not be 
+checked into Subversion.  Most source trees will probably have a standard
 file header format.  The standard format for the LLVM source tree looks like
 this:</p>
 
@@ -134,7 +134,7 @@ this:</p>
 // 
 //                     The LLVM Compiler Infrastructure
 //
-// This file was developed by the LLVM research group and is distributed under
+// This file was developed by &lt;whoever started the file&gt; and is distributed under
 // the University of Illinois Open Source License. See LICENSE.TXT for details.
 // 
 //===----------------------------------------------------------------------===//
@@ -146,7 +146,9 @@ this:</p>
 </pre>
 </div>
 
-<p>A few things to note about this particular format:  The "<tt>-*- C++
+<p>A few things to note about this particular format:  The 'developed by' line
+should be the name of the person or organization who initially contributed the 
+file.  The "<tt>-*- C++
 -*-</tt>" string on the first line is there to tell Emacs that the source file
 is a C++ file, not a C file (Emacs assumes .h files are C files by default).
 Note that this tag is not necessary in .cpp files.  The name of the file is also
@@ -456,7 +458,8 @@ most cases, you simply don't need the definition of a class... and not
 <tt>#include</tt>'ing speeds up compilation.</p>
 
 <p>It is easy to try to go too overboard on this recommendation, however.  You
-<b>must</b> include all of the header files that you are using, either directly
+<b>must</b> include all of the header files that you are using -- you can 
+include them either directly
 or indirectly (through another header file).  To make sure that you don't
 accidently forget to include a header file in your module header, make sure to
 include your module header <b>first</b> in the implementation file (as mentioned
@@ -509,7 +512,8 @@ library. There are two problems with this:</p>
       more pressure on the VM system on low-memory machines.</li>
 </ol>
 
-<table align="center">
+<div style="align: center">
+<table>
   <tbody>
     <tr>
       <th>Old Way</th>
@@ -537,12 +541,6 @@ dump(DOUT);</pre></td>
       <td align="left"><pre>std::cin &gt;&gt; Var;</pre></td>
       <td align="left"><pre>llvm::cin &gt;&gt; Var;</pre></td>
     </tr>
-    <tr>
-      <td align="left"><em>N/A</em></td>
-      <td align="left"><pre>llvm::cnull &gt;&gt; Var;</pre>
-        <ul><i>N.B.</i> Eats up argument <tt>Var</tt> outputting
-            nothing.</ul></td>
-    </tr>
     <tr>
       <td align="left"><pre>std::ostream</pre></td>
       <td align="left"><pre>llvm::OStream</pre></td>
@@ -556,19 +554,21 @@ dump(DOUT);</pre></td>
       <td align="left"><pre>llvm::StringStream</pre></td>
     </tr>
     <tr>
-      <td align="left"><pre>void print(std::ostream &Out);
+      <td align="left"><pre>void print(std::ostream &amp;Out);
 // ...
 print(std::cerr);</pre></td>
-      <td align="left"><pre>void print(std::ostream &Out);
+      <td align="left"><pre>void print(std::ostream &amp;Out);
 void print(std::ostream *Out) { if (Out) print(*Out) }
 // ...
 print(llvm::cerr);</pre>
 
-<ul><i>N.B.</i> The second <tt>print</tt> method is called by the <tt>print</tt>
+<div class="doc_text">
+<i>N.B.</i> The second <tt>print</tt> method is called by the <tt>print</tt>
 expression. It prevents the execution of the first <tt>print</tt> method if the
-stream is <tt>cnull</tt>.</ul></td>
+stream is <tt>cnull</tt>.</div></td>
    </tbody>
 </table>
+</div>
 
 </div>