[llvm-commits] [llvm] r60889 - /llvm/trunk/docs/CodingStandards.html
Misha Brukman
brukman+llvm at gmail.com
Thu Dec 11 11:37:06 PST 2008
Author: brukman
Date: Thu Dec 11 13:37:04 2008
New Revision: 60889
URL: http://llvm.org/viewvc/llvm-project?rev=60889&view=rev
Log:
* <div align=center> is not valid HTML 4.01 - removed alignment
* <sup> cannot appear inside a <pre> - replaced <pre> with <tt> and <br>
* Added standard "Notes" section
* Sprinkled fixed-width <tt> tags in a few places for consistency
Modified:
llvm/trunk/docs/CodingStandards.html
Modified: llvm/trunk/docs/CodingStandards.html
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/CodingStandards.html?rev=60889&r1=60888&r2=60889&view=diff
==============================================================================
--- llvm/trunk/docs/CodingStandards.html (original)
+++ llvm/trunk/docs/CodingStandards.html Thu Dec 11 13:37:04 2008
@@ -526,7 +526,6 @@
example) is allowed normally, it is just <tt><iostream></tt> that is
causing problems.</p>
-<div align="center">
<table>
<tbody>
<tr>
@@ -571,17 +570,22 @@
<td align="left"><pre>void print(std::ostream &Out);
// ...
print(std::cerr);</pre></td>
- <td align="left"><pre>void print(llvm::OStream Out);<sup>1</sup>
-// ...
-print(llvm::cerr);</pre>
+ <td align="left"><tt>void print(llvm::OStream Out);<sup><a href="#sn_1">1</a></sup><br>
+// ...<br>
+print(llvm::cerr);</tt>
+ </td>
+ </tr>
+ </tbody>
+</table>
-</td> </tbody> </table>
-</div>
+<p><b>Notes:</b></p>
-<div class="doc_text">
-<p><sup>1</sup><tt>llvm::OStream</tt> is a light-weight class so it should never
-be passed by reference. This is important because in some configurations,
-<tt>DOUT</tt> is an rvalue.</p>
+<div class="doc_notes">
+<ol>
+<li><a name="sn_1"><tt>llvm::OStream</tt></a> is a light-weight class so it
+ should never be passed by reference. This is important because in some
+ configurations, <tt>DOUT</tt> is an rvalue.</li>
+</ol>
</div>
</div>
@@ -675,8 +679,8 @@
"<tt>using namespace std;</tt>".</p>
<p> In header files, adding a '<tt>using namespace XXX</tt>' directive pollutes
-the namespace of any source file that includes the header. This is clearly a
-bad thing.</p>
+the namespace of any source file that <tt>#include</tt>s the header. This is
+clearly a bad thing.</p>
<p>In implementation files (e.g. .cpp files), the rule is more of a stylistic
rule, but is still important. Basically, using explicit namespace prefixes
@@ -710,9 +714,9 @@
<p>If a class is defined in a header file and has a v-table (either it has
virtual methods or it derives from classes with virtual methods), it must
always have at least one out-of-line virtual method in the class. Without
-this, the compiler will copy the vtable and RTTI into every .o file that
-#includes the header, bloating .o file sizes and increasing link times.
-</p>
+this, the compiler will copy the vtable and RTTI into every <tt>.o</tt> file
+that <tt>#include</tt>s the header, bloating <tt>.o</tt> file sizes and
+increasing link times.</p>
</div>
More information about the llvm-commits
mailing list