diff --git a/llvm/docs/CodingStandards.html b/llvm/docs/CodingStandards.html index df6eb90b9bed..36aced60a01c 100644 --- a/llvm/docs/CodingStandards.html +++ b/llvm/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.

    diff --git a/llvm/lib/Target/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp similarity index 100% rename from llvm/lib/Target/TargetLowering.cpp rename to llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerAllocations.cpp b/llvm/lib/Transforms/Utils/LowerAllocations.cpp similarity index 100% rename from llvm/lib/Transforms/Scalar/LowerAllocations.cpp rename to llvm/lib/Transforms/Utils/LowerAllocations.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerInvoke.cpp b/llvm/lib/Transforms/Utils/LowerInvoke.cpp similarity index 100% rename from llvm/lib/Transforms/Scalar/LowerInvoke.cpp rename to llvm/lib/Transforms/Utils/LowerInvoke.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerSelect.cpp b/llvm/lib/Transforms/Utils/LowerSelect.cpp similarity index 100% rename from llvm/lib/Transforms/Scalar/LowerSelect.cpp rename to llvm/lib/Transforms/Utils/LowerSelect.cpp diff --git a/llvm/lib/Transforms/Scalar/LowerSwitch.cpp b/llvm/lib/Transforms/Utils/LowerSwitch.cpp similarity index 100% rename from llvm/lib/Transforms/Scalar/LowerSwitch.cpp rename to llvm/lib/Transforms/Utils/LowerSwitch.cpp diff --git a/llvm/lib/Transforms/Scalar/Mem2Reg.cpp b/llvm/lib/Transforms/Utils/Mem2Reg.cpp similarity index 100% rename from llvm/lib/Transforms/Scalar/Mem2Reg.cpp rename to llvm/lib/Transforms/Utils/Mem2Reg.cpp diff --git a/llvm/lib/CodeGen/ValueTypes.cpp b/llvm/lib/VMCore/ValueTypes.cpp similarity index 100% rename from llvm/lib/CodeGen/ValueTypes.cpp rename to llvm/lib/VMCore/ValueTypes.cpp