zkkxu created this revision. zkkxu added reviewers: arcbbb, craig.topper. Herald added a project: All. zkkxu requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits.
Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D145346 Files: clang/lib/AST/Stmt.cpp Index: clang/lib/AST/Stmt.cpp =================================================================== --- clang/lib/AST/Stmt.cpp +++ clang/lib/AST/Stmt.cpp @@ -104,17 +104,20 @@ unsigned sum = 0; unsigned total_bytes = 0; llvm::errs() << "\n*** Stmt/Expr Stats:\n"; - for (int i = 0; i != Stmt::lastStmtConstant+1; i++) { - if (StmtClassInfo[i].Name == nullptr) continue; + for (int i = 0; i != Stmt::lastStmtConstant + 1; i++) { + if (StmtClassInfo[i].Name == nullptr) + continue; sum += StmtClassInfo[i].Counter; - if (StmtClassInfo[i].Counter == 0) continue; + if (StmtClassInfo[i].Counter == 0) + continue; llvm::errs() << " " << StmtClassInfo[i].Counter << " " << StmtClassInfo[i].Name << ", " << StmtClassInfo[i].Size - << " each (" << StmtClassInfo[i].Counter*StmtClassInfo[i].Size + << " each (" + << StmtClassInfo[i].Counter * StmtClassInfo[i].Size << " bytes)\n"; - total_bytes += StmtClassInfo[i].Counter*StmtClassInfo[i].Size; + total_bytes += StmtClassInfo[i].Counter * StmtClassInfo[i].Size; } - + llvm::errs() << " " << sum << " stmts/exprs total.\n"; llvm::errs() << "Total bytes = " << total_bytes << "\n"; }
Index: clang/lib/AST/Stmt.cpp =================================================================== --- clang/lib/AST/Stmt.cpp +++ clang/lib/AST/Stmt.cpp @@ -104,17 +104,20 @@ unsigned sum = 0; unsigned total_bytes = 0; llvm::errs() << "\n*** Stmt/Expr Stats:\n"; - for (int i = 0; i != Stmt::lastStmtConstant+1; i++) { - if (StmtClassInfo[i].Name == nullptr) continue; + for (int i = 0; i != Stmt::lastStmtConstant + 1; i++) { + if (StmtClassInfo[i].Name == nullptr) + continue; sum += StmtClassInfo[i].Counter; - if (StmtClassInfo[i].Counter == 0) continue; + if (StmtClassInfo[i].Counter == 0) + continue; llvm::errs() << " " << StmtClassInfo[i].Counter << " " << StmtClassInfo[i].Name << ", " << StmtClassInfo[i].Size - << " each (" << StmtClassInfo[i].Counter*StmtClassInfo[i].Size + << " each (" + << StmtClassInfo[i].Counter * StmtClassInfo[i].Size << " bytes)\n"; - total_bytes += StmtClassInfo[i].Counter*StmtClassInfo[i].Size; + total_bytes += StmtClassInfo[i].Counter * StmtClassInfo[i].Size; } - + llvm::errs() << " " << sum << " stmts/exprs total.\n"; llvm::errs() << "Total bytes = " << total_bytes << "\n"; }
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits