silence a bunch of warnings, fix some funky indentation.

llvm-svn: 39487
This commit is contained in:
Chris Lattner 2007-05-24 00:40:54 +00:00
parent 6ba4ef5325
commit fc234de388
2 changed files with 70 additions and 61 deletions

View File

@ -85,10 +85,11 @@ void ASTContext::PrintStats() const {
fprintf(stderr, " %d union types\n", NumTagUnion); fprintf(stderr, " %d union types\n", NumTagUnion);
fprintf(stderr, " %d class types\n", NumTagClass); fprintf(stderr, " %d class types\n", NumTagClass);
fprintf(stderr, " %d enum types\n", NumTagEnum); fprintf(stderr, " %d enum types\n", NumTagEnum);
fprintf(stderr, "Total bytes = %d\n", NumBuiltin*sizeof(BuiltinType)+ fprintf(stderr, "Total bytes = %d\n", int(NumBuiltin*sizeof(BuiltinType)+
NumPointer*sizeof(PointerType)+NumArray*sizeof(ArrayType)+ NumPointer*sizeof(PointerType)+NumArray*sizeof(ArrayType)+
NumFunctionP*sizeof(FunctionTypeProto)+NumFunctionNP*sizeof(FunctionTypeNoProto)+ NumFunctionP*sizeof(FunctionTypeProto)+
NumTypeName*sizeof(TypedefType)+NumTagged*sizeof(TagType)); NumFunctionNP*sizeof(FunctionTypeNoProto)+
NumTypeName*sizeof(TypedefType)+NumTagged*sizeof(TagType)));
} }

View File

@ -36,31 +36,39 @@ bool Decl::CollectingStats(bool enable) {
void Decl::PrintStats() { void Decl::PrintStats() {
fprintf(stderr, "*** Decl Stats:\n"); fprintf(stderr, "*** Decl Stats:\n");
fprintf(stderr, " %d decls total.\n", fprintf(stderr, " %d decls total.\n",
nFuncs+nBlockVars+nFileVars+nParmVars+nFieldDecls+nSUE+nEnumDecls+nEnumConst+nTypedef); int(nFuncs+nBlockVars+nFileVars+nParmVars+nFieldDecls+nSUE+
nEnumDecls+nEnumConst+nTypedef));
fprintf(stderr, " %d function decls, %d each (%d bytes)\n", fprintf(stderr, " %d function decls, %d each (%d bytes)\n",
nFuncs, sizeof(FunctionDecl), nFuncs*sizeof(FunctionDecl)); nFuncs, (int)sizeof(FunctionDecl), int(nFuncs*sizeof(FunctionDecl)));
fprintf(stderr, " %d block variable decls, %d each (%d bytes)\n", fprintf(stderr, " %d block variable decls, %d each (%d bytes)\n",
nBlockVars, sizeof(BlockVarDecl), nBlockVars*sizeof(BlockVarDecl)); nBlockVars, (int)sizeof(BlockVarDecl),
int(nBlockVars*sizeof(BlockVarDecl)));
fprintf(stderr, " %d file variable decls, %d each (%d bytes)\n", fprintf(stderr, " %d file variable decls, %d each (%d bytes)\n",
nFileVars, sizeof(FileVarDecl), nFileVars*sizeof(FileVarDecl)); nFileVars, (int)sizeof(FileVarDecl),
int(nFileVars*sizeof(FileVarDecl)));
fprintf(stderr, " %d parameter variable decls, %d each (%d bytes)\n", fprintf(stderr, " %d parameter variable decls, %d each (%d bytes)\n",
nParmVars, sizeof(ParmVarDecl), nParmVars*sizeof(ParmVarDecl)); nParmVars, (int)sizeof(ParmVarDecl),
int(nParmVars*sizeof(ParmVarDecl)));
fprintf(stderr, " %d field decls, %d each (%d bytes)\n", fprintf(stderr, " %d field decls, %d each (%d bytes)\n",
nFieldDecls, sizeof(FieldDecl), nFieldDecls*sizeof(FieldDecl)); nFieldDecls, (int)sizeof(FieldDecl),
int(nFieldDecls*sizeof(FieldDecl)));
fprintf(stderr, " %d struct/union/enum decls, %d each (%d bytes)\n", fprintf(stderr, " %d struct/union/enum decls, %d each (%d bytes)\n",
nSUE, sizeof(RecordDecl), nSUE*sizeof(RecordDecl)); nSUE, (int)sizeof(RecordDecl),
int(nSUE*sizeof(RecordDecl)));
fprintf(stderr, " %d enum decls, %d each (%d bytes)\n", fprintf(stderr, " %d enum decls, %d each (%d bytes)\n",
nEnumDecls, sizeof(EnumDecl), nEnumDecls*sizeof(EnumDecl)); nEnumDecls, (int)sizeof(EnumDecl),
int(nEnumDecls*sizeof(EnumDecl)));
fprintf(stderr, " %d enum constant decls, %d each (%d bytes)\n", fprintf(stderr, " %d enum constant decls, %d each (%d bytes)\n",
nEnumConst, sizeof(EnumConstantDecl), nEnumConst*sizeof(EnumConstantDecl)); nEnumConst, (int)sizeof(EnumConstantDecl),
int(nEnumConst*sizeof(EnumConstantDecl)));
fprintf(stderr, " %d typedef decls, %d each (%d bytes)\n", fprintf(stderr, " %d typedef decls, %d each (%d bytes)\n",
nTypedef, sizeof(TypedefDecl), nTypedef*sizeof(TypedefDecl)); nTypedef, (int)sizeof(TypedefDecl),int(nTypedef*sizeof(TypedefDecl)));
fprintf(stderr, "Total bytes = %d\n", fprintf(stderr, "Total bytes = %d\n",
nFuncs*sizeof(FunctionDecl)+nBlockVars*sizeof(BlockVarDecl)+ int(nFuncs*sizeof(FunctionDecl)+nBlockVars*sizeof(BlockVarDecl)+
nFileVars*sizeof(FileVarDecl)+nParmVars*sizeof(ParmVarDecl)+ nFileVars*sizeof(FileVarDecl)+nParmVars*sizeof(ParmVarDecl)+
nFieldDecls*sizeof(FieldDecl)+nSUE*sizeof(RecordDecl)+ nFieldDecls*sizeof(FieldDecl)+nSUE*sizeof(RecordDecl)+
nEnumDecls*sizeof(EnumDecl)+nEnumConst*sizeof(EnumConstantDecl)+ nEnumDecls*sizeof(EnumDecl)+nEnumConst*sizeof(EnumConstantDecl)+
nTypedef*sizeof(TypedefDecl)); nTypedef*sizeof(TypedefDecl)));
} }
void Decl::addDeclKind(const Kind k) { void Decl::addDeclKind(const Kind k) {