summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-09-12 06:52:44 +0000
committerJustin Bogner <mail@justinbogner.com>2014-09-12 06:52:44 +0000
commit15562d00c14a3a2e1a9a8e8b0fa083e63e8de2e9 (patch)
treea118c5ff2736ee68fd13f35f4f0b80b0bf8607e7 /llvm/tools/llvm-cov
parentbe25030137581596ed289dc7955f5b69dbadcf63 (diff)
downloadbcm5719-llvm-15562d00c14a3a2e1a9a8e8b0fa083e63e8de2e9.tar.gz
bcm5719-llvm-15562d00c14a3a2e1a9a8e8b0fa083e63e8de2e9.zip
llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
llvm-svn: 217657
Diffstat (limited to 'llvm/tools/llvm-cov')
-rw-r--r--llvm/tools/llvm-cov/CodeCoverage.cpp1
-rw-r--r--llvm/tools/llvm-cov/CoverageFilters.h4
-rw-r--r--llvm/tools/llvm-cov/CoverageSummary.cpp4
-rw-r--r--llvm/tools/llvm-cov/CoverageSummary.h2
-rw-r--r--llvm/tools/llvm-cov/CoverageSummaryInfo.h5
-rw-r--r--llvm/tools/llvm-cov/FunctionCoverageMapping.h39
-rw-r--r--llvm/tools/llvm-cov/SourceCoverageDataManager.h1
7 files changed, 9 insertions, 47 deletions
diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp
index 9330ea91ce9..3945b17bc3d 100644
--- a/llvm/tools/llvm-cov/CodeCoverage.cpp
+++ b/llvm/tools/llvm-cov/CodeCoverage.cpp
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-#include "FunctionCoverageMapping.h"
#include "RenderingSupport.h"
#include "CoverageViewOptions.h"
#include "CoverageFilters.h"
diff --git a/llvm/tools/llvm-cov/CoverageFilters.h b/llvm/tools/llvm-cov/CoverageFilters.h
index b356377e10f..99ecb791ffc 100644
--- a/llvm/tools/llvm-cov/CoverageFilters.h
+++ b/llvm/tools/llvm-cov/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:
diff --git a/llvm/tools/llvm-cov/CoverageSummary.cpp b/llvm/tools/llvm-cov/CoverageSummary.cpp
index 62684547d40..c65c5bee00f 100644
--- a/llvm/tools/llvm-cov/CoverageSummary.cpp
+++ b/llvm/tools/llvm-cov/CoverageSummary.cpp
@@ -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());
diff --git a/llvm/tools/llvm-cov/CoverageSummary.h b/llvm/tools/llvm-cov/CoverageSummary.h
index bf4be08d923..5d6a55559cd 100644
--- a/llvm/tools/llvm-cov/CoverageSummary.h
+++ b/llvm/tools/llvm-cov/CoverageSummary.h
@@ -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; }
diff --git a/llvm/tools/llvm-cov/CoverageSummaryInfo.h b/llvm/tools/llvm-cov/CoverageSummaryInfo.h
index 710108d1a5d..8a40867b3e1 100644
--- a/llvm/tools/llvm-cov/CoverageSummaryInfo.h
+++ b/llvm/tools/llvm-cov/CoverageSummaryInfo.h
@@ -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.
diff --git a/llvm/tools/llvm-cov/FunctionCoverageMapping.h b/llvm/tools/llvm-cov/FunctionCoverageMapping.h
deleted file mode 100644
index 99fdcff0183..00000000000
--- a/llvm/tools/llvm-cov/FunctionCoverageMapping.h
+++ /dev/null
@@ -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
diff --git a/llvm/tools/llvm-cov/SourceCoverageDataManager.h b/llvm/tools/llvm-cov/SourceCoverageDataManager.h
index 1c87266e0c4..abeca192e64 100644
--- a/llvm/tools/llvm-cov/SourceCoverageDataManager.h
+++ b/llvm/tools/llvm-cov/SourceCoverageDataManager.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>
OpenPOWER on IntegriCloud