mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217657 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
275458e7da
commit
8f3096162c
@ -220,6 +220,19 @@ public:
|
||||
ErrorOr<int64_t> evaluate(const Counter &C) const;
|
||||
};
|
||||
|
||||
/// \brief Code coverage information for a single function.
|
||||
struct FunctionCoverageMapping {
|
||||
/// \brief Raw function name.
|
||||
std::string Name;
|
||||
/// \brief Associated files.
|
||||
std::vector<std::string> Filenames;
|
||||
/// \brief Regions in the function along with their counts.
|
||||
std::vector<CountedRegion> CountedRegions;
|
||||
|
||||
FunctionCoverageMapping(StringRef Name, ArrayRef<StringRef> Filenames)
|
||||
: Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
|
||||
};
|
||||
|
||||
} // end namespace coverage
|
||||
} // end namespace llvm
|
||||
|
||||
|
@ -13,7 +13,6 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#include "FunctionCoverageMapping.h"
|
||||
#include "RenderingSupport.h"
|
||||
#include "CoverageViewOptions.h"
|
||||
#include "CoverageFilters.h"
|
||||
|
@ -14,12 +14,14 @@
|
||||
#ifndef LLVM_COV_COVERAGEFILTERS_H
|
||||
#define LLVM_COV_COVERAGEFILTERS_H
|
||||
|
||||
#include "FunctionCoverageMapping.h"
|
||||
#include "llvm/ProfileData/CoverageMapping.h"
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
||||
namespace llvm {
|
||||
|
||||
using coverage::FunctionCoverageMapping;
|
||||
|
||||
/// \brief Matches specific functions that pass the requirement of this filter.
|
||||
class CoverageFilter {
|
||||
public:
|
||||
|
@ -27,8 +27,8 @@ unsigned CoverageSummary::getFileID(StringRef Filename) {
|
||||
return Filenames.size() - 1;
|
||||
}
|
||||
|
||||
void
|
||||
CoverageSummary::createSummaries(ArrayRef<FunctionCoverageMapping> Functions) {
|
||||
void CoverageSummary::createSummaries(
|
||||
ArrayRef<coverage::FunctionCoverageMapping> Functions) {
|
||||
std::vector<std::pair<unsigned, size_t>> FunctionFileIDs;
|
||||
|
||||
FunctionFileIDs.resize(Functions.size());
|
||||
|
@ -30,7 +30,7 @@ class CoverageSummary {
|
||||
unsigned getFileID(StringRef Filename);
|
||||
|
||||
public:
|
||||
void createSummaries(ArrayRef<FunctionCoverageMapping> Functions);
|
||||
void createSummaries(ArrayRef<coverage::FunctionCoverageMapping> Functions);
|
||||
|
||||
ArrayRef<FileCoverageSummary> getFileSummaries() { return FileSummaries; }
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
#ifndef LLVM_COV_COVERAGESUMMARYINFO_H
|
||||
#define LLVM_COV_COVERAGESUMMARYINFO_H
|
||||
|
||||
#include "FunctionCoverageMapping.h"
|
||||
#include "llvm/ProfileData/CoverageMapping.h"
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
|
||||
namespace llvm {
|
||||
@ -100,7 +100,8 @@ struct FunctionCoverageSummary {
|
||||
|
||||
/// \brief Compute the code coverage summary for the given function coverage
|
||||
/// mapping record.
|
||||
static FunctionCoverageSummary get(const FunctionCoverageMapping &Function);
|
||||
static FunctionCoverageSummary
|
||||
get(const coverage::FunctionCoverageMapping &Function);
|
||||
};
|
||||
|
||||
/// \brief A summary of file's code coverage.
|
||||
|
@ -1,39 +0,0 @@
|
||||
//===- FunctionCoverageMapping.h - Function coverage mapping record -------===//
|
||||
//
|
||||
// The LLVM Compiler Infrastructure
|
||||
//
|
||||
// This file is distributed under the University of Illinois Open Source
|
||||
// License. See LICENSE.TXT for details.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// A structure that stores the coverage mapping record for a single function.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#ifndef LLVM_COV_FUNCTIONCOVERAGEMAPPING_H
|
||||
#define LLVM_COV_FUNCTIONCOVERAGEMAPPING_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/ProfileData/CoverageMapping.h"
|
||||
|
||||
namespace llvm {
|
||||
|
||||
/// \brief Stores all the required information
|
||||
/// about code coverage for a single function.
|
||||
struct FunctionCoverageMapping {
|
||||
/// \brief Raw function name.
|
||||
std::string Name;
|
||||
std::vector<std::string> Filenames;
|
||||
std::vector<coverage::CountedRegion> CountedRegions;
|
||||
|
||||
FunctionCoverageMapping(StringRef Name, ArrayRef<StringRef> Filenames)
|
||||
: Name(Name), Filenames(Filenames.begin(), Filenames.end()) {}
|
||||
};
|
||||
|
||||
} // namespace llvm
|
||||
|
||||
#endif // LLVM_COV_FUNCTIONCOVERAGEMAPPING_H
|
@ -14,7 +14,6 @@
|
||||
#ifndef LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
|
||||
#define LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
|
||||
|
||||
#include "FunctionCoverageMapping.h"
|
||||
#include "llvm/ProfileData/CoverageMapping.h"
|
||||
#include <vector>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user