GCOV: Move GCOV from IR & Support into ProfileData to fix layering
authorDavid Blaikie <dblaikie@gmail.com>
Fri, 3 Nov 2017 20:57:10 +0000 (20:57 +0000)
committerDavid Blaikie <dblaikie@gmail.com>
Fri, 3 Nov 2017 20:57:10 +0000 (20:57 +0000)
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/ProfileData/GCOV.h [moved from llvm/include/llvm/Support/GCOV.h with 99% similarity]
llvm/include/llvm/ProfileData/SampleProfReader.h
llvm/lib/IR/CMakeLists.txt
llvm/lib/ProfileData/CMakeLists.txt
llvm/lib/ProfileData/GCOV.cpp [moved from llvm/lib/IR/GCOV.cpp with 99% similarity]
llvm/tools/llvm-cov/gcov.cpp

similarity index 99%
rename from llvm/include/llvm/Support/GCOV.h
rename to llvm/include/llvm/ProfileData/GCOV.h
index 02016e7..497f80b 100644 (file)
@@ -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"
index 9c1f357..0e9ab2d 100644 (file)
 #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 <algorithm>
 #include <cstdint>
index eb4b914..17822bb 100644 (file)
@@ -22,7 +22,6 @@ add_llvm_library(LLVMCore
   DiagnosticPrinter.cpp
   Dominators.cpp
   Function.cpp
-  GCOV.cpp
   GVMaterializer.cpp
   Globals.cpp
   IRBuilder.cpp
index cd65762..3a981d8 100644 (file)
@@ -1,4 +1,5 @@
 add_llvm_library(LLVMProfileData
+  GCOV.cpp
   InstrProf.cpp
   InstrProfReader.cpp
   InstrProfWriter.cpp
similarity index 99%
rename from llvm/lib/IR/GCOV.cpp
rename to llvm/lib/ProfileData/GCOV.cpp
index d4b4552..d6e4438 100644 (file)
@@ -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"
index 4df7f01..7776f2a 100644 (file)
 //
 //===----------------------------------------------------------------------===//
 
+#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 <system_error>
 using namespace llvm;