Move coverage related code into a separate library.

Differential Revision: http://reviews.llvm.org/D19333

llvm-svn: 268089
This commit is contained in:
Easwaran Raman 2016-04-29 18:53:05 +00:00
parent 2fe9304d62
commit dc7071226b
18 changed files with 57 additions and 20 deletions

View File

@ -19,7 +19,7 @@
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/Object/ObjectFile.h"
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/InstrProf.h"
#include "llvm/Support/FileSystem.h"
#include "llvm/Support/MemoryBuffer.h"

View File

@ -17,7 +17,7 @@
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {

View File

@ -2,9 +2,6 @@ add_llvm_library(LLVMProfileData
InstrProf.cpp
InstrProfReader.cpp
InstrProfWriter.cpp
CoverageMapping.cpp
CoverageMappingWriter.cpp
CoverageMappingReader.cpp
ProfileSummary.cpp
SampleProf.cpp
SampleProfReader.cpp
@ -16,3 +13,5 @@ add_llvm_library(LLVMProfileData
DEPENDS
intrinsics_gen
)
add_subdirectory(Coverage)

View File

@ -0,0 +1,11 @@
add_llvm_library(LLVMCoverage
CoverageMapping.cpp
CoverageMappingWriter.cpp
CoverageMappingReader.cpp
ADDITIONAL_HEADER_DIRS
${LLVM_MAIN_INCLUDE_DIR}/llvm/ProfileData/Coverage
DEPENDS
intrinsics_gen
)

View File

@ -12,11 +12,11 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/ProfileData/CoverageMappingReader.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/Errc.h"

View File

@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/ProfileData/CoverageMappingReader.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/Object/MachOUniversal.h"
#include "llvm/Object/ObjectFile.h"

View File

@ -12,7 +12,7 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/ProfileData/CoverageMappingWriter.h"
#include "llvm/ProfileData/Coverage/CoverageMappingWriter.h"
#include "llvm/Support/LEB128.h"
using namespace llvm;

View File

@ -0,0 +1,23 @@
;===- ./lib/ProfileData/Coverage/LLVMBuild.txt -----------------*- Conf -*--===;
;
; The LLVM Compiler Infrastructure
;
; This file is distributed under the University of Illinois Open Source
; License. See LICENSE.TXT for details.
;
;===------------------------------------------------------------------------===;
;
; This is an LLVMBuild description file for the components in this subdirectory.
;
; For more information on the LLVMBuild system, please see:
;
; http://llvm.org/docs/LLVMBuild.html
;
;===------------------------------------------------------------------------===;
[component_0]
type = Library
name = Coverage
parent = ProfileData
required_libraries = Core Object ProfileData Support

View File

@ -15,8 +15,11 @@
;
;===------------------------------------------------------------------------===;
[common]
subdirectories = Coverage
[component_0]
type = Library
name = ProfileData
parent = Libraries
required_libraries = Core Support Object
required_libraries = Core Support

View File

@ -1,4 +1,4 @@
set(LLVM_LINK_COMPONENTS core support object profiledata)
set(LLVM_LINK_COMPONENTS core support object coverage profiledata)
add_llvm_tool(llvm-cov
llvm-cov.cpp

View File

@ -13,15 +13,15 @@
//
//===----------------------------------------------------------------------===//
#include "RenderingSupport.h"
#include "CoverageFilters.h"
#include "CoverageReport.h"
#include "CoverageViewOptions.h"
#include "RenderingSupport.h"
#include "SourceCoverageView.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/ADT/Triple.h"
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/FileSystem.h"

View File

@ -14,7 +14,7 @@
#ifndef LLVM_COV_COVERAGEFILTERS_H
#define LLVM_COV_COVERAGEFILTERS_H
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include <memory>
#include <vector>

View File

@ -15,7 +15,7 @@
#ifndef LLVM_COV_COVERAGESUMMARYINFO_H
#define LLVM_COV_COVERAGESUMMARYINFO_H
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/Support/raw_ostream.h"
namespace llvm {

View File

@ -19,4 +19,4 @@
type = Tool
name = llvm-cov
parent = Tools
required_libraries = ProfileData Support Instrumentation
required_libraries = Coverage Support Instrumentation

View File

@ -15,7 +15,7 @@
#define LLVM_COV_SOURCECOVERAGEVIEW_H
#include "CoverageViewOptions.h"
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/Support/MemoryBuffer.h"
#include <vector>

View File

@ -1,5 +1,6 @@
set(LLVM_LINK_COMPONENTS
Core
Coverage
ProfileData
Support
)

View File

@ -7,9 +7,9 @@
//
//===----------------------------------------------------------------------===//
#include "llvm/ProfileData/CoverageMapping.h"
#include "llvm/ProfileData/CoverageMappingReader.h"
#include "llvm/ProfileData/CoverageMappingWriter.h"
#include "llvm/ProfileData/Coverage/CoverageMapping.h"
#include "llvm/ProfileData/Coverage/CoverageMappingReader.h"
#include "llvm/ProfileData/Coverage/CoverageMappingWriter.h"
#include "llvm/ProfileData/InstrProfReader.h"
#include "llvm/ProfileData/InstrProfWriter.h"
#include "llvm/Support/raw_ostream.h"