[llvm] r217657 - llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
Justin Bogner
mail at justinbogner.com
Thu Sep 11 23:52:45 PDT 2014
Author: bogner
Date: Fri Sep 12 01:52:44 2014
New Revision: 217657
URL: http://llvm.org/viewvc/llvm-project?rev=217657&view=rev
Log:
llvm-cov: Move FunctionCoverageMapping into CoverageMapping.h (NFC)
Removed:
llvm/trunk/tools/llvm-cov/FunctionCoverageMapping.h
Modified:
llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
llvm/trunk/tools/llvm-cov/CodeCoverage.cpp
llvm/trunk/tools/llvm-cov/CoverageFilters.h
llvm/trunk/tools/llvm-cov/CoverageSummary.cpp
llvm/trunk/tools/llvm-cov/CoverageSummary.h
llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.h
llvm/trunk/tools/llvm-cov/SourceCoverageDataManager.h
Modified: llvm/trunk/include/llvm/ProfileData/CoverageMapping.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/CoverageMapping.h?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/CoverageMapping.h (original)
+++ llvm/trunk/include/llvm/ProfileData/CoverageMapping.h Fri Sep 12 01:52:44 2014
@@ -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
Modified: llvm/trunk/tools/llvm-cov/CodeCoverage.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CodeCoverage.cpp?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CodeCoverage.cpp (original)
+++ llvm/trunk/tools/llvm-cov/CodeCoverage.cpp Fri Sep 12 01:52:44 2014
@@ -13,7 +13,6 @@
//
//===----------------------------------------------------------------------===//
-#include "FunctionCoverageMapping.h"
#include "RenderingSupport.h"
#include "CoverageViewOptions.h"
#include "CoverageFilters.h"
Modified: llvm/trunk/tools/llvm-cov/CoverageFilters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CoverageFilters.h?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CoverageFilters.h (original)
+++ llvm/trunk/tools/llvm-cov/CoverageFilters.h Fri Sep 12 01:52:44 2014
@@ -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:
Modified: llvm/trunk/tools/llvm-cov/CoverageSummary.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CoverageSummary.cpp?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CoverageSummary.cpp (original)
+++ llvm/trunk/tools/llvm-cov/CoverageSummary.cpp Fri Sep 12 01:52:44 2014
@@ -27,8 +27,8 @@ unsigned CoverageSummary::getFileID(Stri
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());
Modified: llvm/trunk/tools/llvm-cov/CoverageSummary.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CoverageSummary.h?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CoverageSummary.h (original)
+++ llvm/trunk/tools/llvm-cov/CoverageSummary.h Fri Sep 12 01:52:44 2014
@@ -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; }
Modified: llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.h?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.h (original)
+++ llvm/trunk/tools/llvm-cov/CoverageSummaryInfo.h Fri Sep 12 01:52:44 2014
@@ -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.
Removed: llvm/trunk/tools/llvm-cov/FunctionCoverageMapping.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/FunctionCoverageMapping.h?rev=217656&view=auto
==============================================================================
--- llvm/trunk/tools/llvm-cov/FunctionCoverageMapping.h (original)
+++ llvm/trunk/tools/llvm-cov/FunctionCoverageMapping.h (removed)
@@ -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
Modified: llvm/trunk/tools/llvm-cov/SourceCoverageDataManager.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-cov/SourceCoverageDataManager.h?rev=217657&r1=217656&r2=217657&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-cov/SourceCoverageDataManager.h (original)
+++ llvm/trunk/tools/llvm-cov/SourceCoverageDataManager.h Fri Sep 12 01:52:44 2014
@@ -14,7 +14,6 @@
#ifndef LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
#define LLVM_COV_SOURCECOVERAGEDATAMANAGER_H
-#include "FunctionCoverageMapping.h"
#include "llvm/ProfileData/CoverageMapping.h"
#include <vector>
More information about the llvm-commits
mailing list