diff --git a/llvm/include/llvm/ProfileData/CoverageMapping.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h similarity index 100% rename from llvm/include/llvm/ProfileData/CoverageMapping.h rename to llvm/include/llvm/ProfileData/Coverage/CoverageMapping.h diff --git a/llvm/include/llvm/ProfileData/CoverageMappingReader.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h similarity index 99% rename from llvm/include/llvm/ProfileData/CoverageMappingReader.h rename to llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h index 7dfce5b8c642..709006fb113c 100644 --- a/llvm/include/llvm/ProfileData/CoverageMappingReader.h +++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingReader.h @@ -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" diff --git a/llvm/include/llvm/ProfileData/CoverageMappingWriter.h b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h similarity index 97% rename from llvm/include/llvm/ProfileData/CoverageMappingWriter.h rename to llvm/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h index 2e3b0378d032..10269cc50f35 100644 --- a/llvm/include/llvm/ProfileData/CoverageMappingWriter.h +++ b/llvm/include/llvm/ProfileData/Coverage/CoverageMappingWriter.h @@ -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 { diff --git a/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt index c487ccad5079..e68717c8188c 100644 --- a/llvm/lib/ProfileData/CMakeLists.txt +++ b/llvm/lib/ProfileData/CMakeLists.txt @@ -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) diff --git a/llvm/lib/ProfileData/Coverage/CMakeLists.txt b/llvm/lib/ProfileData/Coverage/CMakeLists.txt new file mode 100644 index 000000000000..035b8fdb8b3d --- /dev/null +++ b/llvm/lib/ProfileData/Coverage/CMakeLists.txt @@ -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 + ) diff --git a/llvm/lib/ProfileData/CoverageMapping.cpp b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp similarity index 99% rename from llvm/lib/ProfileData/CoverageMapping.cpp rename to llvm/lib/ProfileData/Coverage/CoverageMapping.cpp index 8e6ca42c4b84..5d86f1de3ad9 100644 --- a/llvm/lib/ProfileData/CoverageMapping.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMapping.cpp @@ -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" diff --git a/llvm/lib/ProfileData/CoverageMappingReader.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp similarity index 99% rename from llvm/lib/ProfileData/CoverageMappingReader.cpp rename to llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp index f92583cfb2b3..78f7186eac86 100644 --- a/llvm/lib/ProfileData/CoverageMappingReader.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMappingReader.cpp @@ -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" diff --git a/llvm/lib/ProfileData/CoverageMappingWriter.cpp b/llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp similarity index 99% rename from llvm/lib/ProfileData/CoverageMappingWriter.cpp rename to llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp index d90d2f565155..8ff90d62cfdc 100644 --- a/llvm/lib/ProfileData/CoverageMappingWriter.cpp +++ b/llvm/lib/ProfileData/Coverage/CoverageMappingWriter.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/ProfileData/CoverageMappingWriter.h" +#include "llvm/ProfileData/Coverage/CoverageMappingWriter.h" #include "llvm/Support/LEB128.h" using namespace llvm; diff --git a/llvm/lib/ProfileData/Coverage/LLVMBuild.txt b/llvm/lib/ProfileData/Coverage/LLVMBuild.txt new file mode 100644 index 000000000000..fc8284b0ef38 --- /dev/null +++ b/llvm/lib/ProfileData/Coverage/LLVMBuild.txt @@ -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 + diff --git a/llvm/lib/ProfileData/LLVMBuild.txt b/llvm/lib/ProfileData/LLVMBuild.txt index a7f471fc582e..b3d749feda61 100644 --- a/llvm/lib/ProfileData/LLVMBuild.txt +++ b/llvm/lib/ProfileData/LLVMBuild.txt @@ -15,8 +15,11 @@ ; ;===------------------------------------------------------------------------===; +[common] +subdirectories = Coverage + [component_0] type = Library name = ProfileData parent = Libraries -required_libraries = Core Support Object +required_libraries = Core Support diff --git a/llvm/tools/llvm-cov/CMakeLists.txt b/llvm/tools/llvm-cov/CMakeLists.txt index 193218a6639f..f8b7fa666eae 100644 --- a/llvm/tools/llvm-cov/CMakeLists.txt +++ b/llvm/tools/llvm-cov/CMakeLists.txt @@ -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 diff --git a/llvm/tools/llvm-cov/CodeCoverage.cpp b/llvm/tools/llvm-cov/CodeCoverage.cpp index 8dc4d665f23c..1c11fe60197e 100644 --- a/llvm/tools/llvm-cov/CodeCoverage.cpp +++ b/llvm/tools/llvm-cov/CodeCoverage.cpp @@ -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" diff --git a/llvm/tools/llvm-cov/CoverageFilters.h b/llvm/tools/llvm-cov/CoverageFilters.h index dc5dc98807b1..756c4b47872c 100644 --- a/llvm/tools/llvm-cov/CoverageFilters.h +++ b/llvm/tools/llvm-cov/CoverageFilters.h @@ -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 #include diff --git a/llvm/tools/llvm-cov/CoverageSummaryInfo.h b/llvm/tools/llvm-cov/CoverageSummaryInfo.h index a89020424032..822742b635e9 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 "llvm/ProfileData/CoverageMapping.h" +#include "llvm/ProfileData/Coverage/CoverageMapping.h" #include "llvm/Support/raw_ostream.h" namespace llvm { diff --git a/llvm/tools/llvm-cov/LLVMBuild.txt b/llvm/tools/llvm-cov/LLVMBuild.txt index d6eb74de0d4b..33f51fb2ed5a 100644 --- a/llvm/tools/llvm-cov/LLVMBuild.txt +++ b/llvm/tools/llvm-cov/LLVMBuild.txt @@ -19,4 +19,4 @@ type = Tool name = llvm-cov parent = Tools -required_libraries = ProfileData Support Instrumentation +required_libraries = Coverage Support Instrumentation diff --git a/llvm/tools/llvm-cov/SourceCoverageView.h b/llvm/tools/llvm-cov/SourceCoverageView.h index 9e6fe5f35001..22c87254e7c7 100644 --- a/llvm/tools/llvm-cov/SourceCoverageView.h +++ b/llvm/tools/llvm-cov/SourceCoverageView.h @@ -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 diff --git a/llvm/unittests/ProfileData/CMakeLists.txt b/llvm/unittests/ProfileData/CMakeLists.txt index 011f8c581792..dd39ca7da3ad 100644 --- a/llvm/unittests/ProfileData/CMakeLists.txt +++ b/llvm/unittests/ProfileData/CMakeLists.txt @@ -1,5 +1,6 @@ set(LLVM_LINK_COMPONENTS Core + Coverage ProfileData Support ) diff --git a/llvm/unittests/ProfileData/CoverageMappingTest.cpp b/llvm/unittests/ProfileData/CoverageMappingTest.cpp index a230d9d59bf4..8177bd632c26 100644 --- a/llvm/unittests/ProfileData/CoverageMappingTest.cpp +++ b/llvm/unittests/ProfileData/CoverageMappingTest.cpp @@ -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"