[llvm] ed89eb3 - Revert "[FileCheck] Move FileCheck implementation out of LLVMSupport into its own library"
Raphael Isemann via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 31 02:39:13 PDT 2020
Author: Raphael Isemann
Date: 2020-08-31T11:38:40+02:00
New Revision: ed89eb3571e16307c16d2e5371855437835a40cc
URL: https://github.com/llvm/llvm-project/commit/ed89eb3571e16307c16d2e5371855437835a40cc
DIFF: https://github.com/llvm/llvm-project/commit/ed89eb3571e16307c16d2e5371855437835a40cc.diff
LOG: Revert "[FileCheck] Move FileCheck implementation out of LLVMSupport into its own library"
This reverts commit e9a3d1a401b07cbf7b11695637f1b549782a26cd. Seems the new
FileCheck library doesn't link on some bots. Reverting for now.
Added:
llvm/include/llvm/Support/FileCheck.h
llvm/lib/Support/FileCheck.cpp
llvm/lib/Support/FileCheckImpl.h
llvm/unittests/Support/FileCheckTest.cpp
Modified:
llvm/include/llvm/module.modulemap
llvm/lib/CMakeLists.txt
llvm/lib/Support/CMakeLists.txt
llvm/unittests/CMakeLists.txt
llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt
llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
llvm/unittests/Support/CMakeLists.txt
llvm/utils/FileCheck/CMakeLists.txt
llvm/utils/FileCheck/FileCheck.cpp
llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
Removed:
llvm/include/llvm/FileCheck/FileCheck.h
llvm/lib/FileCheck/CMakeLists.txt
llvm/lib/FileCheck/FileCheck.cpp
llvm/lib/FileCheck/FileCheckImpl.h
llvm/unittests/FileCheck/CMakeLists.txt
llvm/unittests/FileCheck/FileCheckTest.cpp
llvm/utils/gn/secondary/llvm/lib/FileCheck/BUILD.gn
llvm/utils/gn/secondary/llvm/unittests/FileCheck/BUILD.gn
################################################################################
diff --git a/llvm/include/llvm/FileCheck/FileCheck.h b/llvm/include/llvm/Support/FileCheck.h
similarity index 97%
rename from llvm/include/llvm/FileCheck/FileCheck.h
rename to llvm/include/llvm/Support/FileCheck.h
index f9fd3d72f888..1eb609ef725e 100644
--- a/llvm/include/llvm/FileCheck/FileCheck.h
+++ b/llvm/include/llvm/Support/FileCheck.h
@@ -1,4 +1,4 @@
-//==-- llvm/FileCheck/FileCheck.h --------------------------------*- C++ -*-==//
+//==-- llvm/Support/FileCheck.h ---------------------------*- C++ -*-==//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -10,8 +10,8 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_FILECHECK_FILECHECK_H
-#define LLVM_FILECHECK_FILECHECK_H
+#ifndef LLVM_SUPPORT_FILECHECK_H
+#define LLVM_SUPPORT_FILECHECK_H
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/MemoryBuffer.h"
diff --git a/llvm/include/llvm/module.modulemap b/llvm/include/llvm/module.modulemap
index 22959c62fc81..0ce3574e9b0d 100644
--- a/llvm/include/llvm/module.modulemap
+++ b/llvm/include/llvm/module.modulemap
@@ -195,13 +195,6 @@ module LLVM_ExecutionEngine {
}
-module LLVM_FileCheck {
- requires cplusplus
-
- umbrella "FileCheck"
- module * { export * }
-}
-
// Orc utilities that don't depend only on Support (not ExecutionEngine or
// IR). This is a workaround for ExecutionEngine's broken layering, and will
// be removed in the future.
diff --git a/llvm/lib/CMakeLists.txt b/llvm/lib/CMakeLists.txt
index 851b89bb95f0..35d204d7d63e 100644
--- a/llvm/lib/CMakeLists.txt
+++ b/llvm/lib/CMakeLists.txt
@@ -3,7 +3,6 @@
add_subdirectory(IR)
add_subdirectory(FuzzMutate)
-add_subdirectory(FileCheck)
add_subdirectory(InterfaceStub)
add_subdirectory(IRReader)
add_subdirectory(CodeGen)
diff --git a/llvm/lib/FileCheck/CMakeLists.txt b/llvm/lib/FileCheck/CMakeLists.txt
deleted file mode 100644
index c9b5bc07cb12..000000000000
--- a/llvm/lib/FileCheck/CMakeLists.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-add_llvm_component_library(LLVMFileCheck
- FileCheck.cpp
-
- ADDITIONAL_HEADER_DIRS
- "${LLVM_MAIN_INCLUDE_DIR}/llvm/FileCheck"
-)
diff --git a/llvm/lib/Support/CMakeLists.txt b/llvm/lib/Support/CMakeLists.txt
index ce55aca28d84..cf7408143361 100644
--- a/llvm/lib/Support/CMakeLists.txt
+++ b/llvm/lib/Support/CMakeLists.txt
@@ -119,6 +119,7 @@ add_llvm_component_library(LLVMSupport
Error.cpp
ErrorHandling.cpp
ExtensibleRTTI.cpp
+ FileCheck.cpp
FileCollector.cpp
FileUtilities.cpp
FileOutputBuffer.cpp
diff --git a/llvm/lib/FileCheck/FileCheck.cpp b/llvm/lib/Support/FileCheck.cpp
similarity index 99%
rename from llvm/lib/FileCheck/FileCheck.cpp
rename to llvm/lib/Support/FileCheck.cpp
index a0371cf88b3c..0cc3a2d73925 100644
--- a/llvm/lib/FileCheck/FileCheck.cpp
+++ b/llvm/lib/Support/FileCheck.cpp
@@ -13,7 +13,7 @@
// as well as various unittests.
//===----------------------------------------------------------------------===//
-#include "llvm/FileCheck/FileCheck.h"
+#include "llvm/Support/FileCheck.h"
#include "FileCheckImpl.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/StringSet.h"
diff --git a/llvm/lib/FileCheck/FileCheckImpl.h b/llvm/lib/Support/FileCheckImpl.h
similarity index 99%
rename from llvm/lib/FileCheck/FileCheckImpl.h
rename to llvm/lib/Support/FileCheckImpl.h
index 05b2a529002f..7cdeb7c766fd 100644
--- a/llvm/lib/FileCheck/FileCheckImpl.h
+++ b/llvm/lib/Support/FileCheckImpl.h
@@ -12,13 +12,13 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_LIB_FILECHECK_FILECHECKIMPL_H
-#define LLVM_LIB_FILECHECK_FILECHECKIMPL_H
+#ifndef LLVM_LIB_SUPPORT_FILECHECKIMPL_H
+#define LLVM_LIB_SUPPORT_FILECHECKIMPL_H
+#include "llvm/Support/FileCheck.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/ADT/StringRef.h"
-#include "llvm/FileCheck/FileCheck.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/SourceMgr.h"
#include <map>
diff --git a/llvm/unittests/CMakeLists.txt b/llvm/unittests/CMakeLists.txt
index 4076642a217e..850bc14b207f 100644
--- a/llvm/unittests/CMakeLists.txt
+++ b/llvm/unittests/CMakeLists.txt
@@ -24,7 +24,6 @@ add_subdirectory(CodeGen)
add_subdirectory(DebugInfo)
add_subdirectory(Demangle)
add_subdirectory(ExecutionEngine)
-add_subdirectory(FileCheck)
add_subdirectory(Frontend)
add_subdirectory(FuzzMutate)
add_subdirectory(InterfaceStub)
diff --git a/llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt b/llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt
index 4b278217f738..7ca77b98dc08 100644
--- a/llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt
+++ b/llvm/unittests/CodeGen/GlobalISel/CMakeLists.txt
@@ -2,7 +2,6 @@ set(LLVM_LINK_COMPONENTS
${LLVM_TARGETS_TO_BUILD}
CodeGen
Core
- FileCheck
GlobalISel
MC
MIRParser
diff --git a/llvm/unittests/CodeGen/GlobalISel/GISelMITest.h b/llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
index 336915ce8651..db3f2b9531c9 100644
--- a/llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
+++ b/llvm/unittests/CodeGen/GlobalISel/GISelMITest.h
@@ -21,8 +21,8 @@
#include "llvm/CodeGen/TargetInstrInfo.h"
#include "llvm/CodeGen/TargetLowering.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
-#include "llvm/FileCheck/FileCheck.h"
#include "llvm/InitializePasses.h"
+#include "llvm/Support/FileCheck.h"
#include "llvm/Support/SourceMgr.h"
#include "llvm/Support/TargetRegistry.h"
#include "llvm/Support/TargetSelect.h"
diff --git a/llvm/unittests/FileCheck/CMakeLists.txt b/llvm/unittests/FileCheck/CMakeLists.txt
deleted file mode 100644
index 7fe4f0c009d0..000000000000
--- a/llvm/unittests/FileCheck/CMakeLists.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-set(LLVM_LINK_COMPONENTS
- FileCheck
- Support
-)
-
-add_llvm_unittest(FileCheckTests
- FileCheckTest.cpp
-)
-
-target_link_libraries(FileCheckTests PRIVATE LLVMTestingSupport)
diff --git a/llvm/unittests/Support/CMakeLists.txt b/llvm/unittests/Support/CMakeLists.txt
index 30de294f499e..19fabfe2c74b 100644
--- a/llvm/unittests/Support/CMakeLists.txt
+++ b/llvm/unittests/Support/CMakeLists.txt
@@ -33,6 +33,7 @@ add_llvm_unittest(SupportTests
ErrorOrTest.cpp
ErrorTest.cpp
ExtensibleRTTITest.cpp
+ FileCheckTest.cpp
FileCollectorTest.cpp
FileOutputBufferTest.cpp
FileUtilitiesTest.cpp
diff --git a/llvm/unittests/FileCheck/FileCheckTest.cpp b/llvm/unittests/Support/FileCheckTest.cpp
similarity index 99%
rename from llvm/unittests/FileCheck/FileCheckTest.cpp
rename to llvm/unittests/Support/FileCheckTest.cpp
index c5eaa5fb04d2..e986c434c551 100644
--- a/llvm/unittests/FileCheck/FileCheckTest.cpp
+++ b/llvm/unittests/Support/FileCheckTest.cpp
@@ -1,4 +1,4 @@
-//===- llvm/unittest/FileCheck/FileCheckTest.cpp - FileCheck tests --------===//
+//===- llvm/unittest/Support/FileCheckTest.cpp - FileCheck tests --===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
@@ -6,8 +6,8 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/FileCheck/FileCheck.h"
-#include "../lib/FileCheck/FileCheckImpl.h"
+#include "llvm/Support/FileCheck.h"
+#include "../lib/Support/FileCheckImpl.h"
#include "llvm/Support/Regex.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
diff --git a/llvm/utils/FileCheck/CMakeLists.txt b/llvm/utils/FileCheck/CMakeLists.txt
index d17034323178..32e948a1a19e 100644
--- a/llvm/utils/FileCheck/CMakeLists.txt
+++ b/llvm/utils/FileCheck/CMakeLists.txt
@@ -2,4 +2,4 @@ add_llvm_utility(FileCheck
FileCheck.cpp
)
-target_link_libraries(FileCheck PRIVATE LLVMFileCheck LLVMSupport)
+target_link_libraries(FileCheck PRIVATE LLVMSupport)
diff --git a/llvm/utils/FileCheck/FileCheck.cpp b/llvm/utils/FileCheck/FileCheck.cpp
index 66b0a9776aaa..81889b2540f9 100644
--- a/llvm/utils/FileCheck/FileCheck.cpp
+++ b/llvm/utils/FileCheck/FileCheck.cpp
@@ -15,12 +15,12 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/FileCheck/FileCheck.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/InitLLVM.h"
#include "llvm/Support/Process.h"
#include "llvm/Support/WithColor.h"
#include "llvm/Support/raw_ostream.h"
+#include "llvm/Support/FileCheck.h"
#include <cmath>
using namespace llvm;
diff --git a/llvm/utils/gn/secondary/llvm/lib/FileCheck/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/FileCheck/BUILD.gn
deleted file mode 100644
index af211df351a3..000000000000
--- a/llvm/utils/gn/secondary/llvm/lib/FileCheck/BUILD.gn
+++ /dev/null
@@ -1,7 +0,0 @@
-static_library("FileCheck") {
- output_name = "LLVMFileCheck"
- deps = [ "//llvm/lib/Support" ]
- sources = [
- "FileCheck.cpp",
- ]
-}
diff --git a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
index 150847aa9b05..93270c20243a 100644
--- a/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/lib/Support/BUILD.gn
@@ -71,6 +71,7 @@ static_library("Support") {
"Error.cpp",
"ErrorHandling.cpp",
"ExtensibleRTTI.cpp",
+ "FileCheck.cpp",
"FileCollector.cpp",
"FileOutputBuffer.cpp",
"FileUtilities.cpp",
diff --git a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
index ae233fd7bde6..5a235671e5c8 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/BUILD.gn
@@ -20,7 +20,6 @@ group("unittests") {
"ExecutionEngine/JITLink:JITLinkTests",
"ExecutionEngine/MCJIT:MCJITTests",
"ExecutionEngine/Orc:OrcJITTests",
- "FileCheck:FileCheckTests",
"Frontend:LLVMFrontendTests",
"FuzzMutate:FuzzMutateTests",
"IR:IRTests",
diff --git a/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
index 7933f8c70782..5104716bccdd 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/CodeGen/GlobalISel/BUILD.gn
@@ -5,7 +5,6 @@ unittest("GlobalISelTests") {
"//llvm/lib/CodeGen",
"//llvm/lib/CodeGen/GlobalISel",
"//llvm/lib/CodeGen/MIRParser",
- "//llvm/lib/FileCheck",
"//llvm/lib/IR",
"//llvm/lib/MC",
"//llvm/lib/Support",
diff --git a/llvm/utils/gn/secondary/llvm/unittests/FileCheck/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/FileCheck/BUILD.gn
deleted file mode 100644
index 85eef061d225..000000000000
--- a/llvm/utils/gn/secondary/llvm/unittests/FileCheck/BUILD.gn
+++ /dev/null
@@ -1,9 +0,0 @@
-import("//llvm/utils/unittest/unittest.gni")
-
-unittest("FileCheckTests") {
- deps = [
- "//llvm/lib/FileCheck",
- "//llvm/lib/Support",
- ]
- sources = [ "FileCheckTest.cpp" ]
-}
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
index f47e5a996b33..be757feb2e9e 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/Support/BUILD.gn
@@ -36,6 +36,7 @@ unittest("SupportTests") {
"ErrorOrTest.cpp",
"ErrorTest.cpp",
"ExtensibleRTTITest.cpp",
+ "FileCheckTest.cpp",
"FileCollectorTest.cpp",
"FileOutputBufferTest.cpp",
"FileUtilitiesTest.cpp",
More information about the llvm-commits
mailing list