From 34eb96b03ff3a770b75c3106ba811daf8bc4e650 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. llvm-svn: 317366 --- llvm/include/llvm/{Support => ProfileData}/GCOV.h | 4 ++-- llvm/include/llvm/ProfileData/SampleProfReader.h | 2 +- llvm/lib/IR/CMakeLists.txt | 1 - llvm/lib/ProfileData/CMakeLists.txt | 1 + llvm/lib/{IR => ProfileData}/GCOV.cpp | 2 +- llvm/tools/llvm-cov/gcov.cpp | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) rename llvm/include/llvm/{Support => ProfileData}/GCOV.h (99%) rename llvm/lib/{IR => ProfileData}/GCOV.cpp (99%) diff --git a/llvm/include/llvm/Support/GCOV.h b/llvm/include/llvm/ProfileData/GCOV.h similarity index 99% rename from llvm/include/llvm/Support/GCOV.h rename to llvm/include/llvm/ProfileData/GCOV.h index 02016e7..497f80b 100644 --- a/llvm/include/llvm/Support/GCOV.h +++ b/llvm/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/llvm/include/llvm/ProfileData/SampleProfReader.h b/llvm/include/llvm/ProfileData/SampleProfReader.h index 9c1f357..0e9ab2d 100644 --- a/llvm/include/llvm/ProfileData/SampleProfReader.h +++ b/llvm/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/llvm/lib/IR/CMakeLists.txt b/llvm/lib/IR/CMakeLists.txt index eb4b914..17822bb 100644 --- a/llvm/lib/IR/CMakeLists.txt +++ b/llvm/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/llvm/lib/ProfileData/CMakeLists.txt b/llvm/lib/ProfileData/CMakeLists.txt index cd65762..3a981d8 100644 --- a/llvm/lib/ProfileData/CMakeLists.txt +++ b/llvm/lib/ProfileData/CMakeLists.txt @@ -1,4 +1,5 @@ add_llvm_library(LLVMProfileData + GCOV.cpp InstrProf.cpp InstrProfReader.cpp InstrProfWriter.cpp diff --git a/llvm/lib/IR/GCOV.cpp b/llvm/lib/ProfileData/GCOV.cpp similarity index 99% rename from llvm/lib/IR/GCOV.cpp rename to llvm/lib/ProfileData/GCOV.cpp index d4b4552..d6e4438 100644 --- a/llvm/lib/IR/GCOV.cpp +++ b/llvm/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/llvm/tools/llvm-cov/gcov.cpp b/llvm/tools/llvm-cov/gcov.cpp index 4df7f01..7776f2a 100644 --- a/llvm/tools/llvm-cov/gcov.cpp +++ b/llvm/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.7.4