1 //===- FunctionCoverageMapping.h - Function coverage mapping record -------===//
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 // A structure that stores the coverage mapping record for a single function.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_COV_FUNCTIONCOVERAGEMAPPING_H
15 #define LLVM_COV_FUNCTIONCOVERAGEMAPPING_H
19 #include "llvm/ADT/ArrayRef.h"
20 #include "llvm/ADT/StringRef.h"
21 #include "llvm/ProfileData/CoverageMapping.h"
25 /// \brief Stores all the required information
26 /// about code coverage for a single function.
27 struct FunctionCoverageMapping {
28 /// \brief Raw function name.
30 std::vector<std::string> Filenames;
31 std::vector<coverage::CountedRegion> CountedRegions;
33 FunctionCoverageMapping(StringRef Name, ArrayRef<StringRef> Filenames)
34 : Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
39 #endif // LLVM_COV_FUNCTIONCOVERAGEMAPPING_H