From 7711c315b294abaa47e3933ec470e04fa5b8ae80 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Fri, 3 Nov 2017 20:57:10 +0000 Subject: [PATCH] GCOV: Move GCOV from IR & Support into ProfileData to fix layering This class was split between libIR and libSupport, which breaks under modular code generation. Move it into the one library that uses it, ProfileData, to resolve this issue. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@317366 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/{Support => ProfileData}/GCOV.h | 4 ++-- include/llvm/ProfileData/SampleProfReader.h | 2 +- lib/IR/CMakeLists.txt | 1 - lib/ProfileData/CMakeLists.txt | 1 + lib/{IR => ProfileData}/GCOV.cpp | 2 +- tools/llvm-cov/gcov.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename include/llvm/{Support => ProfileData}/GCOV.h (99%) rename lib/{IR => ProfileData}/GCOV.cpp (99%) diff --git a/include/llvm/Support/GCOV.h b/include/llvm/ProfileData/GCOV.h similarity index 99% rename from include/llvm/Support/GCOV.h rename to include/llvm/ProfileData/GCOV.h index 02016e7dbd6..497f80b87b2 100644 --- a/include/llvm/Support/GCOV.h +++ b/include/llvm/ProfileData/GCOV.h @@ -12,8 +12,8 @@ // //===----------------------------------------------------------------------===// -#ifndef LLVM_SUPPORT_GCOV_H -#define LLVM_SUPPORT_GCOV_H +#ifndef LLVM_PROFILEDATA_GCOV_H +#define LLVM_PROFILEDATA_GCOV_H #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/MapVector.h" diff --git a/include/llvm/ProfileData/SampleProfReader.h b/include/llvm/ProfileData/SampleProfReader.h index 9c1f357cbbd..0e9ab2dc60e 100644 --- a/include/llvm/ProfileData/SampleProfReader.h +++ b/include/llvm/ProfileData/SampleProfReader.h @@ -217,10 +217,10 @@ #include "llvm/IR/Function.h" #include "llvm/IR/LLVMContext.h" #include "llvm/IR/ProfileSummary.h" +#include "llvm/ProfileData/GCOV.h" #include "llvm/ProfileData/SampleProf.h" #include "llvm/Support/Debug.h" #include "llvm/Support/ErrorOr.h" -#include "llvm/Support/GCOV.h" #include "llvm/Support/MemoryBuffer.h" #include #include diff --git a/lib/IR/CMakeLists.txt b/lib/IR/CMakeLists.txt index eb4b9143090..17822bbbb5c 100644 --- a/lib/IR/CMakeLists.txt +++ b/lib/IR/CMakeLists.txt @@ -22,7 +22,6 @@ add_llvm_library(LLVMCore DiagnosticPrinter.cpp Dominators.cpp Function.cpp - GCOV.cpp GVMaterializer.cpp Globals.cpp IRBuilder.cpp diff --git a/lib/ProfileData/CMakeLists.txt b/lib/ProfileData/CMakeLists.txt index cd65762ae6a..3a981d8acf4 100644 --- a/lib/ProfileData/CMakeLists.txt +++ b/lib/ProfileData/CMakeLists.txt @@ -1,4 +1,5 @@ add_llvm_library(LLVMProfileData + GCOV.cpp InstrProf.cpp InstrProfReader.cpp InstrProfWriter.cpp diff --git a/lib/IR/GCOV.cpp b/lib/ProfileData/GCOV.cpp similarity index 99% rename from lib/IR/GCOV.cpp rename to lib/ProfileData/GCOV.cpp index d4b45522822..d6e44389f2b 100644 --- a/lib/IR/GCOV.cpp +++ b/lib/ProfileData/GCOV.cpp @@ -12,7 +12,7 @@ // //===----------------------------------------------------------------------===// -#include "llvm/Support/GCOV.h" +#include "llvm/ProfileData/GCOV.h" #include "llvm/ADT/STLExtras.h" #include "llvm/Support/Debug.h" #include "llvm/Support/FileSystem.h" diff --git a/tools/llvm-cov/gcov.cpp b/tools/llvm-cov/gcov.cpp index 4df7f015fd1..7776f2aa9a6 100644 --- a/tools/llvm-cov/gcov.cpp +++ b/tools/llvm-cov/gcov.cpp @@ -11,11 +11,11 @@ // //===----------------------------------------------------------------------===// +#include "llvm/ProfileData/GCOV.h" #include "llvm/ADT/SmallString.h" #include "llvm/Support/CommandLine.h" #include "llvm/Support/Errc.h" #include "llvm/Support/FileSystem.h" -#include "llvm/Support/GCOV.h" #include "llvm/Support/Path.h" #include using namespace llvm; -- 2.50.1