From e955f6183749410992ef358b2d49b8cae2acaae1 Mon Sep 17 00:00:00 2001 From: Vedant Kumar Date: Wed, 18 Oct 2017 23:58:27 +0000 Subject: [llvm-cov] Use the coverage namespace. NFC. This is a simple code cleanup. It will facilitate moving LineCoverageIterator to libCoverage. llvm-svn: 316140 --- llvm/tools/llvm-cov/SourceCoverageView.h | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h') diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h index 501c17d..35dea59 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.h +++ b/llvm/tools/llvm-cov/SourceCoverageView.h @@ -22,15 +22,17 @@ namespace llvm { +using namespace coverage; + class CoverageFiltersMatchAll; class SourceCoverageView; /// \brief A view that represents a macro or include expansion. struct ExpansionView { - coverage::CounterMappingRegion Region; + CounterMappingRegion Region; std::unique_ptr View; - ExpansionView(const coverage::CounterMappingRegion &Region, + ExpansionView(const CounterMappingRegion &Region, std::unique_ptr View) : Region(Region), View(std::move(View)) {} ExpansionView(ExpansionView &&RHS) @@ -112,7 +114,7 @@ public: /// \brief Create an index which lists reports for the given source files. virtual Error createIndexFile(ArrayRef SourceFiles, - const coverage::CoverageMapping &Coverage, + const CoverageMapping &Coverage, const CoverageFiltersMatchAll &Filters) = 0; /// @} @@ -134,7 +136,7 @@ class SourceCoverageView { const CoverageViewOptions &Options; /// Complete coverage information about the source on display. - coverage::CoverageData CoverageInfo; + CoverageData CoverageInfo; /// A container for all expansions (e.g macros) in the source on display. std::vector ExpansionSubViews; @@ -154,7 +156,7 @@ protected: LineRef(StringRef Line, int64_t LineNo) : Line(Line), LineNo(LineNo) {} }; - using CoverageSegmentArray = ArrayRef; + using CoverageSegmentArray = ArrayRef; /// @name Rendering Interface /// @{ @@ -230,15 +232,14 @@ protected: SourceCoverageView(StringRef SourceName, const MemoryBuffer &File, const CoverageViewOptions &Options, - coverage::CoverageData &&CoverageInfo) + CoverageData &&CoverageInfo) : SourceName(SourceName), File(File), Options(Options), CoverageInfo(std::move(CoverageInfo)) {} public: static std::unique_ptr create(StringRef SourceName, const MemoryBuffer &File, - const CoverageViewOptions &Options, - coverage::CoverageData &&CoverageInfo); + const CoverageViewOptions &Options, CoverageData &&CoverageInfo); virtual ~SourceCoverageView() {} @@ -248,7 +249,7 @@ public: const CoverageViewOptions &getOptions() const { return Options; } /// \brief Add an expansion subview to this view. - void addExpansion(const coverage::CounterMappingRegion &Region, + void addExpansion(const CounterMappingRegion &Region, std::unique_ptr View); /// \brief Add a function instantiation subview to this view. -- cgit v1.1