clang API Documentation
00001 //== FunctionSummary.cpp - Stores summaries of functions. ----------*- C++ -*-// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file defines a summary of a function gathered/used by static analysis. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #include "clang/StaticAnalyzer/Core/PathSensitive/FunctionSummary.h" 00015 using namespace clang; 00016 using namespace ento; 00017 00018 unsigned FunctionSummariesTy::getTotalNumBasicBlocks() { 00019 unsigned Total = 0; 00020 for (MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I) { 00021 Total += I->second.TotalBasicBlocks; 00022 } 00023 return Total; 00024 } 00025 00026 unsigned FunctionSummariesTy::getTotalNumVisitedBasicBlocks() { 00027 unsigned Total = 0; 00028 for (MapTy::iterator I = Map.begin(), E = Map.end(); I != E; ++I) { 00029 Total += I->second.VisitedBasicBlocks.count(); 00030 } 00031 return Total; 00032 }