diff options
-rw-r--r-- | llvm/docs/CodingStandards.html | 34 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp (renamed from llvm/lib/Target/TargetLowering.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerAllocations.cpp (renamed from llvm/lib/Transforms/Scalar/LowerAllocations.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerInvoke.cpp (renamed from llvm/lib/Transforms/Scalar/LowerInvoke.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerSelect.cpp (renamed from llvm/lib/Transforms/Scalar/LowerSelect.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/LowerSwitch.cpp (renamed from llvm/lib/Transforms/Scalar/LowerSwitch.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/Transforms/Utils/Mem2Reg.cpp (renamed from llvm/lib/Transforms/Scalar/Mem2Reg.cpp) | 0 | ||||
-rw-r--r-- | llvm/lib/VMCore/ValueTypes.cpp (renamed from llvm/lib/CodeGen/ValueTypes.cpp) | 0 |
8 files changed, 26 insertions, 8 deletions
diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html index df6eb90b9be..36aced60a01 100644 --- a/llvm/docs/CodingStandards.html +++ b/llvm/docs/CodingStandards.html @@ -44,10 +44,11 @@ </ol></li> <li><a href="#micro">The Low Level Issues</a> <ol> - <li><a href="#hl_assert">Assert Liberally</a></li> - <li><a href="#hl_ns_std">Do not use 'using namespace std'</a></li> - <li><a href="#hl_preincrement">Prefer Preincrement</a></li> - <li><a href="#hl_avoidendl">Avoid <tt>std::endl</tt></a></li> + <li><a href="#ll_assert">Assert Liberally</a></li> + <li><a href="#ll_ns_std">Do not use 'using namespace std'</a></li> + <li><a href="#ll_virtual_anch">Provide a virtual method anchor for clases in headers</a></li> + <li><a href="#ll_preincrement">Prefer Preincrement</a></li> + <li><a href="#ll_avoidendl">Avoid <tt>std::endl</tt></a></li> </ol></li> </ol></li> <li><a href="#seealso">See Also</a></li> @@ -489,7 +490,7 @@ class itself... just make them private (or protected), and all is well.</p> <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="hl_assert">Assert Liberally</a> + <a name="ll_assert">Assert Liberally</a> </div> <div class="doc_text"> @@ -537,7 +538,7 @@ assert(isa<PHINode>(Succ->front()) && "Only works on PHId BBs!" <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="hl_ns_std">Do not use 'using namespace std'</a> + <a name="ll_ns_std">Do not use 'using namespace std'</a> </div> <div class="doc_text"> @@ -572,7 +573,24 @@ namespace (and its parents), but should not use any others.</p> <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="hl_preincrement">Prefer Preincrement</a> + <a name="ll_virtual_anch">Provide a virtual method anchor for clases in headers</a> +</div> + +<div class="doc_text"> + +<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> + +</div> + + +<!-- _______________________________________________________________________ --> +<div class="doc_subsubsection"> + <a name="ll_preincrement">Prefer Preincrement</a> </div> <div class="doc_text"> @@ -592,7 +610,7 @@ get in the habit of always using preincrement, and you won't have a problem.</p> <!-- _______________________________________________________________________ --> <div class="doc_subsubsection"> - <a name="hl_avoidendl">Avoid <tt>std::endl</tt></a> + <a name="ll_avoidendl">Avoid <tt>std::endl</tt></a> </div> <div class="doc_text"> diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index b8cefc646a3..b8cefc646a3 100644 --- a/llvm/lib/Target/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Utils/LowerAllocations.cpp index eab64681e57..eab64681e57 100644 --- a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp +++ b/llvm/lib/Transforms/Utils/LowerAllocations.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp index b5f652c154c..b5f652c154c 100644 --- a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp +++ b/llvm/lib/Transforms/Utils/LowerInvoke.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerSelect.cpp b/llvm/lib/Transforms/Utils/LowerSelect.cpp index 464d30d0308..464d30d0308 100644 --- a/llvm/lib/Transforms/Scalar/LowerSelect.cpp +++ b/llvm/lib/Transforms/Utils/LowerSelect.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp index 396b507bbd1..396b507bbd1 100644 --- a/llvm/lib/Transforms/Scalar/LowerSwitch.cpp +++ b/llvm/lib/Transforms/Utils/LowerSwitch.cpp diff --git a/llvm/lib/Transforms/Scalar/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp index d1b2c50796e..d1b2c50796e 100644 --- a/llvm/lib/Transforms/Scalar/Mem2Reg.cpp +++ b/llvm/lib/Transforms/Utils/Mem2Reg.cpp diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/VMCore/ValueTypes.cpp index 4cb72b88867..4cb72b88867 100644 --- a/llvm/lib/CodeGen/ValueTypes.cpp +++ b/llvm/lib/VMCore/ValueTypes.cpp |