[llvm-commits] [llvm-gcc-4.2] r97676 - in /llvm-gcc-4.2/trunk/gcc: llvm-backend.cpp llvm-internal.h llvm-types.cpp tree.c tree.h

Duncan Sands baldrick at free.fr
Thu Mar 4 00:54:57 PST 2010


Hi Stuart,

> +  // Random initialization of TypeRefinementDatabase if we're using a
> +  // PCH.  Won't work until the GCC PCH has been read in and digested.

what do you mean by "random initialization"?

> +// We've just read in a PCH; retrieve the set of GCC types that were
> +// known to TypeUsers[], and re-populate it.  Intended to be called
> +// once, but harmless if called multiple times, or if no PCH is
> +// present.
> +void readLLVMTypeUsers() {

This comment does not follow LLVM's doxygen style.

> +// Record the set of GCC types currently known to TypeUsers[] inside
> +// GCC so they will be preserved in a PCH.  Intended to be called
> +// once, just before the PCH is written.
> +void writeLLVMTypeUsers() {

Likewise.

> +  std::map<const Type*, std::vector<tree>  >::iterator
> +    I = TypeDB.TypeUsers.begin(),
> +    E = TypeDB.TypeUsers.end();
> +  for (; I != E; I++)

Normal LLVM style is to use ++I

> +    for (unsigned i = 0, e = I->second.size(); i != e; ++i)
> +      llvm_push_TypeUsers(I->second[i]);
> +}
>   //===----------------------------------------------------------------------===//

Missing blank line between the end of the function and the following comment.

Ciao,

Duncan.



More information about the llvm-commits mailing list