diff --git a/docs/CodingStandards.html b/docs/CodingStandards.html index df6eb90b9be..36aced60a01 100644 --- a/docs/CodingStandards.html +++ b/docs/CodingStandards.html @@ -44,10 +44,11 @@
  • The Low Level Issues
      -
    1. Assert Liberally
    2. -
    3. Do not use 'using namespace std'
    4. -
    5. Prefer Preincrement
    6. -
    7. Avoid std::endl
    8. +
    9. Assert Liberally
    10. +
    11. Do not use 'using namespace std'
    12. +
    13. Provide a virtual method anchor for clases in headers
    14. +
    15. Prefer Preincrement
    16. +
    17. Avoid std::endl
  • See Also
  • @@ -489,7 +490,7 @@ class itself... just make them private (or protected), and all is well.

    - Assert Liberally + Assert Liberally
    @@ -537,7 +538,7 @@ assert(isa<PHINode>(Succ->front()) && "Only works on PHId BBs!"
    - Do not use 'using namespace std' + Do not use 'using namespace std'
    @@ -572,7 +573,24 @@ namespace (and its parents), but should not use any others.

    + +
    + +

    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. +

    + +
    + + + +
    @@ -592,7 +610,7 @@ get in the habit of always using preincrement, and you won't have a problem.