1 //===- FunctionSummary.cpp - Stores summaries of functions. ---------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file defines a summary of a function gathered/used by static analysis.
12 //===----------------------------------------------------------------------===//
14 #include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h"
16 using namespace clang;
19 unsigned FunctionSummariesTy::getTotalNumBasicBlocks() {
21 for (const auto &I : Map)
22 Total += I.second.TotalBasicBlocks;
26 unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() {
28 for (const auto &I : Map)
29 Total += I.second.VisitedBasicBlocks.count();